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

#include <mongocxx/v1/client_session.hpp>

Description

Options for mongocxx::v1::client_session.

Supported fields include:

Attention
This feature is experimental! It is not ready for use!

Public Member Functions

 options ()
 Default initialization.
 options (options &&other) noexcept
 Move constructor.
 options (options const &other)
 Copy construction.
 ~options ()
 Destroy this object.
bool causal_consistency () const
 Return the current "causalConsistency" field.
optionscausal_consistency (bool v)
 Set the "causalConsistency" field.
bsoncxx::v1::stdx::optional< v1::transaction_optionsdefault_transaction_opts () const
 Return the current "defaultTransactionOptions" field.
optionsdefault_transaction_opts (v1::transaction_options const &v)
 Set the "defaultTransactionOptions" field.
optionsoperator= (options &&other) noexcept
 Move assignment.
optionsoperator= (options const &other)
 Copy assignment.
bool snapshot () const
 Return the current "snapshot" field.
optionssnapshot (bool v)
 Set the "snapshot" field.

Constructor & Destructor Documentation

◆ ~options()

mongocxx::v1::client_session::options::~options ( )

Destroy this object.

Warning
Invalidates all associated views.

◆ options() [1/3]

mongocxx::v1::client_session::options::options ( options && other)
noexcept

Move constructor.

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

◆ options() [2/3]

mongocxx::v1::client_session::options::options ( options const & other)

Copy construction.

◆ options() [3/3]

mongocxx::v1::client_session::options::options ( )

Default initialization.

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

Member Function Documentation

◆ causal_consistency() [1/2]

bool mongocxx::v1::client_session::options::causal_consistency ( ) const

Return the current "causalConsistency" field.

◆ causal_consistency() [2/2]

options & mongocxx::v1::client_session::options::causal_consistency ( bool v)

Set the "causalConsistency" field.

◆ default_transaction_opts() [1/2]

bsoncxx::v1::stdx::optional< v1::transaction_options > mongocxx::v1::client_session::options::default_transaction_opts ( ) const

Return the current "defaultTransactionOptions" field.

◆ default_transaction_opts() [2/2]

options & mongocxx::v1::client_session::options::default_transaction_opts ( v1::transaction_options const & v)

Set the "defaultTransactionOptions" field.

◆ operator=() [1/2]

options & mongocxx::v1::client_session::options::operator= ( options && other)
noexcept

Move assignment.

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

◆ operator=() [2/2]

options & mongocxx::v1::client_session::options::operator= ( options const & other)

Copy assignment.

◆ snapshot() [1/2]

bool mongocxx::v1::client_session::options::snapshot ( ) const

Return the current "snapshot" field.

◆ snapshot() [2/2]

options & mongocxx::v1::client_session::options::snapshot ( bool v)

Set the "snapshot" field.


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