generated/google/apis/spanner_v1/classes.rb in google-api-client-0.30.8 vs generated/google/apis/spanner_v1/classes.rb in google-api-client-0.30.9
- old
+ new
@@ -828,27 +828,30 @@
# Update properties of this object
def update!(**args)
end
end
- # The request for ExecuteBatchDml
+ # The request for ExecuteBatchDml.
class ExecuteBatchDmlRequest
include Google::Apis::Core::Hashable
- # A per-transaction sequence number used to identify this request. This is
- # used in the same space as the seqno in
- # ExecuteSqlRequest. See more details
- # in ExecuteSqlRequest.
+ # 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 will succeed.
+ # 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 may be aborted. Replays of previously
+ # handled requests will yield the same response as the first execution.
# Corresponds to the JSON property `seqno`
# @return [Fixnum]
attr_accessor :seqno
# 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 will stop at the
- # first failed statement; the remaining statements will not run.
- # REQUIRES: `statements_size()` > 0.
+ # 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`
# @return [Array<Google::Apis::SpannerV1::Statement>]
attr_accessor :statements
# This message is used to select the transaction in which a
@@ -870,33 +873,35 @@
@transaction = args[:transaction] if args.key?(:transaction)
end
end
# The response for ExecuteBatchDml. Contains a list
- # of ResultSet, one for each DML statement that has successfully executed.
- # If a statement fails, the error is returned as part of the response payload.
- # Clients can determine whether all DML statements have run successfully, or if
- # a statement failed, using one of the following approaches:
- # 1. Check if `'status'` field is `OkStatus`.
- # 2. Check if `result_sets_size()` equals the number of statements in
- # ExecuteBatchDmlRequest.
- # Example 1: A request with 5 DML statements, all executed successfully.
- # Result: A response with 5 ResultSets, one for each statement in the same
- # order, and an `OkStatus`.
- # Example 2: A request with 5 DML statements. The 3rd statement has a syntax
- # error.
- # Result: A response with 2 ResultSets, for the first 2 statements that
- # run successfully, and a syntax error (`INVALID_ARGUMENT`) status. From
- # `result_set_size()` client can determine that the 3rd statement has failed.
+ # 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.
class ExecuteBatchDmlResponse
include Google::Apis::Core::Hashable
- # ResultSets, one for each statement in the request that ran successfully, in
- # the same order as the statements in the request. Each ResultSet will
- # not contain any rows. The ResultSetStats in each ResultSet will
- # contain the number of rows modified by the statement.
- # Only the first ResultSet in the response contains a valid
+ # 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`
# @return [Array<Google::Apis::SpannerV1::ResultSet>]
attr_accessor :result_sets
@@ -935,21 +940,18 @@
# about SQL types.
# Corresponds to the JSON property `paramTypes`
# @return [Hash<String,Google::Apis::SpannerV1::Type>]
attr_accessor :param_types
- # The SQL string can contain parameter placeholders. A parameter
- # placeholder consists of `'@'` followed by the parameter
- # name. Parameter names consist of any combination of letters,
- # numbers, and underscores.
+ # Parameter names and values that bind to placeholders in the SQL string.
+ # A parameter placeholder consists of the `@` character followed by the
+ # parameter name (for example, `@firstName`). Parameter names can contain
+ # letters, numbers, and underscores.
# Parameters can appear anywhere that a literal value is expected. The same
# parameter name can be used more than once, for example:
# `"WHERE id > @msg_id AND id < @msg_id + 100"`
- # It is an error to execute an SQL statement with unbound parameters.
- # Parameter values are specified using `params`, which is a JSON
- # object whose keys are parameter names, and whose values are the
- # corresponding parameter values.
+ # It is an error to execute a SQL statement with unbound parameters.
# Corresponds to the JSON property `params`
# @return [Hash<String,Object>]
attr_accessor :params
# If present, results will be restricted to the specified partition
@@ -977,11 +979,11 @@
# Corresponds to the JSON property `resumeToken`
# NOTE: Values are automatically base64 encoded/decoded in the client library.
# @return [String]
attr_accessor :resume_token
- # A per-transaction sequence number used to identify this request. This
+ # 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 will succeed.
# 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 may be aborted. Replays of previously
@@ -1821,21 +1823,18 @@
# about SQL types.
# Corresponds to the JSON property `paramTypes`
# @return [Hash<String,Google::Apis::SpannerV1::Type>]
attr_accessor :param_types
- # The SQL query string can contain parameter placeholders. A parameter
- # placeholder consists of `'@'` followed by the parameter
- # name. Parameter names consist of any combination of letters,
- # numbers, and underscores.
+ # Parameter names and values that bind to placeholders in the SQL string.
+ # A parameter placeholder consists of the `@` character followed by the
+ # parameter name (for example, `@firstName`). Parameter names can contain
+ # letters, numbers, and underscores.
# Parameters can appear anywhere that a literal value is expected. The same
# parameter name can be used more than once, for example:
# `"WHERE id > @msg_id AND id < @msg_id + 100"`
- # It is an error to execute an SQL query with unbound parameters.
- # Parameter values are specified using `params`, which is a JSON
- # object whose keys are parameter names, and whose values are the
- # corresponding parameter values.
+ # It is an error to execute a SQL statement with unbound parameters.
# Corresponds to the JSON property `params`
# @return [Hash<String,Object>]
attr_accessor :params
# Options for a PartitionQueryRequest and
@@ -2636,20 +2635,17 @@
# about SQL types.
# Corresponds to the JSON property `paramTypes`
# @return [Hash<String,Google::Apis::SpannerV1::Type>]
attr_accessor :param_types
- # The DML string can contain parameter placeholders. A parameter
- # placeholder consists of `'@'` followed by the parameter
- # name. Parameter names consist of any combination of letters,
- # numbers, and underscores.
+ # Parameter names and values that bind to placeholders in the DML string.
+ # A parameter placeholder consists of the `@` character followed by the
+ # parameter name (for example, `@firstName`). Parameter names can contain
+ # letters, numbers, and underscores.
# Parameters can appear anywhere that a literal value is expected. The
# same parameter name can be used more than once, for example:
# `"WHERE id > @msg_id AND id < @msg_id + 100"`
- # It is an error to execute an SQL statement with unbound parameters.
- # Parameter values are specified using `params`, which is a JSON
- # object whose keys are parameter names, and whose values are the
- # corresponding parameter values.
+ # It is an error to execute a SQL statement with unbound parameters.
# Corresponds to the JSON property `params`
# @return [Hash<String,Object>]
attr_accessor :params
# Required. The DML string.