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.
4510 4511 4512 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 4510 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
4495 4496 4497 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 4495 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
4501 4502 4503 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 4501 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
4508 4509 4510 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 4508 def old_values @old_values end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4515 4516 4517 4518 4519 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 4515 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 |