MongoDB C++ Driver mongocxx-3.4.0
|
Classes | |
class | iterator |
Public Member Functions | |
change_stream (change_stream &&other) noexcept | |
Move constructs a change_stream. | |
change_stream & | operator= (change_stream &&other) noexcept |
Move assigns a change_stream. | |
~change_stream () | |
Destroys a change_stream. | |
iterator | begin () const |
A change_stream::iterator points to the beginning of any available notifications. | |
iterator | end () const |
A change_stream::iterator indicating stream exhaustion, meaning that no notifications are available from the stream. | |
iterator mongocxx::change_stream::begin | ( | ) | const |
A change_stream::iterator points to the beginning of any available notifications.
Each call to begin() advances to the next available notification. The state of all iterators is tracked by the change_stream itself, so advancing one iterator advances all iterators.
change_stream::begin() and the increment operators are blocking operations. 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.
Throws | mongocxx::query_exception if the query failed. |
iterator mongocxx::change_stream::end | ( | ) | const |
A change_stream::iterator indicating stream exhaustion, meaning that no notifications are available from the stream.