I have searched for the usage of conditional statements(<
,>
,<=
,etc..,) in C API documentation in the link http://api.mongodb.org/c/current/. But I am unable to find it.
Example:
The mongo shell query is
db.users.find({age: {$gt: 3}}, {})
I want the equivalent C statement for the above.
For example, query:
find({ age : { $gt : 5, $lt : 12}})
would be written like this:
bson_init(&b);
bson_append_start_object(&b,"age");
bson_append_int(&b,"$gt",5);
bson_append_int(&b,"$lt",12);
bson_append_finish_object(&b);
bson_finish(&b);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With