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.



1195
1196
1197
# File 'lib/google/apis/spanner_v1/classes.rb', line 1195

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)


1156
1157
1158
# File 'lib/google/apis/spanner_v1/classes.rb', line 1156

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



1162
1163
1164
# File 'lib/google/apis/spanner_v1/classes.rb', line 1162

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



1170
1171
1172
# File 'lib/google/apis/spanner_v1/classes.rb', line 1170

def precommit_token
  @precommit_token
end

#request_optionsGoogle::Apis::SpannerV1::RequestOptions

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



1175
1176
1177
# File 'lib/google/apis/spanner_v1/classes.rb', line 1175

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)


1181
1182
1183
# File 'lib/google/apis/spanner_v1/classes.rb', line 1181

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



1187
1188
1189
# File 'lib/google/apis/spanner_v1/classes.rb', line 1187

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)


1193
1194
1195
# File 'lib/google/apis/spanner_v1/classes.rb', line 1193

def transaction_id
  @transaction_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1200
1201
1202
1203
1204
1205
1206
1207
1208
# File 'lib/google/apis/spanner_v1/classes.rb', line 1200

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