The transaction_options can be passed in to override some elements of the global transactions_config.
More...
#include <couchbase/transactions/transaction_options.hxx>
The transaction_options can be passed in to override some elements of the global transactions_config.
◆ transaction_options()
◆ durability_level() [1/2]
◆ durability_level() [2/2]
Set durability for this transaction.
- See also
- couchbase::durability_level for details.
- Parameters
-
level | Durability level for this transaction. |
- Returns
- reference to this object, convenient for chaining operations.
◆ metadata_collection() [1/3]
Get the metadata collection, if set.
- Returns
- the metadata collection, as a transaction_keyspace, if set.
◆ metadata_collection() [2/3]
Set the metadata collection to use for this transaction.
Transactions involve a the creation and use of some metadata documents, which by default are placed in the default collection of scope which the first document in the that has a mutating operation performed on it. However, you can set this to a specific collection to isolate these documents from your documents, if desired.
- Parameters
-
coll | The desired collection to use. |
- Returns
- reference to this object, convenient for chaining operations.
◆ metadata_collection() [3/3]
Set metadata collection to use for this transaction.
- Parameters
-
keyspace | The desired collection to use |
- Returns
- reference to this object, convenient for chaining operations.
◆ scan_consistency() [1/2]
◆ scan_consistency() [2/2]
◆ timeout() [1/2]
auto timeout |
( |
| ) |
-> std::optional< std::chrono::nanoseconds > |
Get the timeout, if set.
- Returns
- the timeout, if set.
◆ timeout() [2/2]
Set the timeout for this transaction.
- Template Parameters
-
T | timeout type, e.g. std::chrono::milliseconds, or similar |
- Parameters
-
- Returns
- reference to this object, convenient for chaining operations.
The documentation for this class was generated from the following file: