MongoDB C++ Driver mongocxx-4.0.0
Loading...
Searching...
No Matches
mongocxx::v_noabi::cursor Class Reference

#include <mongocxx/v_noabi/mongocxx/cursor.hpp>

Description

Class representing a pointer to the result set of a query on a MongoDB server.

Clients can iterate through a cursor::iterator to retrieve results.

Note
By default, cursors timeout after 10 minutes of inactivity.

Classes

class  iterator
 Class representing an input iterator of documents in a MongoDB cursor result set. More...
 

Public Member Functions

 cursor (cursor &&) noexcept
 Move constructs a cursor.
 
 ~cursor ()
 Destroys a cursor.
 
iterator begin ()
 A cursor::iterator that points to the beginning of any available results. If begin() is called more than once, the cursor::iterator returned points to the next remaining result, not the result of the original call to begin().
 
iterator end ()
 A cursor::iterator indicating cursor exhaustion, meaning that no documents are available from the cursor.
 
cursoroperator= (cursor &&) noexcept
 Move assigns a cursor.
 

Constructor & Destructor Documentation

◆ cursor()

mongocxx::v_noabi::cursor::cursor ( cursor && )
noexcept

Move constructs a cursor.

◆ ~cursor()

mongocxx::v_noabi::cursor::~cursor ( )

Destroys a cursor.

Member Function Documentation

◆ begin()

iterator mongocxx::v_noabi::cursor::begin ( )

A cursor::iterator that points to the beginning of any available results. If begin() is called more than once, the cursor::iterator returned points to the next remaining result, not the result of the original call to begin().

For a tailable cursor, when cursor.begin() == cursor.end(), no documents are available. Each call to cursor.begin() checks again for newly-available documents.

Returns
the cursor::iterator
Exceptions
mongocxx::v_noabi::query_exceptionif the query failed

◆ end()

iterator mongocxx::v_noabi::cursor::end ( )

A cursor::iterator indicating cursor exhaustion, meaning that no documents are available from the cursor.

Returns
the cursor::iterator

◆ operator=()

cursor & mongocxx::v_noabi::cursor::operator= ( cursor && )
noexcept

Move assigns a cursor.


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