Class: Google::Apis::SpannerV1::CommitRequest

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CommitRequest

Returns a new instance of CommitRequest.



1230
1231
1232
# File 'lib/google/apis/spanner_v1/classes.rb', line 1230

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#max_commit_delayString

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

Returns:

  • (String)


1191
1192
1193
# File 'lib/google/apis/spanner_v1/classes.rb', line 1191

def max_commit_delay
  @max_commit_delay
end

#mutationsArray<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



1197
1198
1199
# File 'lib/google/apis/spanner_v1/classes.rb', line 1197

def mutations
  @mutations
end

#precommit_tokenGoogle::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



1205
1206
1207
# File 'lib/google/apis/spanner_v1/classes.rb', line 1205

def precommit_token
  @precommit_token
end

#request_optionsGoogle::Apis::SpannerV1::RequestOptions

Common request options for various APIs. Corresponds to the JSON property requestOptions



1210
1211
1212
# File 'lib/google/apis/spanner_v1/classes.rb', line 1210

def request_options
  @request_options
end

#return_commit_statsBoolean 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

Returns:

  • (Boolean)


1216
1217
1218
# File 'lib/google/apis/spanner_v1/classes.rb', line 1216

def return_commit_stats
  @return_commit_stats
end

#single_use_transactionGoogle::Apis::SpannerV1::TransactionOptions

Options to use for transactions. Corresponds to the JSON property singleUseTransaction



1222
1223
1224
# File 'lib/google/apis/spanner_v1/classes.rb', line 1222

def single_use_transaction
  @single_use_transaction
end

#transaction_idString

Commit a previously-started transaction. Corresponds to the JSON property transactionId NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


1228
1229
1230
# File 'lib/google/apis/spanner_v1/classes.rb', line 1228

def transaction_id
  @transaction_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1235
1236
1237
1238
1239
1240
1241
1242
1243
# File 'lib/google/apis/spanner_v1/classes.rb', line 1235

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