Google Cloud Datastore v1 API - Class CommitRequest (4.11.0)

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

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

The request for [Datastore.Commit][google.datastore.v1.Datastore.Commit].

Inheritance

object > CommitRequest

Namespace

Google.Cloud.Datastore.V1

Assembly

Google.Cloud.Datastore.V1.dll

Constructors

CommitRequest()

public CommitRequest()

CommitRequest(CommitRequest)

public CommitRequest(CommitRequest other)
Parameter
Name Description
other CommitRequest

Properties

DatabaseId

public string DatabaseId { get; set; }

The ID of the database against which to make the request.

'(default)' is not allowed; please use empty string '' to refer the default database.

Property Value
Type Description
string

HasTransaction

public bool HasTransaction { get; }

Gets whether the "transaction" field is set

Property Value
Type Description
bool

Mode

public CommitRequest.Types.Mode Mode { get; set; }

The type of commit to perform. Defaults to TRANSACTIONAL.

Property Value
Type Description
CommitRequestTypesMode

Mutations

public RepeatedField<Mutation> Mutations { get; }

The mutations to perform.

When mode is TRANSACTIONAL, mutations affecting a single entity are applied in order. The following sequences of mutations affecting a single entity are not permitted in a single Commit request:

  • insert followed by insert
  • update followed by insert
  • upsert followed by insert
  • delete followed by update

When mode is NON_TRANSACTIONAL, no two mutations may affect a single entity.

Property Value
Type Description
RepeatedFieldMutation

ProjectId

public string ProjectId { get; set; }

Required. The ID of the project against which to make the request.

Property Value
Type Description
string

SingleUseTransaction

public TransactionOptions SingleUseTransaction { get; set; }

Options for beginning a new transaction for this request. The transaction is committed when the request completes. If specified, [TransactionOptions.mode][google.datastore.v1.TransactionOptions] must be [TransactionOptions.ReadWrite][google.datastore.v1.TransactionOptions.ReadWrite].

Property Value
Type Description
TransactionOptions

Transaction

public ByteString Transaction { get; set; }

The identifier of the transaction associated with the commit. A transaction identifier is returned by a call to [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].

Property Value
Type Description
ByteString

TransactionSelectorCase

public CommitRequest.TransactionSelectorOneofCase TransactionSelectorCase { get; }
Property Value
Type Description
CommitRequestTransactionSelectorOneofCase