#include <mongocxx/v_noabi/mongocxx/change_stream.hpp>
◆ change_stream() [1/3]
| mongocxx::v_noabi::change_stream::change_stream |
( |
change_stream && | other | ) |
|
|
noexcept |
◆ change_stream() [2/3]
| mongocxx::v_noabi::change_stream::change_stream |
( |
change_stream const & | other | ) |
|
|
delete |
This class is not copyable.
◆ ~change_stream()
| mongocxx::v_noabi::change_stream::~change_stream |
( |
| ) |
|
◆ change_stream() [3/3]
◆ begin()
| iterator mongocxx::v_noabi::change_stream::begin |
( |
| ) |
const |
A change_stream::iterator points to the beginning of any available notifications.
The first call to begin() advances to the next available notification. Consecutive calls to begin() only advance to the next available notification at most once. The state of all iterators is tracked by the change_stream itself, so advancing one iterator advances all iterators.
change_stream::begin() and increment operators may block if the current batch of documents is exhausted. They will not return until a notification is available, the max_await_time (from the options::change_stream) milliseconds have elapsed, or a server error is encountered.
When change_stream.begin() == change_stream.end(), no notifications are available. Each call to change_stream.begin() checks again for newly-available notifications and advances (once) to the next available notification.
- Returns
- The change_stream::iterator
- Exceptions
-
- Warning
- This function is NOT logically const despite the const-qualifier.
◆ end()
| iterator mongocxx::v_noabi::change_stream::end |
( |
| ) |
const |
◆ get_resume_token()
Returns a resume token for this change stream.
If the change stream has not been iterated, and either resume_after or start_after was specified in the options to this change stream, the specified value will be returned by this method. If neither resume_after or start_after was set on the options for this change stream, and it has not been iterated, this method will return no token.
Once this change stream has been iterated, this method will return the resume token of the most recently returned document in the stream, or a postBatchResumeToken if the current batch of documents has been exhausted.
- See also
-
The returned document::view is valid for the lifetime of the stream and its data may be updated if the change stream is iterated after this function. The value may be copied to extend its lifetime or preserve the current resume token.
- Returns
- The token.
◆ operator v1::change_stream() [1/2]
Convert to the bsoncxx::v1 equivalent.
- Postconditions:
- *this is in an assign-or-destroy-only state.
- Warning
- Invalidates all associated iterators and views.
◆ operator v1::change_stream() [2/2]
This class is not copyable.
◆ operator=() [1/2]
◆ operator=() [2/2]
This class is not copyable.
The documentation for this class was generated from the following file: