[SERVER-1332] Labeler::Label missing for $or Created: 30/Jun/10  Updated: 12/Jul/16  Resolved: 19/Jul/10

Status: Closed
Project: Core Server
Component/s: Internal Client
Affects Version/s: 1.5.3
Fix Version/s: 1.5.6

Type: Improvement Priority: Minor - P4
Reporter: Johannes Wienke Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

There is no Label defined for $or in the C++ driver. This wouldn't be such a problem if there was proper documentation on how to build or-queries using the C++ API or a general note how to replace missing labels with their text equivalent.



 Comments   
Comment by auto [ 19/Jul/10 ]

Author:

{'login': 'RedBeard0531', 'name': 'Mathias Stearn', 'email': 'mathias@10gen.com'}

Message: $or helper in C++ SERVER-1332
http://github.com/mongodb/mongo/commit/8047e6afb2722a1daca76ab37d883325bde5a0c2

Comment by Mathias Stearn [ 19/Jul/10 ]

The code for the server is essentialy a large example app using the C++ driver. You just need to grep around the source.

Comment by Johannes Wienke [ 19/Jul/10 ]

But they aren't directly visible on the website.

Comment by Mathias Stearn [ 19/Jul/10 ]

there are a bunch of examples here http://github.com/mongodb/mongo/blob/master/dbtests/jsobjtests.cpp#L813-871

Comment by Johannes Wienke [ 19/Jul/10 ]

I think what was most confusing to me is that I couldn't find an example that used the normal "$predicate" syntax for the C++ API.

Comment by Mathias Stearn [ 19/Jul/10 ]

An OR labeler wouldn't help much since it would still need to take a BSON_ARRAY of BSON objects. If you have a good idea for a simple syntax please let me know.

As for how to construct queries I'd suggest looking at http://www.mongodb.org/display/DOCS/Advanced+Queries. The labelers only convert from something like BSON( "age" << GT << 24) to something like BSON("age" << BSON("$gt" << 24)).

Generated at Thu Feb 08 02:56:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.