class CommitRequest extends Message

The request for [Commit][google.spanner.v1.Spanner.Commit].

Protobuf type Google\Spanner\V1\CommitRequest

Properties

protected $transaction

Methods

__construct()

No description

string
getSession()

Required. The session in which the transaction to be committed is running.

setSession(string $var)

Required. The session in which the transaction to be committed is running.

string
getTransactionId()

Commit a previously-started transaction.

setTransactionId(string $var)

Commit a previously-started transaction.

getSingleUseTransaction()

Execute mutations in a temporary transaction. Note that unlike commit of a previously-started transaction, commit with a temporary transaction is non-idempotent. That is, if the CommitRequest is sent to Cloud Spanner more than once (for instance, due to retries in the application, or in the transport library), it is possible that the mutations are executed more than once. If this is undesirable, use [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction] and [Commit][google.spanner.v1.Spanner.Commit] instead.

setSingleUseTransaction(TransactionOptions $var)

Execute mutations in a temporary transaction. Note that unlike commit of a previously-started transaction, commit with a temporary transaction is non-idempotent. That is, if the CommitRequest is sent to Cloud Spanner more than once (for instance, due to retries in the application, or in the transport library), it is possible that the mutations are executed more than once. If this is undesirable, use [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction] and [Commit][google.spanner.v1.Spanner.Commit] instead.

RepeatedField
getMutations()

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

setMutations(array|RepeatedField $var)

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

string
getTransaction()

No description

Details

at line 34
__construct()

at line 45
string getSession()

Required. The session in which the transaction to be committed is running.

Generated from protobuf field string session = 1;

Return Value

string

at line 56
setSession(string $var)

Required. The session in which the transaction to be committed is running.

Generated from protobuf field string session = 1;

Parameters

string $var

at line 68
string getTransactionId()

Commit a previously-started transaction.

Generated from protobuf field bytes transaction_id = 2;

Return Value

string

at line 79
setTransactionId(string $var)

Commit a previously-started transaction.

Generated from protobuf field bytes transaction_id = 2;

Parameters

string $var

at line 99
TransactionOptions getSingleUseTransaction()

Execute mutations in a temporary transaction. Note that unlike commit of a previously-started transaction, commit with a temporary transaction is non-idempotent. That is, if the CommitRequest is sent to Cloud Spanner more than once (for instance, due to retries in the application, or in the transport library), it is possible that the mutations are executed more than once. If this is undesirable, use [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction] and [Commit][google.spanner.v1.Spanner.Commit] instead.

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

Return Value

TransactionOptions

at line 118
setSingleUseTransaction(TransactionOptions $var)

Execute mutations in a temporary transaction. Note that unlike commit of a previously-started transaction, commit with a temporary transaction is non-idempotent. That is, if the CommitRequest is sent to Cloud Spanner more than once (for instance, due to retries in the application, or in the transport library), it is possible that the mutations are executed more than once. If this is undesirable, use [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction] and [Commit][google.spanner.v1.Spanner.Commit] instead.

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

Parameters

TransactionOptions $var

at line 132
RepeatedField getMutations()

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

Generated from protobuf field repeated .google.spanner.v1.Mutation mutations = 4;

Return Value

RepeatedField

at line 145
setMutations(array|RepeatedField $var)

The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.

Generated from protobuf field repeated .google.spanner.v1.Mutation mutations = 4;

Parameters

array|RepeatedField $var

at line 154
string getTransaction()

Return Value

string