#include <userver/ydb/transaction.hpp>
YDB Transaction.
https://ydb.tech/docs/en/concepts/transactions
Definition at line 21 of file transaction.hpp.
Public Member Functions | |
Transaction (Transaction &&) noexcept=default | |
Transaction (const Transaction &)=delete | |
Transaction & | operator= (Transaction &&)=delete |
Transaction & | operator= (const Transaction &)=delete |
void | Commit (OperationSettings settings={}) |
void | Rollback () |
PreparedArgsBuilder | GetBuilder () const |
template<typename... Args> | |
ExecuteResponse | Execute (const Query &query, Args &&... args) |
template<typename... Args> | |
ExecuteResponse | Execute (OperationSettings settings, const Query &query, Args &&... args) |
ExecuteResponse | Execute (OperationSettings settings, const Query &query, PreparedArgsBuilder &&builder) |
ExecuteResponse | Execute (QuerySettings query_settings, OperationSettings settings, const Query &query, PreparedArgsBuilder &&builder) |
void ydb::Transaction::Commit | ( | OperationSettings | settings = {} | ) |
Commit the transaction. The options that are missing in settings
are taken from the static config or driver defaults. settings
can be overridden by dynamic config's options for Commit
"query".
ExecuteResponse ydb::Transaction::Execute | ( | const Query & | query, |
Args &&... | args ) |
Execute a single data query as a part of the transaction. Query parameters are passed in Args
as "string key - value" pairs:
Use ydb::PreparedArgsBuilder for storing a generic buffer of query params if needed.
Definition at line 88 of file transaction.hpp.
ExecuteResponse ydb::Transaction::Execute | ( | OperationSettings | settings, |
const Query & | query, | ||
Args &&... | args ) |
Definition at line 95 of file transaction.hpp.
void ydb::Transaction::Rollback | ( | ) |
Rollback the transaction. The operation settings are taken from Begin
settings.