MongoDB C++ Driver mongocxx-3.11.0
Loading...
Searching...
No Matches
mongocxx::v_noabi::options::distinct Class Reference

#include <mongocxx/v_noabi/mongocxx/options/distinct.hpp>

Description

Class representing the optional arguments to a MongoDB distinct command.

Public Member Functions

const stdx::optional< bsoncxx::v_noabi::document::view_or_value > & collation () const
 Retrieves the current collation for this operation.
 
distinctcollation (bsoncxx::v_noabi::document::view_or_value collation)
 Sets the collation for this operation.
 
const stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > & comment () const
 The current comment for this operation.
 
distinctcomment (bsoncxx::v_noabi::types::bson_value::view_or_value comment)
 Sets the comment for this operation.
 
const stdx::optional< std::chrono::milliseconds > & max_time () const
 The current max_time setting.
 
distinctmax_time (std::chrono::milliseconds max_time)
 Sets the maximum amount of time for this operation to run (server-side) in milliseconds.
 
const stdx::optional< mongocxx::v_noabi::read_preference > & read_preference () const
 The current read_preference for this operation.
 
distinctread_preference (mongocxx::v_noabi::read_preference rp)
 Sets the read_preference for this operation.
 

Member Function Documentation

◆ collation() [1/2]

const stdx::optional< bsoncxx::v_noabi::document::view_or_value > & mongocxx::v_noabi::options::distinct::collation ( ) const

Retrieves the current collation for this operation.

Returns
The current collation.
See also

◆ collation() [2/2]

distinct & mongocxx::v_noabi::options::distinct::collation ( bsoncxx::v_noabi::document::view_or_value collation)

Sets the collation for this operation.

Parameters
collationThe new collation.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.
See also

◆ comment() [1/2]

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

The current comment for this operation.

Returns
The current comment
See also

◆ comment() [2/2]

distinct & mongocxx::v_noabi::options::distinct::comment ( bsoncxx::v_noabi::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

◆ max_time() [1/2]

const stdx::optional< std::chrono::milliseconds > & mongocxx::v_noabi::options::distinct::max_time ( ) const

The current max_time setting.

Returns
The current max time (in milliseconds).
See also

◆ max_time() [2/2]

distinct & mongocxx::v_noabi::options::distinct::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

◆ read_preference() [1/2]

const stdx::optional< mongocxx::v_noabi::read_preference > & mongocxx::v_noabi::options::distinct::read_preference ( ) const

The current read_preference for this operation.

Returns
the current read_preference.
See also

◆ read_preference() [2/2]

distinct & mongocxx::v_noabi::options::distinct::read_preference ( mongocxx::v_noabi::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

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