Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
1.1.0
-
None
-
None
-
*nix
Description
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.