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

Class representing the optional arguments for a transaction. More...

#include <transaction.hpp>

Public Member Functions

 transaction (const transaction &)
 Copy constructs transaction options.
 
transactionoperator= (const transaction &)
 Copy assigns transaction options.
 
 transaction (transaction &&) noexcept
 Move constructs transaction options.
 
transactionoperator= (transaction &&) noexcept
 Move assigns transaction options.
 
 ~transaction () noexcept
 Destroys the transaction options.
 
transactionread_concern (const class read_concern &rc)
 Sets the transaction read concern. More...
 
stdx::optional< class read_concernread_concern () const
 Gets the current transaction read concern. More...
 
transactionwrite_concern (const class write_concern &wc)
 Sets the transaction write concern. More...
 
stdx::optional< class write_concernwrite_concern () const
 Gets the current transaction write concern. More...
 
transactionread_preference (const class read_preference &rp)
 Sets the transaction read preference. More...
 
stdx::optional< class read_preferenceread_preference () const
 Gets the current transaction read preference. More...
 

Detailed Description

Class representing the optional arguments for a transaction.

Member Function Documentation

◆ read_concern() [1/2]

transaction& mongocxx::options::transaction::read_concern ( const class read_concern rc)

Sets the transaction read concern.

Parameters
rcThe read concern.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.

◆ read_concern() [2/2]

stdx::optional<class read_concern> mongocxx::options::transaction::read_concern ( ) const

Gets the current transaction read concern.

Returns
An optional containing the read concern. If the read concern has not been set, a disengaged optional is returned.

◆ read_preference() [1/2]

transaction& mongocxx::options::transaction::read_preference ( const class read_preference rp)

Sets the transaction read preference.

Parameters
rpThe read preference.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.

◆ read_preference() [2/2]

stdx::optional<class read_preference> mongocxx::options::transaction::read_preference ( ) const

Gets the current transaction read preference.

Returns
An optional containing the read preference. If the read preference has not been set, a disengaged optional is returned.

◆ write_concern() [1/2]

transaction& mongocxx::options::transaction::write_concern ( const class write_concern wc)

Sets the transaction write concern.

Parameters
wcThe write concern.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.

◆ write_concern() [2/2]

stdx::optional<class write_concern> mongocxx::options::transaction::write_concern ( ) const

Gets the current transaction write concern.

Returns
The write concern.
An optional containing the write concern. If the write concern has not been set, a disengaged optional is returned.

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