mongoc_cursor_clone (3) - Linux Manuals
mongoc_cursor_clone: 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.
Command to display mongoc_cursor_clone
manual in Linux: $ man 3 mongoc_cursor_clone
NAME
mongoc_cursor_clone() - 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.
SYNOPSIS
mongoc_cursor_t *
mongoc_cursor_clone (const mongoc_cursor_t *cursor)
BSON_GNUC_WARN_UNUSED_RESULT;
PARAMETERS
- cursor
-
A
mongoc_cursor_t
\&.
DESCRIPTION
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(3)
is called.
RETURNS
A newly allocated
mongoc_cursor_t
that should be freed with
mongoc_cursor_destroy(3)
when no longer in use.
NOTE
-
Failure to handle the result of this function is a programming error.
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_clone
- 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_next (3) - This function shall iterate the underlying cursor, setting bson to the next document.
- 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.