class TransactionSelector extends Message

This message is used to select the transaction in which a [Read][google.spanner.v1.Spanner.Read] or [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] call runs.

See [TransactionOptions][google.spanner.v1.TransactionOptions] for more information about transactions.

Protobuf type Google\Spanner\V1\TransactionSelector

Properties

protected $selector

Methods

__construct()

No description

getSingleUse()

Execute the read or SQL query in a temporary transaction.

setSingleUse(TransactionOptions $var)

Execute the read or SQL query in a temporary transaction.

string
getId()

Execute the read or SQL query in a previously-started transaction.

setId(string $var)

Execute the read or SQL query in a previously-started transaction.

getBegin()

Begin a new transaction and execute this read or SQL query in it. The transaction ID of the new transaction is returned in [ResultSetMetadata.transaction][google.spanner.v1.ResultSetMetadata.transaction], which is a [Transaction][google.spanner.v1.Transaction].

setBegin(TransactionOptions $var)

Begin a new transaction and execute this read or SQL query in it. The transaction ID of the new transaction is returned in [ResultSetMetadata.transaction][google.spanner.v1.ResultSetMetadata.transaction], which is a [Transaction][google.spanner.v1.Transaction].

string
getSelector()

No description

Details

at line 23
__construct()

at line 36
TransactionOptions getSingleUse()

Execute the read or SQL query in a temporary transaction.

This is the most efficient way to execute a transaction that consists of a single SQL query.

Generated from protobuf field .google.spanner.v1.TransactionOptions single_use = 1;

Return Value

TransactionOptions

at line 49
setSingleUse(TransactionOptions $var)

Execute the read or SQL query in a temporary transaction.

This is the most efficient way to execute a transaction that consists of a single SQL query.

Generated from protobuf field .google.spanner.v1.TransactionOptions single_use = 1;

Parameters

TransactionOptions $var

at line 61
string getId()

Execute the read or SQL query in a previously-started transaction.

Generated from protobuf field bytes id = 2;

Return Value

string

at line 72
setId(string $var)

Execute the read or SQL query in a previously-started transaction.

Generated from protobuf field bytes id = 2;

Parameters

string $var

at line 86
TransactionOptions getBegin()

Begin a new transaction and execute this read or SQL query in it. The transaction ID of the new transaction is returned in [ResultSetMetadata.transaction][google.spanner.v1.ResultSetMetadata.transaction], which is a [Transaction][google.spanner.v1.Transaction].

Generated from protobuf field .google.spanner.v1.TransactionOptions begin = 3;

Return Value

TransactionOptions

at line 99
setBegin(TransactionOptions $var)

Begin a new transaction and execute this read or SQL query in it. The transaction ID of the new transaction is returned in [ResultSetMetadata.transaction][google.spanner.v1.ResultSetMetadata.transaction], which is a [Transaction][google.spanner.v1.Transaction].

Generated from protobuf field .google.spanner.v1.TransactionOptions begin = 3;

Parameters

TransactionOptions $var

at line 108
string getSelector()

Return Value

string