Google Cloud Datastore v1 API - Class CommitRequest (4.4.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
NameDescription
otherCommitRequest

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
TypeDescription
String

Mode

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

The type of commit to perform. Defaults to TRANSACTIONAL.

Property Value
TypeDescription
CommitRequest.Types.Mode

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
TypeDescription
RepeatedField<Mutation>

ProjectId

public string ProjectId { get; set; }

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

Property Value
TypeDescription
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.mode] must be [TransactionOptions.ReadWrite][google.datastore.v1.TransactionOptions.ReadWrite].

Property Value
TypeDescription
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
TypeDescription
ByteString

TransactionSelectorCase

public CommitRequest.TransactionSelectorOneofCase TransactionSelectorCase { get; }
Property Value
TypeDescription
CommitRequest.TransactionSelectorOneofCase