Google Cloud Spanner C++ Client
1.32.0
A C++ Client Library for Google Cloud Spanner
|
The representation of a Cloud Spanner transaction. More...
#include <google/cloud/spanner/transaction.h>
Classes | |
class | ReadOnlyOptions |
Options for ReadOnly transactions. More... | |
class | ReadWriteOptions |
Options for ReadWrite transactions. More... | |
class | SingleUseOptions |
Options for "single-use", ReadOnly transactions, where Spanner chooses the read timestamp, subject to user-provided bounds. More... | |
Public Member Functions | |
~Transaction () | |
Construction of read-only and read-write transactions. | |
Transaction (ReadOnlyOptions opts) | |
Transaction (ReadWriteOptions opts) | |
Transaction (Transaction const &txn, ReadWriteOptions opts) | |
Regular value type, supporting copy, assign, move. | |
Transaction (Transaction &&)=default | |
Transaction & | operator= (Transaction &&)=default |
Transaction (Transaction const &)=default | |
Transaction & | operator= (Transaction const &)=default |
Friends | |
Equality operators | |
bool | operator== (Transaction const &a, Transaction const &b) |
bool | operator!= (Transaction const &a, Transaction const &b) |
The representation of a Cloud Spanner transaction.
A transaction is a set of reads and writes that execute atomically at a single logical point in time across the columns/rows/tables in a database. Those reads and writes are grouped by passing them the same Transaction
.
All reads/writes in the transaction must be executed within the same session, and that session may have only one transaction active at a time.
Spanner supports these transaction modes:
Definition at line 58 of file transaction.h.
|
explicit |
Transaction
object. Instead, the first request to the server (for example as part of a ExecuteQuery()
call) will also create the transaction. Definition at line 94 of file transaction.cc.
|
explicit |
Transaction
object. Instead, the first request to the server (for example as part of a ExecuteQuery()
call) will also create the transaction. Definition at line 101 of file transaction.cc.
google::cloud::spanner::v1::Transaction::Transaction | ( | Transaction const & | txn, |
ReadWriteOptions | opts | ||
) |
Transaction
object. Instead, the first request to the server (for example as part of a ExecuteQuery()
call) will also create the transaction. Definition at line 108 of file transaction.cc.
|
default |
|
default |
|
default |
|
default |
|
default |
|
friend |
Definition at line 157 of file transaction.h.
|
friend |
Definition at line 154 of file transaction.h.