|
Couchbase C++ SDK 1.4.0 (rev. 59aa900)
|
The transaction_options can be passed in to override some elements of the global transactions_config. More...
#include <couchbase/transactions/transaction_options.hxx>
Public Member Functions | |
| transaction_options ()=default | |
| auto | durability_level (durability_level level) -> transaction_options & |
| Set durability for this transaction. | |
| auto | durability_level () const -> std::optional< couchbase::durability_level > |
| Get the durability if it has been set. | |
| auto | scan_consistency (query_scan_consistency scan_consistency) -> transaction_options & |
| Set the query_scan_consistency for this transaction. | |
| auto | scan_consistency () const -> std::optional< query_scan_consistency > |
| Get the scan_consistency if it has been set. | |
| template<typename T> | |
| auto | timeout (T timeout) -> transaction_options & |
| Set the timeout for this transaction. | |
| auto | timeout () -> std::optional< std::chrono::nanoseconds > |
| Get the timeout, if set. | |
| auto | metadata_collection (const couchbase::collection &coll) -> transaction_options & |
| Set the metadata collection to use for this transaction. | |
| auto | metadata_collection (const couchbase::transactions::transaction_keyspace &keyspace) -> transaction_options & |
| Set metadata collection to use for this transaction. | |
| auto | metadata_collection () const -> std::optional< transaction_keyspace > |
| Get the metadata collection, if set. | |
The transaction_options can be passed in to override some elements of the global transactions_config.
|
default |
|
nodiscard |
Get the durability if it has been set.
| auto durability_level | ( | durability_level | level | ) | -> transaction_options & |
Set durability for this transaction.
| level | Durability level for this transaction. |
|
nodiscard |
Get the metadata collection, if set.
| auto metadata_collection | ( | const couchbase::collection & | coll | ) | -> transaction_options & |
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.
| coll | The desired collection to use. |
|
inline |
Set metadata collection to use for this transaction.
| keyspace | The desired collection to use |
|
nodiscard |
Get the scan_consistency if it has been set.
| auto scan_consistency | ( | query_scan_consistency | scan_consistency | ) | -> transaction_options & |
Set the query_scan_consistency for this transaction.
| scan_consistency | The desired query_scan_consistency for this transaction. |
| auto timeout | ( | ) | -> std::optional< std::chrono::nanoseconds > |
Get the timeout, if set.
|
inline |
Set the timeout for this transaction.
| T | timeout type, e.g. std::chrono::milliseconds, or similar |
| timeout | Desired timeout |