[CDRIVER-1868] Small typo in mongoc_collection_find example doc Created: 19/Oct/16  Updated: 20/Oct/16  Resolved: 20/Oct/16

Status: Closed
Project: C Driver
Component/s: docs, libmongoc
Affects Version/s: None
Fix Version/s: 1.5.0

Type: Bug Priority: Major - P3
Reporter: Wan Bachtiar Assignee: Hannes Magnusson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

There is a BCON example typo in http://mongoc.org/libmongoc/current/mongoc_collection_find.html under the The "find" command section.

Where the example states:

query = BCON_NEW ("filter", "{", "foo", BCON_INT32 (1), "}",
                  "sort": "{", "bar", BCON_INT32 (-1), "}");
cursor = mongoc_collection_find (collection, MONGOC_QUERY_NONE, 0, 0, 0, query, NULL, NULL);

The semi colon after 'sort' is invalid, it should be a comma.



 Comments   
Comment by Hannes Magnusson [ 20/Oct/16 ]

Good catch, thanks!

Comment by Githook User [ 20/Oct/16 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-1868 Fix typo/syntax error
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/8095e0274c27e3d7df455eb4adadef76fded4b8b

Generated at Wed Feb 07 21:13:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.