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