[CDRIVER-106] couple of typos in C Driver documentation Created: 23/Nov/11  Updated: 19/Oct/16  Resolved: 26/Mar/12

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: 0.4
Fix Version/s: 0.5

Type: Improvement Priority: Minor - P4
Reporter: Waitman Gobble Assignee: Kyle Banker
Resolution: Done Votes: 0
Labels: documentation
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

documentation change



 Description   

Documentation update request (C Driver Tutorial)

http://api.mongodb.org/c/current/tutorial.html

The example code under the heading "Simple Queries"
subheading "Let's now write a function which prints out the name of all persons whose age is 24"

mongo_cursor_init( cursor, conn, "tutorial.persons" );
mongo_cursor_set_query( cursor, query )

while( mongo_cursor_next( cursor ) == MONGO_OK ) {
bson_iterator iterator[1];
if ( bson_find( iterator, mongo_cursor_bson( cursor ), "name" ))

{ printf( "name: %s\n", bson_iterator_string( it ) ); }

}

should be

mongo_cursor_init( cursor, conn, "tutorial.persons" );
mongo_cursor_set_query( cursor, query );

while( mongo_cursor_next( cursor ) == MONGO_OK ) {
bson_iterator iterator[1];
if ( bson_find( iterator, mongo_cursor_bson( cursor ), "name" ))

{ printf( "name: %s\n", bson_iterator_string( iterator ) ); }

}

(note: missing semicolon after mongo_cursor_set_query, also "it" becomes "iterator")



 Comments   
Comment by auto [ 26/Mar/12 ]

Author:

{u'login': u'banker', u'name': u'Kyle Banker', u'email': u'kylebanker@gmail.com'}

Message: CDRIVER-106 minor doc fixes
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/2bb9278d8ab44a2dcd458b60789281f4b980e8b8

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