proto_docs/google/spanner/v1/spanner.rb in google-cloud-spanner-v1-0.5.0 vs proto_docs/google/spanner/v1/spanner.rb in google-cloud-spanner-v1-0.6.0

- old
+ new

@@ -157,10 +157,70 @@ class DeleteSessionRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + # Common request options for various APIs. + # @!attribute [rw] priority + # @return [::Google::Cloud::Spanner::V1::RequestOptions::Priority] + # Priority for the request. + # @!attribute [rw] request_tag + # @return [::String] + # A per-request tag which can be applied to queries or reads, used for + # statistics collection. + # Both request_tag and transaction_tag can be specified for a read or query + # that belongs to a transaction. + # This field is ignored for requests where it's not applicable (e.g. + # CommitRequest). + # `request_tag` must be a valid identifier of the form: + # `[a-zA-Z][a-zA-Z0-9_\-]` between 2 and 64 characters in length + # @!attribute [rw] transaction_tag + # @return [::String] + # A tag used for statistics collection about this transaction. + # Both request_tag and transaction_tag can be specified for a read or query + # that belongs to a transaction. + # The value of transaction_tag should be the same for all requests belonging + # to the same transaction. + # If this request doesn’t belong to any transaction, transaction_tag will be + # ignored. + # `transaction_tag` must be a valid identifier of the format: + # `[a-zA-Z][a-zA-Z0-9_\-]{0,49}` + class RequestOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The relative priority for requests. Note that priority is not applicable + # for {::Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction BeginTransaction}. + # + # The priority acts as a hint to the Cloud Spanner scheduler and does not + # guarantee priority or order of execution. For example: + # + # * Some parts of a write operation always execute at `PRIORITY_HIGH`, + # regardless of the specified priority. This may cause you to see an + # increase in high priority workload even when executing a low priority + # request. This can also potentially cause a priority inversion where a + # lower priority request will be fulfilled ahead of a higher priority + # request. + # * If a transaction contains multiple operations with different priorities, + # Cloud Spanner does not guarantee to process the higher priority + # operations first. There may be other constraints to satisfy, such as + # order of operations. + module Priority + # `PRIORITY_UNSPECIFIED` is equivalent to `PRIORITY_HIGH`. + PRIORITY_UNSPECIFIED = 0 + + # This specifies that the request is low priority. + PRIORITY_LOW = 1 + + # This specifies that the request is medium priority. + PRIORITY_MEDIUM = 2 + + # This specifies that the request is high priority. + PRIORITY_HIGH = 3 + end + end + # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql} and # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql ExecuteStreamingSql}. # @!attribute [rw] session # @return [::String] # Required. The session in which the SQL query should be performed. @@ -236,10 +296,13 @@ # # Required for DML statements. Ignored for queries. # @!attribute [rw] query_options # @return [::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryOptions] # Query optimizer configuration to use for the given query. + # @!attribute [rw] request_options + # @return [::Google::Cloud::Spanner::V1::RequestOptions] + # Common options for this request. class ExecuteSqlRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Query optimizer configuration. @@ -267,33 +330,33 @@ # for more information on managing the query optimizer. # # The `optimizer_version` statement hint has precedence over this setting. # @!attribute [rw] optimizer_statistics_package # @return [::String] - # Query optimizer statistics package to use. + # An option to control the selection of optimizer statistics package. # # This parameter allows individual queries to use a different query - # optimizer statistics. + # optimizer statistics package. # # Specifying `latest` as a value instructs Cloud Spanner to use the latest # generated statistics package. If not specified, Cloud Spanner uses - # statistics package set at the database level options, or latest if - # the database option is not set. + # the statistics package set at the database level options, or the latest + # package if the database option is not set. # # The statistics package requested by the query has to be exempt from # garbage collection. This can be achieved with the following DDL # statement: # # ``` # ALTER STATISTICS <package_name> SET OPTIONS (allow_gc=false) # ``` # # The list of available statistics packages can be queried from - # `SPANNER_SYS.OPTIMIZER_STATISTICS_PACKAGES`. + # `INFORMATION_SCHEMA.SPANNER_STATISTICS`. # # Executing a SQL statement with an invalid optimizer statistics package - # or with statistics package that allows garbage collection fails with + # or with a statistics package that allows garbage collection fails with # an `INVALID_ARGUMENT` error. class QueryOptions include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end @@ -349,10 +412,13 @@ # # 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. + # @!attribute [rw] request_options + # @return [::Google::Cloud::Spanner::V1::RequestOptions] + # Common options for this request. class ExecuteBatchDmlRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A single DML statement. @@ -640,10 +706,13 @@ # @return [::String] # If present, results will be restricted to the specified partition # previously created using PartitionRead(). There must be an exact # match for the values of fields common to this message and the # PartitionReadRequest message used to create this partition_token. + # @!attribute [rw] request_options + # @return [::Google::Cloud::Spanner::V1::RequestOptions] + # Common options for this request. class ReadRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end @@ -652,10 +721,17 @@ # @return [::String] # Required. The session in which the transaction runs. # @!attribute [rw] options # @return [::Google::Cloud::Spanner::V1::TransactionOptions] # Required. Options for the new transaction. + # @!attribute [rw] request_options + # @return [::Google::Cloud::Spanner::V1::RequestOptions] + # Common options for this request. + # Priority is ignored for this request. Setting the priority in this + # request_options struct will not do anything. To set the priority for a + # transaction, set it on the reads and writes that are part of this + # transaction instead. class BeginTransactionRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end @@ -685,9 +761,12 @@ # @!attribute [rw] return_commit_stats # @return [::Boolean] # If `true`, then statistics related to the transaction will be included in # the {::Google::Cloud::Spanner::V1::CommitResponse#commit_stats CommitResponse}. Default value is # `false`. + # @!attribute [rw] request_options + # @return [::Google::Cloud::Spanner::V1::RequestOptions] + # Common options for this request. class CommitRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end