Options for configuring a transaction. More...
Public Member Functions | |
| TransactionOptions ()=default | |
Constructor sets read_only false and no hint | |
| TransactionOptions & | set_read_only (bool read_only) |
| Set a flag indicating whether the transaction is read-only. | |
| bool | get_read_only () const |
Get read_only value. | |
| TransactionOptions & | set_hint (std::string hint) |
| Set a hint for the transaction, which is logged. | |
| const std::string & | get_hint () const |
Get hint value. | |
Options for configuring a transaction.
When creating a transaction, options can be specified. The API is designed to support a builder-style pattern, allowing chaining of calls to set options. For example:
ditto.get_store().transaction(
TransactionOptions().set_read_only(true).set_hint("my hint"),
[](Transaction &t) {
// ... transaction code here ...
});
| TransactionOptions & ditto::TransactionOptions::set_hint | ( | std::string | hint | ) |
Set a hint for the transaction, which is logged.
Mostly useful for debugging and testing.
| TransactionOptions & ditto::TransactionOptions::set_read_only | ( | bool | read_only | ) |
Set a flag indicating whether the transaction is read-only.