#include <mongocxx/v1/cursor.hpp>
A MongoDB cursor.
- See also
-
- Attention
- This feature is experimental! It is not ready for use!
|
| class | iterator |
| | An iterator over the results of an associated cursor. More...
|
|
| enum class | type |
| | Enumeration identifying the type of the cursor. More...
|
◆ type
Enumeration identifying the type of the cursor.
◆ ~cursor()
| mongocxx::v1::cursor::~cursor |
( |
| ) |
|
Destroy this object.
- Warning
- Invalidates all associated views and iterators.
◆ cursor() [1/2]
| mongocxx::v1::cursor::cursor |
( |
cursor && | other | ) |
|
|
noexcept |
Move constructor.
- Postconditions:
- other is in an assign-or-destroy-only state.
◆ cursor() [2/2]
| mongocxx::v1::cursor::cursor |
( |
cursor const & | | ) |
|
|
delete |
This class is not copyable.
◆ begin()
| iterator mongocxx::v1::cursor::begin |
( |
| ) |
|
Return an iterator over the results of the associated cursor.
- Important
- All iterators associated with the same cursor object share the same state.
This function advances the underlying cursor to obtain the first available result document. The underlying cursor is only advanced at most once: consecutive calls to this->begin() do not advance the underlying cursor state. To obtain subsequent available result documents, the resulting iterator must be incremented instead.
When an iterator compares equal to this->end(), a non-tailable cursor will no longer return any documents: this->begin() == this->end() will always be true. However, a tailable cursor may request additional result documents by calling this->begin() again: the behavior is the same as the first call to this->begin().
- Exceptions
-
◆ end()
Return an end iterator.
- Important
- The end iterator has no associated cursor.
◆ operator=() [1/2]
Move assignment.
- Postconditions:
- other is in an assign-or-destroy-only state.
◆ operator=() [2/2]
This class is not copyable.
The documentation for this class was generated from the following file: