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.



4434
4435
4436
# File 'lib/google/apis/spanner_v1/classes.rb', line 4434

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



4419
4420
4421
# File 'lib/google/apis/spanner_v1/classes.rb', line 4419

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



4425
4426
4427
# File 'lib/google/apis/spanner_v1/classes.rb', line 4425

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



4432
4433
4434
# File 'lib/google/apis/spanner_v1/classes.rb', line 4432

def old_values
  @old_values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4439
4440
4441
4442
4443
# File 'lib/google/apis/spanner_v1/classes.rb', line 4439

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