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:

- causal_consistency ("causalConsistency")
- snapshot ("snapshot")
- default_transaction_opts ("defaultTransactionOptions")

## 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.
options & | causal_consistency (bool v)
| Set the "causalConsistency" field.
bsoncxx::v1::stdx::optional< v1::transaction_options > | default_transaction_opts () const
| Return the current "defaultTransactionOptions" field.
options & | default_transaction_opts (v1::transaction_options const &v)
| Set the "defaultTransactionOptions" field.
options & | operator= (options &&other) noexcept
| Move assignment.
options & | operator= (options const &other)
| Copy assignment.
bool | snapshot () const
| Return the current "snapshot" field.
options & | snapshot (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:

- mongocxx/v1/client_session.hpp