-
Type: Task
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Docs Examples, libmongoc
As discussed in mongodb-user: https://groups.google.com/forum/#!topic/mongodb-user/a0gbKkSLvxU
There isn't a great way to check if a cursor has another document to be iterated. mongoc_cursor_more isn't sufficient, since it doesn't actually contact the server, and returns true if the cursor is still open or has not yet been primed.
Let's formalize the workaround offered on the user group thread and make an official example for this in our documentation.