1MONGOC_CURSOR_CLONE(3) libmongoc MONGOC_CURSOR_CLONE(3)
2
3
4
6 mongoc_cursor_t *
7 mongoc_cursor_clone (const mongoc_cursor_t *cursor)
8 BSON_GNUC_WARN_UNUSED_RESULT;
9
11 • cursor: A mongoc_cursor_t.
12
14 This function shall create a copy of a mongoc_cursor_t. The cloned cur‐
15 sor will be reset to the beginning of the query, and therefore the
16 query will be re-executed on the MongoDB server when
17 mongoc_cursor_next() is called.
18
20 A newly allocated mongoc_cursor_t that should be freed with
21 mongoc_cursor_destroy() when no longer in use.
22
23 WARNING:
24 Failure to handle the result of this function is a programming er‐
25 ror.
26
28 MongoDB, Inc
29
31 2017-present, MongoDB, Inc
32
33
34
35
361.25.1 Nov 08, 2023 MONGOC_CURSOR_CLONE(3)