film42 on v3.10.7
film42 on master
Bump version to 3.10.7 (compare)
film42 on master
Fix rspec to work with differen… (compare)
film42 on master
Allow captialize enums name Si… Merge pull request #428 from ti… (compare)
.dem
and not .proto
which is confusing me a bit
Hello, I have a question regarding best practices. I have a proto which need to be able to take a list questions, and all questions are different protos, and not all questions are returned everytime, so I have a field
repeated any questions
So in my code to figure out which question it is I am looking at, I check a string all the questions have. But it seems to me like there would be a better way to handle that, anybody have some good idea? =)
Hey all,"message":"Unable to parse the event wrapper: com.google.protobuf.InvalidProtocolBufferException: While parsing a protocol message, the input ended unexpectedly in the middle of a field. This could mean either that the input has been truncated or that an embedded message misreported its own length.
Been getting this error. The message has two fields of type com.google.protobuf.any.Any. I would like to parse the ArrayByte but keeps failing due to this. There is no place length is being set.
Please assist. Thanks in advance
syntax = "proto3";
message request {
object message = {"source": [1,2,3,4,5], "target": [1,2,3,4,5]}
message response {
object message = {"source": [1,2,3,4,5], "target": [1,2,3,4,5]}
}
service fetch {
rpc calculate (request) returns (response) {}
}
I have data input format mentioned up there.
Can anyone write me a .proto file which will accept such data json from client, process it and send it back in the same format?
#0 0x00007ffff618483b in google::protobuf::internal::GenericTypeHandler<ColumnValue>::Delete (value=0x72622e6d6f632e00, arena=0x0) at
/usr/local/include/google/protobuf/repeated_field.h:686
#1 0x00007ffff6183941 in google::protobuf::internal::RepeatedPtrFieldBase::Destroy<google::protobuf::RepeatedPtrField<ColumnValue>::TypeHandler> (this=0x7fffffffd270)
at /usr/local/include/google/protobuf/repeated_field.h:1492
#2 0x00007ffff61824fc in google::protobuf::RepeatedPtrField<ColumnValue>::~RepeatedPtrField (this=0x7fffffffd270, __in_chrg=<optimized out>) at /usr/local/include/google/protobuf/repeated_field.h:1952
#3 0x00007ffff62200b6 in Row::~Row (this=0x7fffffffd260, __in_chrg=<optimized out>) at common.pb.cc:3791
//repeated_field.h:686
static inline void Delete(GenericType* value, Arena* arena) {
if (arena == NULL) {
delete value;
}
}
zdb::ResultSet result = prep_stmt.executeQuery();
std::vector<std::unique_ptr<IndexVector>> ret; // IndexVector is a protobuf message type, sizeof ... = 72
while (result.next()) {
std::unique_ptr<IndexVector> indexVector {std::make_unique<IndexVector>()};
int64_t poiId = result.getLLong(1);
int64_t pictureId = result.getLLong(2);
bool isDel = result.getInt(3) != 0;
indexVector->set_id(pictureId);
indexVector->set_poiid(poiId);
indexVector->set_isdel(isDel);
ret.push_back(indexVector);
}
return ret;