I am using mongo c driver 1.1 with mongo version 3.0. I need to write a function that gets a cursor to a collection. I found the following example in the documentation.
http://api.mongodb.org/c/1.1.0/mongoc_cursor_t.html
collection = mongoc_client_get_collection (client, "test", collection_name);
cursor = mongoc_collection_find (collection,
MONGOC_QUERY_NONE,
0,
0,
0,
&query,
NULL, /* Fields, NULL for all. */
NULL); /* Read Prefs, NULL for default */
I want to do exactly this, except i want to have no query (Match all documents in the collection)