Class: Google::Apis::SpannerV1::Mod

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 mod describes all data changes in a watched table row.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Mod

Returns a new instance of Mod.



4602
4603
4604
# File 'lib/google/apis/spanner_v1/classes.rb', line 4602

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

Instance Attribute Details

#keysArray<Google::Apis::SpannerV1::ModValue>

Returns the value of the primary key of the modified row. Corresponds to the JSON property keys



4587
4588
4589
# File 'lib/google/apis/spanner_v1/classes.rb', line 4587

def keys
  @keys
end

#new_valuesArray<Google::Apis::SpannerV1::ModValue>

Returns the new values after the change for the modified columns. Always empty for DELETE. Corresponds to the JSON property newValues



4593
4594
4595
# File 'lib/google/apis/spanner_v1/classes.rb', line 4593

def new_values
  @new_values
end

#old_valuesArray<Google::Apis::SpannerV1::ModValue>

Returns the old values before the change for the modified columns. Always empty for INSERT, or if old values are not being captured specified by value_capture_type. Corresponds to the JSON property oldValues



4600
4601
4602
# File 'lib/google/apis/spanner_v1/classes.rb', line 4600

def old_values
  @old_values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4607
4608
4609
4610
4611
# File 'lib/google/apis/spanner_v1/classes.rb', line 4607

def update!(**args)
  @keys = args[:keys] if args.key?(:keys)
  @new_values = args[:new_values] if args.key?(:new_values)
  @old_values = args[:old_values] if args.key?(:old_values)
end