Class: Google::Apis::SpannerV1::ExecuteBatchDmlRequest
- Inherits:
-
Object
- Object
- Google::Apis::SpannerV1::ExecuteBatchDmlRequest
- 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 ExecuteBatchDml.
Instance Attribute Summary collapse
-
#last_statements ⇒ Boolean
(also: #last_statements?)
Optional.
-
#request_options ⇒ Google::Apis::SpannerV1::RequestOptions
Common request options for various APIs.
-
#seqno ⇒ Fixnum
Required.
-
#statements ⇒ Array<Google::Apis::SpannerV1::Statement>
Required.
-
#transaction ⇒ Google::Apis::SpannerV1::TransactionSelector
This message is used to select the transaction in which a Read or ExecuteSql call runs.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ExecuteBatchDmlRequest
constructor
A new instance of ExecuteBatchDmlRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ExecuteBatchDmlRequest
Returns a new instance of ExecuteBatchDmlRequest.
2612 2613 2614 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2612 def initialize(**args) update!(**args) end |
Instance Attribute Details
#last_statements ⇒ Boolean Also known as: last_statements?
Optional. If set to true, this request marks the end of the transaction.
After these statements execute, you must commit or abort the transaction.
Attempts to execute any other requests against this transaction (including
reads and queries) are rejected. Setting this option might cause some error
reporting to be deferred until commit time (for example, validation of unique
constraints). Given this, successful execution of statements shouldn't be
assumed until a subsequent Commit call completes successfully.
Corresponds to the JSON property lastStatements
2578 2579 2580 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2578 def last_statements @last_statements end |
#request_options ⇒ Google::Apis::SpannerV1::RequestOptions
Common request options for various APIs.
Corresponds to the JSON property requestOptions
2584 2585 2586 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2584 def @request_options end |
#seqno ⇒ Fixnum
Required. A per-transaction sequence number used to identify this request.
This field makes each request idempotent such that if the request is received
multiple times, at most one succeeds. The sequence number must be
monotonically increasing within the transaction. If a request arrives for the
first time with an out-of-order sequence number, the transaction might be
aborted. Replays of previously handled requests yield the same response as the
first execution.
Corresponds to the JSON property seqno
2595 2596 2597 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2595 def seqno @seqno end |
#statements ⇒ Array<Google::Apis::SpannerV1::Statement>
Required. The list of statements to execute in this batch. Statements are
executed serially, such that the effects of statement i are visible to
statement i+1. Each statement must be a DML statement. Execution stops at
the first failed statement; the remaining statements are not executed. Callers
must provide at least one statement.
Corresponds to the JSON property statements
2604 2605 2606 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2604 def statements @statements end |
#transaction ⇒ Google::Apis::SpannerV1::TransactionSelector
This message is used to select the transaction in which a Read or ExecuteSql
call runs. See TransactionOptions for more information about transactions.
Corresponds to the JSON property transaction
2610 2611 2612 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2610 def transaction @transaction end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2617 2618 2619 2620 2621 2622 2623 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2617 def update!(**args) @last_statements = args[:last_statements] if args.key?(:last_statements) @request_options = args[:request_options] if args.key?(:request_options) @seqno = args[:seqno] if args.key?(:seqno) @statements = args[:statements] if args.key?(:statements) @transaction = args[:transaction] if args.key?(:transaction) end |