Firestore in Datastore mode V1 API - Class Google::Cloud::Datastore::V1::CommitRequest (v0.15.0)

Reference documentation and code samples for the Firestore in Datastore mode V1 API class Google::Cloud::Datastore::V1::CommitRequest.

The request for Datastore.Commit.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#database_id

def database_id() -> ::String
Returns
  • (::String) — The ID of the database against which to make the request.

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

#database_id=

def database_id=(value) -> ::String
Parameter
  • value (::String) — The ID of the database against which to make the request.

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

Returns
  • (::String) — The ID of the database against which to make the request.

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

#mode

def mode() -> ::Google::Cloud::Datastore::V1::CommitRequest::Mode
Returns

#mode=

def mode=(value) -> ::Google::Cloud::Datastore::V1::CommitRequest::Mode
Parameter
Returns

#mutations

def mutations() -> ::Array<::Google::Cloud::Datastore::V1::Mutation>
Returns
  • (::Array<::Google::Cloud::Datastore::V1::Mutation>) — 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.

#mutations=

def mutations=(value) -> ::Array<::Google::Cloud::Datastore::V1::Mutation>
Parameter
  • value (::Array<::Google::Cloud::Datastore::V1::Mutation>) — 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.

Returns
  • (::Array<::Google::Cloud::Datastore::V1::Mutation>) — 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.

#project_id

def project_id() -> ::String
Returns
  • (::String) — Required. The ID of the project against which to make the request.

#project_id=

def project_id=(value) -> ::String
Parameter
  • value (::String) — Required. The ID of the project against which to make the request.
Returns
  • (::String) — Required. The ID of the project against which to make the request.

#single_use_transaction

def single_use_transaction() -> ::Google::Cloud::Datastore::V1::TransactionOptions
Returns

#single_use_transaction=

def single_use_transaction=(value) -> ::Google::Cloud::Datastore::V1::TransactionOptions
Parameter
Returns

#transaction

def transaction() -> ::String
Returns
  • (::String) — The identifier of the transaction associated with the commit. A transaction identifier is returned by a call to Datastore.BeginTransaction.

#transaction=

def transaction=(value) -> ::String
Parameter
  • value (::String) — The identifier of the transaction associated with the commit. A transaction identifier is returned by a call to Datastore.BeginTransaction.
Returns
  • (::String) — The identifier of the transaction associated with the commit. A transaction identifier is returned by a call to Datastore.BeginTransaction.