Class: Google::Apis::DatastoreV1::CommitRequest
- Inherits:
-
Object
- Object
- Google::Apis::DatastoreV1::CommitRequest
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/datastore_v1/classes.rb,
generated/google/apis/datastore_v1/representations.rb,
generated/google/apis/datastore_v1/representations.rb
Overview
The request for Datastore.Commit.
Instance Attribute Summary collapse
-
#mode ⇒ String
The type of commit to perform.
-
#mutations ⇒ Array<Google::Apis::DatastoreV1::Mutation>
The mutations to perform.
-
#transaction ⇒ String
The identifier of the transaction associated with the commit.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CommitRequest
constructor
A new instance of CommitRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ CommitRequest
Returns a new instance of CommitRequest
253 254 255 |
# File 'generated/google/apis/datastore_v1/classes.rb', line 253 def initialize(**args) update!(**args) end |
Instance Attribute Details
#mode ⇒ String
The type of commit to perform. Defaults to TRANSACTIONAL.
Corresponds to the JSON property mode
237 238 239 |
# File 'generated/google/apis/datastore_v1/classes.rb', line 237 def mode @mode end |
#mutations ⇒ Array<Google::Apis::DatastoreV1::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:
insertfollowed byinsertupdatefollowed byinsertupsertfollowed byinsertdeletefollowed byupdateWhen mode isNON_TRANSACTIONAL, no two mutations may affect a single entity. Corresponds to the JSON propertymutations
251 252 253 |
# File 'generated/google/apis/datastore_v1/classes.rb', line 251 def mutations @mutations end |
#transaction ⇒ String
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
232 233 234 |
# File 'generated/google/apis/datastore_v1/classes.rb', line 232 def transaction @transaction end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
258 259 260 261 262 |
# File 'generated/google/apis/datastore_v1/classes.rb', line 258 def update!(**args) @transaction = args[:transaction] if args.key?(:transaction) @mode = args[:mode] if args.key?(:mode) @mutations = args[:mutations] if args.key?(:mutations) end |