MongoDB C++ Driver mongocxx-3.4.0
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
mongocxx::change_stream Class Reference

Classes

class  iterator
 

Public Member Functions

 change_stream (change_stream &&other) noexcept
 Move constructs a change_stream.
 
change_streamoperator= (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.
 

Member Function Documentation

◆ begin()

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.

Returns
The change_stream::iterator
Exceptions
Throwsmongocxx::query_exception if the query failed.

◆ end()

iterator mongocxx::change_stream::end ( ) const

A change_stream::iterator indicating stream exhaustion, meaning that no notifications are available from the stream.

Returns
The change_stream::iterator indicating exhaustion

The documentation for this class was generated from the following file: