We store a protobuf messages using:
...
payload.toByteArray(),
...
into a longblob column and normally we read them out in a Spring-based application and do handling there.
However, there is a quite straightforward question: is it possible to read those longblob column values just within a SQL query (probably using a stored procedure) avoiding loading data into the application and handling it there?
We need that converter only for one particular message type structure:
message Entry
{
int64 time = 1;
repeated Point points = 2;
}
message Point
{
uint64 status = 1;
int64 value = 2;
google.protobuf.Timestamp timestamp = 3;
}
Personally I don't see any possible solution here, however, maybe it's because I don't have enough experience with protobuf.