1MONGOC_CURSOR_NEXT(3) libmongoc MONGOC_CURSOR_NEXT(3)
2
3
4
6 mongoc_cursor_next - mongoc_cursor_next()
7
9 bool
10 mongoc_cursor_next (mongoc_cursor_t *cursor, const bson_t **bson);
11
13 • cursor: A mongoc_cursor_t.
14
15 • bson: A location for a bson_t.
16
18 This function shall iterate the underlying cursor, setting bson to the
19 next document.
20
21 This function is a blocking function.
22
24 This function returns true if a valid bson document was read from the
25 cursor. Otherwise, false if there was an error or the cursor was ex‐
26 hausted.
27
28 Errors can be determined with the mongoc_cursor_error() function.
29
31 The bson objects set in this function are ephemeral and good until the
32 next call. This means that you must copy the returned bson if you wish
33 to retain it beyond the lifetime of a single call to mongoc_cur‐
34 sor_next().
35
37 MongoDB, Inc
38
40 2017-present, MongoDB, Inc
41
42
43
44
451.20.0 Nov 18, 2021 MONGOC_CURSOR_NEXT(3)