Class: Google::Apis::SpannerV1::CommitRequest
- Inherits:
-
Object
- Object
- Google::Apis::SpannerV1::CommitRequest
- 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
The request for Commit.
Instance Attribute Summary collapse
-
#max_commit_delay ⇒ String
Optional.
-
#mutations ⇒ Array<Google::Apis::SpannerV1::Mutation>
The mutations to be executed when this transaction commits.
-
#precommit_token ⇒ Google::Apis::SpannerV1::MultiplexedSessionPrecommitToken
When a read-write transaction is executed on a multiplexed session, this precommit token is sent back to the client as a part of the Transaction message in the BeginTransaction response and also as a part of the ResultSet and PartialResultSet responses.
-
#request_options ⇒ Google::Apis::SpannerV1::RequestOptions
Common request options for various APIs.
-
#return_commit_stats ⇒ Boolean
(also: #return_commit_stats?)
If
true, then statistics related to the transaction is included in the CommitResponse. -
#single_use_transaction ⇒ Google::Apis::SpannerV1::TransactionOptions
Options to use for transactions.
-
#transaction_id ⇒ String
Commit a previously-started transaction.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CommitRequest
constructor
A new instance of CommitRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ CommitRequest
Returns a new instance of CommitRequest.
1318 1319 1320 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1318 def initialize(**args) update!(**args) end |
Instance Attribute Details
#max_commit_delay ⇒ String
Optional. The amount of latency this request is configured to incur in order
to improve throughput. If this field isn't set, Spanner assumes requests are
relatively latency sensitive and automatically determines an appropriate delay
time. You can specify a commit delay value between 0 and 500 ms.
Corresponds to the JSON property maxCommitDelay
1279 1280 1281 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1279 def max_commit_delay @max_commit_delay end |
#mutations ⇒ Array<Google::Apis::SpannerV1::Mutation>
The mutations to be executed when this transaction commits. All mutations are
applied atomically, in the order they appear in this list.
Corresponds to the JSON property mutations
1285 1286 1287 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1285 def mutations @mutations end |
#precommit_token ⇒ Google::Apis::SpannerV1::MultiplexedSessionPrecommitToken
When a read-write transaction is executed on a multiplexed session, this
precommit token is sent back to the client as a part of the Transaction
message in the BeginTransaction response and also as a part of the ResultSet
and PartialResultSet responses.
Corresponds to the JSON property precommitToken
1293 1294 1295 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1293 def precommit_token @precommit_token end |
#request_options ⇒ Google::Apis::SpannerV1::RequestOptions
Common request options for various APIs.
Corresponds to the JSON property requestOptions
1298 1299 1300 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1298 def @request_options end |
#return_commit_stats ⇒ Boolean Also known as: return_commit_stats?
If true, then statistics related to the transaction is included in the
CommitResponse. Default value is false.
Corresponds to the JSON property returnCommitStats
1304 1305 1306 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1304 def return_commit_stats @return_commit_stats end |
#single_use_transaction ⇒ Google::Apis::SpannerV1::TransactionOptions
Options to use for transactions.
Corresponds to the JSON property singleUseTransaction
1310 1311 1312 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1310 def single_use_transaction @single_use_transaction end |
#transaction_id ⇒ String
Commit a previously-started transaction.
Corresponds to the JSON property transactionId
NOTE: Values are automatically base64 encoded/decoded in the client library.
1316 1317 1318 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1316 def transaction_id @transaction_id end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1323 1324 1325 1326 1327 1328 1329 1330 1331 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1323 def update!(**args) @max_commit_delay = args[:max_commit_delay] if args.key?(:max_commit_delay) @mutations = args[:mutations] if args.key?(:mutations) @precommit_token = args[:precommit_token] if args.key?(:precommit_token) @request_options = args[:request_options] if args.key?(:request_options) @return_commit_stats = args[:return_commit_stats] if args.key?(:return_commit_stats) @single_use_transaction = args[:single_use_transaction] if args.key?(:single_use_transaction) @transaction_id = args[:transaction_id] if args.key?(:transaction_id) end |