Google Cloud Spanner v1 API - Class CommitRequest (5.0.0-beta04)

public sealed class CommitRequest : IMessage<CommitRequest>, IEquatable<CommitRequest>, IDeepCloneable<CommitRequest>, IBufferMessage, IMessage

Reference documentation and code samples for the Google Cloud Spanner v1 API class CommitRequest.

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

Inheritance

object > CommitRequest

Namespace

Google.Cloud.Spanner.V1

Assembly

Google.Cloud.Spanner.V1.dll

Constructors

CommitRequest()

public CommitRequest()

CommitRequest(CommitRequest)

public CommitRequest(CommitRequest other)
Parameter
Name Description
other CommitRequest

Properties

HasTransactionId

public bool HasTransactionId { get; }

Gets whether the "transaction_id" field is set

Property Value
Type Description
bool

MaxCommitDelay

public Duration MaxCommitDelay { get; set; }

Optional. The amount of latency this request is willing to incur in order to improve throughput. If this field is not set, Spanner assumes requests are relatively latency sensitive and automatically determines an appropriate delay time. You can specify a batching delay value between 0 and 500 ms.

Property Value
Type Description
Duration

Mutations

public RepeatedField<Mutation> Mutations { get; }

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

Property Value
Type Description
RepeatedFieldMutation

RequestOptions

public RequestOptions RequestOptions { get; set; }

Common options for this request.

Property Value
Type Description
RequestOptions

ReturnCommitStats

public bool ReturnCommitStats { get; set; }

If true, then statistics related to the transaction will be included in the [CommitResponse][google.spanner.v1.CommitResponse.commit_stats]. Default value is false.

Property Value
Type Description
bool

Session

public string Session { get; set; }

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

Property Value
Type Description
string

SessionAsSessionName

public SessionName SessionAsSessionName { get; set; }

SessionName-typed view over the Session resource name property.

Property Value
Type Description
SessionName

SingleUseTransaction

public TransactionOptions SingleUseTransaction { get; set; }

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.

Property Value
Type Description
TransactionOptions

TransactionCase

public CommitRequest.TransactionOneofCase TransactionCase { get; }
Property Value
Type Description
CommitRequestTransactionOneofCase

TransactionId

public ByteString TransactionId { get; set; }

Commit a previously-started transaction.

Property Value
Type Description
ByteString