-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: 1.1.0
-
Component/s: None
-
None
-
Environment:*nix
-
None
-
None
-
None
-
None
-
None
-
None
-
None
When construction a query using BCON_NEW, using the $and or $or operator will fail if there is another expression prior to the use of $and/$or.
The following query will yield results:
query = BCON_NEW("$and","[","{",GROUPSTART,"
The following will NOT yield results:
query = BCON_NEW(GROUPAUTO, BCON_BOOL(true),
"$and","[","{",GROUPSTART,"{","$lte",BCON_INT32(addr),"}
","}","{",GROUPSTOP,"
{","$gte",BCON_INT32(addr),"}","}","]");
If I call a bson_as_json on the second query, and use that json to create a raw query from the shell. It WILL yield results.