Class: Google::Apis::SpannerV1::ExecuteBatchDmlResponse
- Inherits:
-
Object
- Object
- Google::Apis::SpannerV1::ExecuteBatchDmlResponse
- 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 response for ExecuteBatchDml. Contains a list of ResultSet messages, one
for each DML statement that has successfully executed, in the same order as
the statements in the request. If a statement fails, the status in the
response body identifies the cause of the failure. To check for DML statements
that failed, use the following approach: 1. Check the status in the response
message. The google.rpc.Code enum value OK indicates that all statements
were executed successfully. 2. If the status was not OK, check the number of
result sets in the response. If the response contains N ResultSet messages,
then statement N+1 in the request failed. Example 1: * Request: 5 DML
statements, all executed successfully. * Response: 5 ResultSet messages, with
the status OK. Example 2: * Request: 5 DML statements. The third statement
has a syntax error. * Response: 2 ResultSet messages, and a syntax error (
INVALID_ARGUMENT) status. The number of ResultSet messages indicates that the
third statement failed, and the fourth and fifth statements were not executed.
Instance Attribute Summary collapse
-
#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.
-
#result_sets ⇒ Array<Google::Apis::SpannerV1::ResultSet>
One ResultSet for each statement in the request that ran successfully, in the same order as the statements in the request.
-
#status ⇒ Google::Apis::SpannerV1::Status
The
Statustype defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ExecuteBatchDmlResponse
constructor
A new instance of ExecuteBatchDmlResponse.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ExecuteBatchDmlResponse
Returns a new instance of ExecuteBatchDmlResponse.
2595 2596 2597 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2595 def initialize(**args) update!(**args) end |
Instance Attribute Details
#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
2574 2575 2576 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2574 def precommit_token @precommit_token end |
#result_sets ⇒ Array<Google::Apis::SpannerV1::ResultSet>
One ResultSet for each statement in the request that ran successfully, in the
same order as the statements in the request. Each ResultSet does not contain
any rows. The ResultSetStats in each ResultSet contain the number of rows
modified by the statement. Only the first ResultSet in the response contains
valid ResultSetMetadata.
Corresponds to the JSON property resultSets
2583 2584 2585 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2583 def result_sets @result_sets end |
#status ⇒ Google::Apis::SpannerV1::Status
The Status type defines a logical error model that is suitable for different
programming environments, including REST APIs and RPC APIs. It is used by
gRPC. Each Status message contains three pieces of
data: error code, error message, and error details. You can find out more
about this error model and how to work with it in the API Design Guide.
Corresponds to the JSON property status
2593 2594 2595 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2593 def status @status end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2600 2601 2602 2603 2604 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2600 def update!(**args) @precommit_token = args[:precommit_token] if args.key?(:precommit_token) @result_sets = args[:result_sets] if args.key?(:result_sets) @status = args[:status] if args.key?(:status) end |