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.
1315 1316 1317 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1315 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
1276 1277 1278 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1276 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
1282 1283 1284 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1282 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
1290 1291 1292 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1290 def precommit_token @precommit_token end |
#request_options ⇒ Google::Apis::SpannerV1::RequestOptions
Common request options for various APIs.
Corresponds to the JSON property requestOptions
1295 1296 1297 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1295 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
1301 1302 1303 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1301 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
1307 1308 1309 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1307 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.
1313 1314 1315 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1313 def transaction_id @transaction_id end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1320 1321 1322 1323 1324 1325 1326 1327 1328 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1320 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 |