Class: Google::Apis::SpannerV1::Mod
- Inherits:
-
Object
- Object
- Google::Apis::SpannerV1::Mod
- 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
-
#keys ⇒ Array<Google::Apis::SpannerV1::ModValue>
Returns the value of the primary key of the modified row.
-
#new_values ⇒ Array<Google::Apis::SpannerV1::ModValue>
Returns the new values after the change for the modified columns.
-
#old_values ⇒ Array<Google::Apis::SpannerV1::ModValue>
Returns the old values before the change for the modified columns.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Mod
constructor
A new instance of Mod.
-
#update!(**args) ⇒ Object
Update properties of this object.
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
#keys ⇒ Array<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_values ⇒ Array<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_values ⇒ Array<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 |