MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
mongocxx::v1::distinct_options Class Reference

#include <mongocxx/v1/distinct_options.hpp>

Description

Options for a "distinct" command.

Supported fields include:

See also

Public Member Functions

 distinct_options ()
 Default initialization.
 distinct_options (distinct_options &&other) noexcept
 Move constructor.
 distinct_options (distinct_options const &other)
 Copy construction.
 ~distinct_options ()
 Destroy this object.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::viewcollation () const
 Return the current "collation" field.
distinct_optionscollation (bsoncxx::v1::document::value collation)
 Set the "collation" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::types::viewcomment () const
 Return the current "comment" field.
distinct_optionscomment (bsoncxx::v1::types::value comment)
 Set the "comment" field.
bsoncxx::v1::stdx::optional< std::chrono::milliseconds > max_time () const
 Return the current "maxTimeMS" field.
distinct_optionsmax_time (std::chrono::milliseconds max_time)
 Set the "maxTimeMS" field.
distinct_optionsoperator= (distinct_options &&other) noexcept
 Move assignment.
distinct_optionsoperator= (distinct_options const &other)
 Copy assignment.
bsoncxx::v1::stdx::optional< v1::read_preferenceread_preference () const
 Return the current "readPreference" field.
distinct_optionsread_preference (v1::read_preference rp)
 Set the "readPreference" field.

Constructor & Destructor Documentation

◆ ~distinct_options()

mongocxx::v1::distinct_options::~distinct_options ( )

Destroy this object.

Warning
Invalidates all associated views.

◆ distinct_options() [1/3]

mongocxx::v1::distinct_options::distinct_options ( distinct_options && other)
noexcept

Move constructor.

Postconditions:
  • other is in an assign-or-destroy-only state.

◆ distinct_options() [2/3]

mongocxx::v1::distinct_options::distinct_options ( distinct_options const & other)

Copy construction.

◆ distinct_options() [3/3]

mongocxx::v1::distinct_options::distinct_options ( )

Default initialization.

Postconditions:
  • All supported fields are "unset" or zero-initialized.

Member Function Documentation

◆ collation() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > mongocxx::v1::distinct_options::collation ( ) const

Return the current "collation" field.

◆ collation() [2/2]

distinct_options & mongocxx::v1::distinct_options::collation ( bsoncxx::v1::document::value collation)

Set the "collation" field.

◆ comment() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::types::view > mongocxx::v1::distinct_options::comment ( ) const

Return the current "comment" field.

◆ comment() [2/2]

distinct_options & mongocxx::v1::distinct_options::comment ( bsoncxx::v1::types::value comment)

Set the "comment" field.

◆ max_time() [1/2]

bsoncxx::v1::stdx::optional< std::chrono::milliseconds > mongocxx::v1::distinct_options::max_time ( ) const

Return the current "maxTimeMS" field.

◆ max_time() [2/2]

distinct_options & mongocxx::v1::distinct_options::max_time ( std::chrono::milliseconds max_time)

Set the "maxTimeMS" field.

◆ operator=() [1/2]

distinct_options & mongocxx::v1::distinct_options::operator= ( distinct_options && other)
noexcept

Move assignment.

Postconditions:
  • other is in an assign-or-destroy-only state.

◆ operator=() [2/2]

distinct_options & mongocxx::v1::distinct_options::operator= ( distinct_options const & other)

Copy assignment.

◆ read_preference() [1/2]

bsoncxx::v1::stdx::optional< v1::read_preference > mongocxx::v1::distinct_options::read_preference ( ) const

Return the current "readPreference" field.

◆ read_preference() [2/2]

distinct_options & mongocxx::v1::distinct_options::read_preference ( v1::read_preference rp)

Set the "readPreference" field.


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