Class: Google::Apis::SpannerV1::Write
- Inherits:
-
Object
- Object
- Google::Apis::SpannerV1::Write
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/spanner_v1/classes.rb,
generated/google/apis/spanner_v1/representations.rb,
generated/google/apis/spanner_v1/representations.rb
Overview
Arguments to insert, update, insert_or_update, and replace operations.
Instance Attribute Summary collapse
-
#columns ⇒ Array<String>
The names of the columns in table to be written.
-
#table ⇒ String
Required.
-
#values ⇒ Array<Array<Object>>
The values to be written.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Write
constructor
A new instance of Write.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Write
Returns a new instance of Write.
3972 3973 3974 |
# File 'generated/google/apis/spanner_v1/classes.rb', line 3972 def initialize(**args) update!(**args) end |
Instance Attribute Details
#columns ⇒ Array<String>
The names of the columns in table to be written.
The list of columns must contain enough columns to allow
Cloud Spanner to derive values for all primary key columns in the
row(s) to be modified.
Corresponds to the JSON property columns
3953 3954 3955 |
# File 'generated/google/apis/spanner_v1/classes.rb', line 3953 def columns @columns end |
#table ⇒ String
Required. The table whose rows will be written.
Corresponds to the JSON property table
3958 3959 3960 |
# File 'generated/google/apis/spanner_v1/classes.rb', line 3958 def table @table end |
#values ⇒ Array<Array<Object>>
The values to be written. values
can contain more than one
list of values. If it does, then multiple rows are written, one
for each entry in values
. Each list in values
must have
exactly as many entries as there are entries in columns
above. Sending multiple lists is equivalent to sending multiple
Mutation
s, each containing one values
entry and repeating
table and columns. Individual values in each list are
encoded as described here.
Corresponds to the JSON property values
3970 3971 3972 |
# File 'generated/google/apis/spanner_v1/classes.rb', line 3970 def values @values end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3977 3978 3979 3980 3981 |
# File 'generated/google/apis/spanner_v1/classes.rb', line 3977 def update!(**args) @columns = args[:columns] if args.key?(:columns) @table = args[:table] if args.key?(:table) @values = args[:values] if args.key?(:values) end |