Filtering/Query Support for Protocol Buffer

2,665 views
Skip to first unread message

Shail

unread,
Jun 1, 2012, 3:05:58 AM6/1/12
to Protocol Buffers
I am exploring the protocol buffer. I have come across the scenario
where i need to filter the records of the message stored in binary
file with respect to field value.
My message structure is :

message Person {
required string name = 1;
required int32 id = 2; // Unique ID number for this person.
}

I have stored the 50 records for the message. I want to filter the
persons with id from 2 to 5.

Does protocol buffer provide support like "SQL query/XPath query" to
retrieve the selective data from binary file?

During my learning I came across Protocol Buffer Editor tool
(RecordEdit_protobuf_ Editor) which has such filter support for
protocol buffer.

Please let me know if there is any API available to use for such
scenarios (filtering based on the field value) or custom logic need to
be put in to achieve this.


Pavel Shramov

unread,
Jun 1, 2012, 1:02:26 PM6/1/12
to Shail, Protocol Buffers
On Fri, Jun 01, 2012 at 12:05:58AM -0700, Shail wrote:
> Does protocol buffer provide support like "SQL query/XPath query" to
> retrieve the selective data from binary file?

> Please let me know if there is any API available to use for such
> scenarios (filtering based on the field value) or custom logic need to
> be put in to achieve this.
Maybe this thread may help you:
https://groups.google.com/forum/?fromgroups#!topic/protobuf/KJN8IwpNPc0

Pavel

Shail

unread,
Jun 4, 2012, 2:02:13 AM6/4/12
to Protocol Buffers
Thanks. I see that you have provided link which talks about XQuery
like support for Python.
I am using C# & C++ version for protocol buffers.Is currently any plan
of XPath/SQL query like support for C++/C#?
Are you aware of any third party library or Open source code which can
be used along with protocol buffer for filtering support?

Shailendra

Pavel Shramov

unread,
Jun 4, 2012, 2:11:57 AM6/4/12
to Shail, Protocol Buffers
On Sun, Jun 03, 2012 at 11:02:13PM -0700, Shail wrote:
> Thanks. I see that you have provided link which talks about XQuery
> like support for Python.
> I am using C# & C++ version for protocol buffers.Is currently any plan
> of XPath/SQL query like support for C++/C#?
You may try to contact Greg Adair, he mentioned in the last message of that thread
that he's working on C++ implementation.

Pavel
Reply all
Reply to author
Forward
0 new messages