mongoc_cursor_next (3) - Linux Manuals
mongoc_cursor_next: This function shall iterate the underlying cursor, setting bson to the next document.
Command to display mongoc_cursor_next
manual in Linux: $ man 3 mongoc_cursor_next
NAME
mongoc_cursor_next() - This function shall iterate the underlying cursor, setting bson to the next document.
SYNOPSIS
bool
mongoc_cursor_next (mongoc_cursor_t *cursor,
const bson_t **bson);
PARAMETERS
- cursor
-
A
mongoc_cursor_t
\&.
- bson
-
A location for a
const bson_t *
\&.
DESCRIPTION
This function shall iterate the underlying cursor, setting
bson
to the next document.
This function is a blocking function.
RETURNS
This function returns true if a valid bson document was read from the cursor. Otherwise, false if there was an error or the cursor was exhausted.
Errors can be determined with the
mongoc_cursor_error(3)
function.
LIFECYCLE
The bson objects set in this function are ephemeral and good until the next call. This means that you must copy the returned bson if you wish to retain it beyond the lifetime of a single call to
mongoc_cursor_next(3)
\&.
COLOPHON
This page is part of MongoDB C Driver.
Please report any bugs at
https://jira.mongodb.org/browse/CDRIVER.
Pages related to mongoc_cursor_next
- mongoc_cursor_clone (3) - This function shall create a copy of a mongoc_cursor_t. The cloned cursor will be reset to the beginning of the query, and therefore the query will be re-executed on the MongoDB server when mongoc_cursor_next() is called.
- mongoc_cursor_current (3) - Fetches the cursors current document or NULL if there has been an error.
- mongoc_cursor_destroy (3) - Frees a mongoc_cursor_t and releases all associated resources. If a server-side cursor has been allocated, it will be released as well.
- mongoc_cursor_error (3) - This function checks to see if an error has occurred while iterating the cursor.
- mongoc_cursor_get_host (3) - Fetches the MongoDB host that the cursor is communicating with in the host out parameter.
- mongoc_cursor_get_max_await_time_ms (3) - Retrieve the value set with mongoc_cursor_set_max_await_time_ms.
- mongoc_cursor_is_alive (3) - Checks to see if a cursor is in a state that allows for more documents to be queried.
- mongoc_cursor_more (3) - This function shall indicate if there is more data to be read from the cursor.
- mongoc_cursor_set_max_await_time_ms (3) - The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query. Only applies if the cursor is created from mongoc_collection_find with the query flags MONGOC_QUERY_TAILABLE_CURSOR and MONGOC_QUERY_AWAIT_DATA, and the server is MongoDB 3.2 or later. See the documentation for maxTimeMS and the "getMore" command.
- mongoc_cursor_t (3) - Client-side cursor abtraction
- mongoc_check_version (3) - None
- mongoc_cleanup (3) - This function is responsible for cleaning up after use of the MongoDB C driver. It will release any lingering allocated memory which can be useful when running under valgrind.