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