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

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/spanner_v1/classes.rb,
lib/google/apis/spanner_v1/representations.rb,
lib/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

Constructor Details

#initialize(**args) ⇒ Mutation

Returns a new instance of Mutation.



4790
4791
4792
# File 'lib/google/apis/spanner_v1/classes.rb', line 4790

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

Instance Attribute Details

#ackGoogle::Apis::SpannerV1::Ack

Arguments to ack operations. Corresponds to the JSON property ack



4758
4759
4760
# File 'lib/google/apis/spanner_v1/classes.rb', line 4758

def ack
  @ack
end

#deleteGoogle::Apis::SpannerV1::Delete

Arguments to delete operations. Corresponds to the JSON property delete



4763
4764
4765
# File 'lib/google/apis/spanner_v1/classes.rb', line 4763

def delete
  @delete
end

#insertGoogle::Apis::SpannerV1::Write

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



4768
4769
4770
# File 'lib/google/apis/spanner_v1/classes.rb', line 4768

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



4773
4774
4775
# File 'lib/google/apis/spanner_v1/classes.rb', line 4773

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



4778
4779
4780
# File 'lib/google/apis/spanner_v1/classes.rb', line 4778

def replace
  @replace
end

#send_propGoogle::Apis::SpannerV1::SendProp

Arguments to send operations. Corresponds to the JSON property send



4783
4784
4785
# File 'lib/google/apis/spanner_v1/classes.rb', line 4783

def send_prop
  @send_prop
end

#updateGoogle::Apis::SpannerV1::Write

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



4788
4789
4790
# File 'lib/google/apis/spanner_v1/classes.rb', line 4788

def update
  @update
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4795
4796
4797
4798
4799
4800
4801
4802
4803
# File 'lib/google/apis/spanner_v1/classes.rb', line 4795

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