Google Cloud Spanner C++ Client 2.13.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:
|
explicit |
Transaction
object. Instead, the first request to the server (for example as part of a ExecuteQuery()
call) will also create the transaction.
|
explicit |
Transaction
object. Instead, the first request to the server (for example as part of a ExecuteQuery()
call) will also create the transaction. google::cloud::spanner::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. google::cloud::spanner::Transaction::~Transaction | ( | ) |
|
default |
|
default |
|
default |
|
default |
|
friend |
|
friend |