MongoDB C++ Driver  mongocxx-3.7.0
Public Member Functions | List of all members
mongocxx::options::estimated_document_count Class Reference

Class representing the optional arguments to mongocxx::collection::estimated_document_count. More...

#include <estimated_document_count.hpp>

Public Member Functions

estimated_document_countmax_time (std::chrono::milliseconds max_time)
 Sets the maximum amount of time for this operation to run (server-side) in milliseconds. More...
 
const bsoncxx::stdx::optional< std::chrono::milliseconds > & max_time () const
 The current max_time setting. More...
 
estimated_document_countcomment (bsoncxx::types::bson_value::view_or_value comment)
 Sets the comment for this operation. More...
 
const bsoncxx::stdx::optional< bsoncxx::types::bson_value::view_or_value > & comment () const
 The current comment for this operation. More...
 
estimated_document_countread_preference (class read_preference rp)
 Sets the read_preference for this operation. More...
 
const bsoncxx::stdx::optional< class read_preference > & read_preference () const
 The current read_preference for this operation. More...
 

Detailed Description

Class representing the optional arguments to mongocxx::collection::estimated_document_count.

Member Function Documentation

◆ comment() [1/2]

const bsoncxx::stdx::optional<bsoncxx::types::bson_value::view_or_value>& mongocxx::options::estimated_document_count::comment ( ) const

The current comment for this operation.

Returns
The current comment
See also
https://docs.mongodb.com/manual/reference/command/count/

◆ comment() [2/2]

estimated_document_count& mongocxx::options::estimated_document_count::comment ( bsoncxx::types::bson_value::view_or_value  comment)

Sets the comment for this operation.

Parameters
commentThe new comment.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.
See also
https://docs.mongodb.com/manual/reference/command/count/

◆ max_time() [1/2]

const bsoncxx::stdx::optional<std::chrono::milliseconds>& mongocxx::options::estimated_document_count::max_time ( ) const

The current max_time setting.

Returns
The current max time (in milliseconds).
See also
https://docs.mongodb.com/manual/reference/command/count/

◆ max_time() [2/2]

estimated_document_count& mongocxx::options::estimated_document_count::max_time ( std::chrono::milliseconds  max_time)

Sets the maximum amount of time for this operation to run (server-side) in milliseconds.

Parameters
max_timeThe max amount of time (in milliseconds).
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.
See also
https://docs.mongodb.com/manual/reference/command/count/

◆ read_preference() [1/2]

const bsoncxx::stdx::optional<class read_preference>& mongocxx::options::estimated_document_count::read_preference ( ) const

The current read_preference for this operation.

Returns
the current read_preference
See also
https://docs.mongodb.com/manual/reference/command/count/

◆ read_preference() [2/2]

estimated_document_count& mongocxx::options::estimated_document_count::read_preference ( class read_preference  rp)

Sets the read_preference for this operation.

Parameters
rpThe new read_preference.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.
See also
https://docs.mongodb.com/manual/reference/command/count/

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