Class: Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest
- Inherits:
-
Object
- Object
- Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/spanner/v1/spanner.rb
Overview
The request for ExecuteBatchDml.
Defined Under Namespace
Classes: Statement
Instance Attribute Summary collapse
-
#request_options ⇒ ::Google::Cloud::Spanner::V1::RequestOptions
Common options for this request.
-
#seqno ⇒ ::Integer
Required.
-
#session ⇒ ::String
Required.
-
#statements ⇒ ::Array<::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest::Statement>
Required.
-
#transaction ⇒ ::Google::Cloud::Spanner::V1::TransactionSelector
Required.
Instance Attribute Details
#request_options ⇒ ::Google::Cloud::Spanner::V1::RequestOptions
Returns Common options for this request.
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 |
# File 'proto_docs/google/spanner/v1/spanner.rb', line 427 class ExecuteBatchDmlRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A single DML statement. # @!attribute [rw] sql # @return [::String] # Required. The DML string. # @!attribute [rw] params # @return [::Google::Protobuf::Struct] # 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 a SQL statement with unbound parameters. # @!attribute [rw] param_types # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Spanner::V1::Type}] # It is not always possible for Cloud Spanner to infer the right SQL type # from a JSON value. For example, values of type `BYTES` and values # of type `STRING` both appear in {::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest::Statement#params params} as JSON strings. # # In these cases, `param_types` can be used to specify the exact # SQL type for some or all of the SQL statement parameters. See the # definition of {::Google::Cloud::Spanner::V1::Type Type} for more information # about SQL types. class Statement include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Spanner::V1::Type] class ParamTypesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#seqno ⇒ ::Integer
Returns 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 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.
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 |
# File 'proto_docs/google/spanner/v1/spanner.rb', line 427 class ExecuteBatchDmlRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A single DML statement. # @!attribute [rw] sql # @return [::String] # Required. The DML string. # @!attribute [rw] params # @return [::Google::Protobuf::Struct] # 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 a SQL statement with unbound parameters. # @!attribute [rw] param_types # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Spanner::V1::Type}] # It is not always possible for Cloud Spanner to infer the right SQL type # from a JSON value. For example, values of type `BYTES` and values # of type `STRING` both appear in {::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest::Statement#params params} as JSON strings. # # In these cases, `param_types` can be used to specify the exact # SQL type for some or all of the SQL statement parameters. See the # definition of {::Google::Cloud::Spanner::V1::Type Type} for more information # about SQL types. class Statement include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Spanner::V1::Type] class ParamTypesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#session ⇒ ::String
Returns Required. The session in which the DML statements should be performed.
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 |
# File 'proto_docs/google/spanner/v1/spanner.rb', line 427 class ExecuteBatchDmlRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A single DML statement. # @!attribute [rw] sql # @return [::String] # Required. The DML string. # @!attribute [rw] params # @return [::Google::Protobuf::Struct] # 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 a SQL statement with unbound parameters. # @!attribute [rw] param_types # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Spanner::V1::Type}] # It is not always possible for Cloud Spanner to infer the right SQL type # from a JSON value. For example, values of type `BYTES` and values # of type `STRING` both appear in {::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest::Statement#params params} as JSON strings. # # In these cases, `param_types` can be used to specify the exact # SQL type for some or all of the SQL statement parameters. See the # definition of {::Google::Cloud::Spanner::V1::Type Type} for more information # about SQL types. class Statement include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Spanner::V1::Type] class ParamTypesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#statements ⇒ ::Array<::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest::Statement>
Returns 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.
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 |
# File 'proto_docs/google/spanner/v1/spanner.rb', line 427 class ExecuteBatchDmlRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A single DML statement. # @!attribute [rw] sql # @return [::String] # Required. The DML string. # @!attribute [rw] params # @return [::Google::Protobuf::Struct] # 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 a SQL statement with unbound parameters. # @!attribute [rw] param_types # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Spanner::V1::Type}] # It is not always possible for Cloud Spanner to infer the right SQL type # from a JSON value. For example, values of type `BYTES` and values # of type `STRING` both appear in {::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest::Statement#params params} as JSON strings. # # In these cases, `param_types` can be used to specify the exact # SQL type for some or all of the SQL statement parameters. See the # definition of {::Google::Cloud::Spanner::V1::Type Type} for more information # about SQL types. class Statement include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Spanner::V1::Type] class ParamTypesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#transaction ⇒ ::Google::Cloud::Spanner::V1::TransactionSelector
Returns Required. The transaction to use. Must be a read-write transaction.
To protect against replays, single-use transactions are not supported. The caller must either supply an existing transaction ID or begin a new transaction.
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 |
# File 'proto_docs/google/spanner/v1/spanner.rb', line 427 class ExecuteBatchDmlRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A single DML statement. # @!attribute [rw] sql # @return [::String] # Required. The DML string. # @!attribute [rw] params # @return [::Google::Protobuf::Struct] # 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 a SQL statement with unbound parameters. # @!attribute [rw] param_types # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Spanner::V1::Type}] # It is not always possible for Cloud Spanner to infer the right SQL type # from a JSON value. For example, values of type `BYTES` and values # of type `STRING` both appear in {::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest::Statement#params params} as JSON strings. # # In these cases, `param_types` can be used to specify the exact # SQL type for some or all of the SQL statement parameters. See the # definition of {::Google::Cloud::Spanner::V1::Type Type} for more information # about SQL types. class Statement include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Spanner::V1::Type] class ParamTypesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |