Class: Google::Apis::SpannerV1::Mutation

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

Overview

A modification to one or more Cloud Spanner rows. Mutations can be applied to a Cloud Spanner database by sending them in a Commit call.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Mutation

Returns a new instance of Mutation



3284
3285
3286
# File 'generated/google/apis/spanner_v1/classes.rb', line 3284

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

Instance Attribute Details

#deleteGoogle::Apis::SpannerV1::Delete

Arguments to delete operations. Corresponds to the JSON property delete



3282
3283
3284
# File 'generated/google/apis/spanner_v1/classes.rb', line 3282

def delete
  @delete
end

#insertGoogle::Apis::SpannerV1::Write

Arguments to insert, update, insert_or_update, and replace operations. Corresponds to the JSON property insert



3259
3260
3261
# File 'generated/google/apis/spanner_v1/classes.rb', line 3259

def insert
  @insert
end

#insert_or_updateGoogle::Apis::SpannerV1::Write

Arguments to insert, update, insert_or_update, and replace operations. Corresponds to the JSON property insertOrUpdate



3265
3266
3267
# File 'generated/google/apis/spanner_v1/classes.rb', line 3265

def insert_or_update
  @insert_or_update
end

#replaceGoogle::Apis::SpannerV1::Write

Arguments to insert, update, insert_or_update, and replace operations. Corresponds to the JSON property replace



3277
3278
3279
# File 'generated/google/apis/spanner_v1/classes.rb', line 3277

def replace
  @replace
end

#updateGoogle::Apis::SpannerV1::Write

Arguments to insert, update, insert_or_update, and replace operations. Corresponds to the JSON property update



3271
3272
3273
# File 'generated/google/apis/spanner_v1/classes.rb', line 3271

def update
  @update
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3289
3290
3291
3292
3293
3294
3295
# File 'generated/google/apis/spanner_v1/classes.rb', line 3289

def update!(**args)
  @insert = args[:insert] if args.key?(:insert)
  @insert_or_update = args[:insert_or_update] if args.key?(:insert_or_update)
  @update = args[:update] if args.key?(:update)
  @replace = args[:replace] if args.key?(:replace)
  @delete = args[:delete] if args.key?(:delete)
end