1MONGOC_CHANGE_STREAM_NEXT(3) libmongoc MONGOC_CHANGE_STREAM_NEXT(3)
2
3
4
6 bool
7 mongoc_change_stream_next (mongoc_change_stream_t *stream,
8 const bson_t **bson);
9
10 This function iterates the underlying cursor, setting bson to the next
11 document. This will block for a maximum of maxAwaitTimeMS milliseconds
12 as specified in the options when created, or the default timeout if
13 omitted. Data may be returned before the timeout. If no data is re‐
14 turned this function returns false.
15
17 • stream: A mongoc_change_stream_t.
18
19 • bson: The location for the resulting document.
20
22 This function returns true if a valid bson document was read from the
23 stream. Otherwise, false if there was an error or no document was
24 available.
25
26 Errors can be determined with the mongoc_change_stream_error_document()
27 function.
28
30 Similar to mongoc_cursor_next() the lifetime of bson is until the next
31 call to mongoc_change_stream_next(), so it needs to be copied to extend
32 the lifetime.
33
35 MongoDB, Inc
36
38 2017-present, MongoDB, Inc
39
40
41
42
431.25.1 Nov 08, 2023 MONGOC_CHANGE_STREAM_NEXT(3)