I have a simple query that worked on mongodb shell:
db.collection.find({"date": {$lt: ISODate("2015-11-03T00:00:00Z")} })
very simple, just trying to find any record that has date before 2015-11-03. Now i want to translate to similar code in mongoc driver, i have following code that doesn't work:
query = BCON_NEW (
"date", "{", "$lt", "2015-11-03T00:00:00Z", "}", "}");
cursor = mongoc_collection_find (collection, MONGOC_QUERY_NONE, 0, 0, 0, query, NULL, NULL);
anyone knows the correct way to write in mongoc? I have looked through mongoc.org, no related example there.