Class: Google::Apis::DatastoreV1beta3::CommitRequest

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/datastore_v1beta3/classes.rb,
lib/google/apis/datastore_v1beta3/representations.rb,
lib/google/apis/datastore_v1beta3/representations.rb

Overview

The request for Datastore.Commit.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CommitRequest

Returns a new instance of CommitRequest.



321
322
323
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 321

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#modeString

The type of commit to perform. Defaults to TRANSACTIONAL. Corresponds to the JSON property mode

Returns:

  • (String)


302
303
304
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 302

def mode
  @mode
end

#mutationsArray<Google::Apis::DatastoreV1beta3::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. Corresponds to the JSON property mutations



312
313
314
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 312

def mutations
  @mutations
end

#transactionString

The identifier of the transaction associated with the commit. A transaction identifier is returned by a call to Datastore.BeginTransaction. Corresponds to the JSON property transaction NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


319
320
321
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 319

def transaction
  @transaction
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



326
327
328
329
330
# File 'lib/google/apis/datastore_v1beta3/classes.rb', line 326

def update!(**args)
  @mode = args[:mode] if args.key?(:mode)
  @mutations = args[:mutations] if args.key?(:mutations)
  @transaction = args[:transaction] if args.key?(:transaction)
end