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.



4595
4596
4597
# File 'lib/google/apis/spanner_v1/classes.rb', line 4595

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



4580
4581
4582
# File 'lib/google/apis/spanner_v1/classes.rb', line 4580

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



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

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



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

def old_values
  @old_values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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