google-cloud-spanner-v1 0.18.0 → 0.20.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,7 +33,8 @@ module Google
33
33
  extend ::Google::Protobuf::MessageExts::ClassMethods
34
34
  end
35
35
 
36
- # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#batch_create_sessions BatchCreateSessions}.
36
+ # The request for
37
+ # {::Google::Cloud::Spanner::V1::Spanner::Client#batch_create_sessions BatchCreateSessions}.
37
38
  # @!attribute [rw] database
38
39
  # @return [::String]
39
40
  # Required. The database in which the new sessions are created.
@@ -46,13 +47,15 @@ module Google
46
47
  # The API may return fewer than the requested number of sessions. If a
47
48
  # specific number of sessions are desired, the client can make additional
48
49
  # calls to BatchCreateSessions (adjusting
49
- # {::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest#session_count session_count} as necessary).
50
+ # {::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest#session_count session_count}
51
+ # as necessary).
50
52
  class BatchCreateSessionsRequest
51
53
  include ::Google::Protobuf::MessageExts
52
54
  extend ::Google::Protobuf::MessageExts::ClassMethods
53
55
  end
54
56
 
55
- # The response for {::Google::Cloud::Spanner::V1::Spanner::Client#batch_create_sessions BatchCreateSessions}.
57
+ # The response for
58
+ # {::Google::Cloud::Spanner::V1::Spanner::Client#batch_create_sessions BatchCreateSessions}.
56
59
  # @!attribute [rw] session
57
60
  # @return [::Array<::Google::Cloud::Spanner::V1::Session>]
58
61
  # The freshly created sessions.
@@ -120,7 +123,8 @@ module Google
120
123
  # @!attribute [rw] page_token
121
124
  # @return [::String]
122
125
  # If non-empty, `page_token` should contain a
123
- # {::Google::Cloud::Spanner::V1::ListSessionsResponse#next_page_token next_page_token} from a previous
126
+ # {::Google::Cloud::Spanner::V1::ListSessionsResponse#next_page_token next_page_token}
127
+ # from a previous
124
128
  # {::Google::Cloud::Spanner::V1::ListSessionsResponse ListSessionsResponse}.
125
129
  # @!attribute [rw] filter
126
130
  # @return [::String]
@@ -146,8 +150,8 @@ module Google
146
150
  # @!attribute [rw] next_page_token
147
151
  # @return [::String]
148
152
  # `next_page_token` can be sent in a subsequent
149
- # {::Google::Cloud::Spanner::V1::Spanner::Client#list_sessions ListSessions} call to fetch more of the matching
150
- # sessions.
153
+ # {::Google::Cloud::Spanner::V1::Spanner::Client#list_sessions ListSessions} call to fetch more
154
+ # of the matching sessions.
151
155
  class ListSessionsResponse
152
156
  include ::Google::Protobuf::MessageExts
153
157
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -226,6 +230,93 @@ module Google
226
230
  end
227
231
  end
228
232
 
233
+ # The DirectedReadOptions can be used to indicate which replicas or regions
234
+ # should be used for non-transactional reads or queries.
235
+ #
236
+ # DirectedReadOptions may only be specified for a read-only transaction,
237
+ # otherwise the API will return an `INVALID_ARGUMENT` error.
238
+ # @!attribute [rw] include_replicas
239
+ # @return [::Google::Cloud::Spanner::V1::DirectedReadOptions::IncludeReplicas]
240
+ # Include_replicas indicates the order of replicas (as they appear in
241
+ # this list) to process the request. If auto_failover_disabled is set to
242
+ # true and all replicas are exhausted without finding a healthy replica,
243
+ # Spanner will wait for a replica in the list to become available, requests
244
+ # may fail due to `DEADLINE_EXCEEDED` errors.
245
+ # @!attribute [rw] exclude_replicas
246
+ # @return [::Google::Cloud::Spanner::V1::DirectedReadOptions::ExcludeReplicas]
247
+ # Exclude_replicas indicates that should be excluded from serving
248
+ # requests. Spanner will not route requests to the replicas in this list.
249
+ class DirectedReadOptions
250
+ include ::Google::Protobuf::MessageExts
251
+ extend ::Google::Protobuf::MessageExts::ClassMethods
252
+
253
+ # The directed read replica selector.
254
+ # Callers must provide one or more of the following fields for replica
255
+ # selection:
256
+ #
257
+ # * `location` - The location must be one of the regions within the
258
+ # multi-region configuration of your database.
259
+ # * `type` - The type of the replica.
260
+ #
261
+ # Some examples of using replica_selectors are:
262
+ #
263
+ # * `location:us-east1` --> The "us-east1" replica(s) of any available type
264
+ # will be used to process the request.
265
+ # * `type:READ_ONLY` --> The "READ_ONLY" type replica(s) in nearest
266
+ # . available location will be used to process the
267
+ # request.
268
+ # * `location:us-east1 type:READ_ONLY` --> The "READ_ONLY" type replica(s)
269
+ # in location "us-east1" will be used to process
270
+ # the request.
271
+ # @!attribute [rw] location
272
+ # @return [::String]
273
+ # The location or region of the serving requests, e.g. "us-east1".
274
+ # @!attribute [rw] type
275
+ # @return [::Google::Cloud::Spanner::V1::DirectedReadOptions::ReplicaSelection::Type]
276
+ # The type of replica.
277
+ class ReplicaSelection
278
+ include ::Google::Protobuf::MessageExts
279
+ extend ::Google::Protobuf::MessageExts::ClassMethods
280
+
281
+ # Indicates the type of replica.
282
+ module Type
283
+ # Not specified.
284
+ TYPE_UNSPECIFIED = 0
285
+
286
+ # Read-write replicas support both reads and writes.
287
+ READ_WRITE = 1
288
+
289
+ # Read-only replicas only support reads (not writes).
290
+ READ_ONLY = 2
291
+ end
292
+ end
293
+
294
+ # An IncludeReplicas contains a repeated set of ReplicaSelection which
295
+ # indicates the order in which replicas should be considered.
296
+ # @!attribute [rw] replica_selections
297
+ # @return [::Array<::Google::Cloud::Spanner::V1::DirectedReadOptions::ReplicaSelection>]
298
+ # The directed read replica selector.
299
+ # @!attribute [rw] auto_failover_disabled
300
+ # @return [::Boolean]
301
+ # If true, Spanner will not route requests to a replica outside the
302
+ # include_replicas list when all of the specified replicas are unavailable
303
+ # or unhealthy. Default value is `false`.
304
+ class IncludeReplicas
305
+ include ::Google::Protobuf::MessageExts
306
+ extend ::Google::Protobuf::MessageExts::ClassMethods
307
+ end
308
+
309
+ # An ExcludeReplicas contains a repeated set of ReplicaSelection that should
310
+ # be excluded from serving requests.
311
+ # @!attribute [rw] replica_selections
312
+ # @return [::Array<::Google::Cloud::Spanner::V1::DirectedReadOptions::ReplicaSelection>]
313
+ # The directed read replica selector.
314
+ class ExcludeReplicas
315
+ include ::Google::Protobuf::MessageExts
316
+ extend ::Google::Protobuf::MessageExts::ClassMethods
317
+ end
318
+ end
319
+
229
320
  # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql} and
230
321
  # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql ExecuteStreamingSql}.
231
322
  # @!attribute [rw] session
@@ -265,7 +356,8 @@ module Google
265
356
  # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Spanner::V1::Type}]
266
357
  # It is not always possible for Cloud Spanner to infer the right SQL type
267
358
  # from a JSON value. For example, values of type `BYTES` and values
268
- # of type `STRING` both appear in {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#params params} as JSON strings.
359
+ # of type `STRING` both appear in
360
+ # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#params params} as JSON strings.
269
361
  #
270
362
  # In these cases, `param_types` can be used to specify the exact
271
363
  # SQL type for some or all of the SQL statement parameters. See the
@@ -275,15 +367,18 @@ module Google
275
367
  # @return [::String]
276
368
  # If this request is resuming a previously interrupted SQL statement
277
369
  # execution, `resume_token` should be copied from the last
278
- # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the interruption. Doing this
279
- # enables the new SQL statement execution to resume where the last one left
280
- # off. The rest of the request parameters must exactly match the
281
- # request that yielded this token.
370
+ # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the
371
+ # interruption. Doing this enables the new SQL statement execution to resume
372
+ # where the last one left off. The rest of the request parameters must
373
+ # exactly match the request that yielded this token.
282
374
  # @!attribute [rw] query_mode
283
375
  # @return [::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode]
284
376
  # Used to control the amount of debugging information returned in
285
- # {::Google::Cloud::Spanner::V1::ResultSetStats ResultSetStats}. If {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#partition_token partition_token} is set, {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode query_mode} can only
286
- # be set to {::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode::NORMAL QueryMode.NORMAL}.
377
+ # {::Google::Cloud::Spanner::V1::ResultSetStats ResultSetStats}. If
378
+ # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#partition_token partition_token} is
379
+ # set, {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode query_mode} can only
380
+ # be set to
381
+ # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode::NORMAL QueryMode.NORMAL}.
287
382
  # @!attribute [rw] partition_token
288
383
  # @return [::String]
289
384
  # If present, results will be restricted to the specified partition
@@ -308,13 +403,16 @@ module Google
308
403
  # @!attribute [rw] request_options
309
404
  # @return [::Google::Cloud::Spanner::V1::RequestOptions]
310
405
  # Common options for this request.
406
+ # @!attribute [rw] directed_read_options
407
+ # @return [::Google::Cloud::Spanner::V1::DirectedReadOptions]
408
+ # Directed read options for this request.
311
409
  # @!attribute [rw] data_boost_enabled
312
410
  # @return [::Boolean]
313
411
  # If this is for a partitioned query and this field is set to `true`, the
314
- # request will be executed via Spanner independent compute resources.
412
+ # request is executed with Spanner Data Boost independent compute resources.
315
413
  #
316
414
  # If the field is set to `true` but the request does not set
317
- # `partition_token`, the API will return an `INVALID_ARGUMENT` error.
415
+ # `partition_token`, the API returns an `INVALID_ARGUMENT` error.
318
416
  class ExecuteSqlRequest
319
417
  include ::Google::Protobuf::MessageExts
320
418
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -412,17 +510,17 @@ module Google
412
510
  # transaction.
413
511
  # @!attribute [rw] statements
414
512
  # @return [::Array<::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest::Statement>]
415
- # Required. The list of statements to execute in this batch. Statements are executed
416
- # serially, such that the effects of statement `i` are visible to statement
417
- # `i+1`. Each statement must be a DML statement. Execution stops at the
418
- # first failed statement; the remaining statements are not executed.
513
+ # Required. The list of statements to execute in this batch. Statements are
514
+ # executed serially, such that the effects of statement `i` are visible to
515
+ # statement `i+1`. Each statement must be a DML statement. Execution stops at
516
+ # the first failed statement; the remaining statements are not executed.
419
517
  #
420
518
  # Callers must provide at least one statement.
421
519
  # @!attribute [rw] seqno
422
520
  # @return [::Integer]
423
- # Required. A per-transaction sequence number used to identify this request. This field
424
- # makes each request idempotent such that if the request is received multiple
425
- # times, at most one will succeed.
521
+ # Required. A per-transaction sequence number used to identify this request.
522
+ # This field makes each request idempotent such that if the request is
523
+ # received multiple times, at most one will succeed.
426
524
  #
427
525
  # The sequence number must be monotonically increasing within the
428
526
  # transaction. If a request arrives for the first time with an out-of-order
@@ -457,7 +555,9 @@ module Google
457
555
  # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Spanner::V1::Type}]
458
556
  # It is not always possible for Cloud Spanner to infer the right SQL type
459
557
  # from a JSON value. For example, values of type `BYTES` and values
460
- # of type `STRING` both appear in {::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest::Statement#params params} as JSON strings.
558
+ # of type `STRING` both appear in
559
+ # {::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest::Statement#params params} as
560
+ # JSON strings.
461
561
  #
462
562
  # In these cases, `param_types` can be used to specify the exact
463
563
  # SQL type for some or all of the SQL statement parameters. See the
@@ -478,39 +578,48 @@ module Google
478
578
  end
479
579
  end
480
580
 
481
- # The response for {::Google::Cloud::Spanner::V1::Spanner::Client#execute_batch_dml ExecuteBatchDml}. Contains a list
482
- # of {::Google::Cloud::Spanner::V1::ResultSet ResultSet} messages, one for each DML statement that has successfully
483
- # executed, in the same order as the statements in the request. If a statement
484
- # fails, the status in the response body identifies the cause of the failure.
581
+ # The response for
582
+ # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_batch_dml ExecuteBatchDml}. Contains a list
583
+ # of {::Google::Cloud::Spanner::V1::ResultSet ResultSet} messages, one for each DML
584
+ # statement that has successfully executed, in the same order as the statements
585
+ # in the request. If a statement fails, the status in the response body
586
+ # identifies the cause of the failure.
485
587
  #
486
588
  # To check for DML statements that failed, use the following approach:
487
589
  #
488
- # 1. Check the status in the response message. The [google.rpc.Code][google.rpc.Code] enum
590
+ # 1. Check the status in the response message. The
591
+ # [google.rpc.Code][google.rpc.Code] enum
489
592
  # value `OK` indicates that all statements were executed successfully.
490
593
  # 2. If the status was not `OK`, check the number of result sets in the
491
- # response. If the response contains `N` {::Google::Cloud::Spanner::V1::ResultSet ResultSet} messages, then
492
- # statement `N+1` in the request failed.
594
+ # response. If the response contains `N`
595
+ # {::Google::Cloud::Spanner::V1::ResultSet ResultSet} messages, then statement `N+1` in
596
+ # the request failed.
493
597
  #
494
598
  # Example 1:
495
599
  #
496
600
  # * Request: 5 DML statements, all executed successfully.
497
- # * Response: 5 {::Google::Cloud::Spanner::V1::ResultSet ResultSet} messages, with the status `OK`.
601
+ # * Response: 5 {::Google::Cloud::Spanner::V1::ResultSet ResultSet} messages, with the
602
+ # status `OK`.
498
603
  #
499
604
  # Example 2:
500
605
  #
501
606
  # * Request: 5 DML statements. The third statement has a syntax error.
502
- # * Response: 2 {::Google::Cloud::Spanner::V1::ResultSet ResultSet} messages, and a syntax error (`INVALID_ARGUMENT`)
503
- # status. The number of {::Google::Cloud::Spanner::V1::ResultSet ResultSet} messages indicates that the third
504
- # statement failed, and the fourth and fifth statements were not executed.
607
+ # * Response: 2 {::Google::Cloud::Spanner::V1::ResultSet ResultSet} messages, and a syntax
608
+ # error (`INVALID_ARGUMENT`)
609
+ # status. The number of {::Google::Cloud::Spanner::V1::ResultSet ResultSet} messages
610
+ # indicates that the third statement failed, and the fourth and fifth
611
+ # statements were not executed.
505
612
  # @!attribute [rw] result_sets
506
613
  # @return [::Array<::Google::Cloud::Spanner::V1::ResultSet>]
507
- # One {::Google::Cloud::Spanner::V1::ResultSet ResultSet} for each statement in the request that ran successfully,
508
- # in the same order as the statements in the request. Each {::Google::Cloud::Spanner::V1::ResultSet ResultSet} does
509
- # not contain any rows. The {::Google::Cloud::Spanner::V1::ResultSetStats ResultSetStats} in each {::Google::Cloud::Spanner::V1::ResultSet ResultSet} contain
510
- # the number of rows modified by the statement.
511
- #
512
- # Only the first {::Google::Cloud::Spanner::V1::ResultSet ResultSet} in the response contains valid
513
- # {::Google::Cloud::Spanner::V1::ResultSetMetadata ResultSetMetadata}.
614
+ # One {::Google::Cloud::Spanner::V1::ResultSet ResultSet} for each statement in the
615
+ # request that ran successfully, in the same order as the statements in the
616
+ # request. Each {::Google::Cloud::Spanner::V1::ResultSet ResultSet} does not contain any
617
+ # rows. The {::Google::Cloud::Spanner::V1::ResultSetStats ResultSetStats} in each
618
+ # {::Google::Cloud::Spanner::V1::ResultSet ResultSet} contain the number of rows
619
+ # modified by the statement.
620
+ #
621
+ # Only the first {::Google::Cloud::Spanner::V1::ResultSet ResultSet} in the response
622
+ # contains valid {::Google::Cloud::Spanner::V1::ResultSetMetadata ResultSetMetadata}.
514
623
  # @!attribute [rw] status
515
624
  # @return [::Google::Rpc::Status]
516
625
  # If all DML statements are executed successfully, the status is `OK`.
@@ -555,15 +664,16 @@ module Google
555
664
  # transactions are not.
556
665
  # @!attribute [rw] sql
557
666
  # @return [::String]
558
- # Required. The query request to generate partitions for. The request will fail if
559
- # the query is not root partitionable. The query plan of a root
560
- # partitionable query has a single distributed union operator. A distributed
561
- # union operator conceptually divides one or more tables into multiple
562
- # splits, remotely evaluates a subquery independently on each split, and
563
- # then unions all results.
667
+ # Required. The query request to generate partitions for. The request will
668
+ # fail if the query is not root partitionable. For a query to be root
669
+ # partitionable, it needs to satisfy a few conditions. For example, the first
670
+ # operator in the query execution plan must be a distributed union operator.
671
+ # For more information about other conditions, see [Read data in
672
+ # parallel](https://cloud.google.com/spanner/docs/reads#read_data_in_parallel).
564
673
  #
565
- # This must not contain DML commands, such as INSERT, UPDATE, or
566
- # DELETE. Use {::Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql ExecuteStreamingSql} with a
674
+ # The query request must not contain DML commands, such as INSERT, UPDATE, or
675
+ # DELETE. Use
676
+ # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql ExecuteStreamingSql} with a
567
677
  # PartitionedDml transaction for large, partition-friendly DML operations.
568
678
  # @!attribute [rw] params
569
679
  # @return [::Google::Protobuf::Struct]
@@ -583,7 +693,8 @@ module Google
583
693
  # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Spanner::V1::Type}]
584
694
  # It is not always possible for Cloud Spanner to infer the right SQL type
585
695
  # from a JSON value. For example, values of type `BYTES` and values
586
- # of type `STRING` both appear in {::Google::Cloud::Spanner::V1::PartitionQueryRequest#params params} as JSON strings.
696
+ # of type `STRING` both appear in
697
+ # {::Google::Cloud::Spanner::V1::PartitionQueryRequest#params params} as JSON strings.
587
698
  #
588
699
  # In these cases, `param_types` can be used to specify the exact
589
700
  # SQL type for some or all of the SQL query parameters. See the
@@ -619,18 +730,24 @@ module Google
619
730
  # Required. The name of the table in the database to be read.
620
731
  # @!attribute [rw] index
621
732
  # @return [::String]
622
- # If non-empty, the name of an index on {::Google::Cloud::Spanner::V1::PartitionReadRequest#table table}. This index is
623
- # used instead of the table primary key when interpreting {::Google::Cloud::Spanner::V1::PartitionReadRequest#key_set key_set}
624
- # and sorting result rows. See {::Google::Cloud::Spanner::V1::PartitionReadRequest#key_set key_set} for further information.
733
+ # If non-empty, the name of an index on
734
+ # {::Google::Cloud::Spanner::V1::PartitionReadRequest#table table}. This index is used
735
+ # instead of the table primary key when interpreting
736
+ # {::Google::Cloud::Spanner::V1::PartitionReadRequest#key_set key_set} and sorting
737
+ # result rows. See {::Google::Cloud::Spanner::V1::PartitionReadRequest#key_set key_set}
738
+ # for further information.
625
739
  # @!attribute [rw] columns
626
740
  # @return [::Array<::String>]
627
- # The columns of {::Google::Cloud::Spanner::V1::PartitionReadRequest#table table} to be returned for each row matching
628
- # this request.
741
+ # The columns of {::Google::Cloud::Spanner::V1::PartitionReadRequest#table table} to be
742
+ # returned for each row matching this request.
629
743
  # @!attribute [rw] key_set
630
744
  # @return [::Google::Cloud::Spanner::V1::KeySet]
631
745
  # Required. `key_set` identifies the rows to be yielded. `key_set` names the
632
- # primary keys of the rows in {::Google::Cloud::Spanner::V1::PartitionReadRequest#table table} to be yielded, unless {::Google::Cloud::Spanner::V1::PartitionReadRequest#index index}
633
- # is present. If {::Google::Cloud::Spanner::V1::PartitionReadRequest#index index} is present, then {::Google::Cloud::Spanner::V1::PartitionReadRequest#key_set key_set} instead names
746
+ # primary keys of the rows in
747
+ # {::Google::Cloud::Spanner::V1::PartitionReadRequest#table table} to be yielded, unless
748
+ # {::Google::Cloud::Spanner::V1::PartitionReadRequest#index index} is present. If
749
+ # {::Google::Cloud::Spanner::V1::PartitionReadRequest#index index} is present, then
750
+ # {::Google::Cloud::Spanner::V1::PartitionReadRequest#key_set key_set} instead names
634
751
  # index keys in {::Google::Cloud::Spanner::V1::PartitionReadRequest#index index}.
635
752
  #
636
753
  # It is not an error for the `key_set` to name rows that do not
@@ -682,24 +799,31 @@ module Google
682
799
  # Required. The name of the table in the database to be read.
683
800
  # @!attribute [rw] index
684
801
  # @return [::String]
685
- # If non-empty, the name of an index on {::Google::Cloud::Spanner::V1::ReadRequest#table table}. This index is
686
- # used instead of the table primary key when interpreting {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set}
687
- # and sorting result rows. See {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} for further information.
802
+ # If non-empty, the name of an index on
803
+ # {::Google::Cloud::Spanner::V1::ReadRequest#table table}. This index is used instead of
804
+ # the table primary key when interpreting
805
+ # {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} and sorting result rows.
806
+ # See {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} for further
807
+ # information.
688
808
  # @!attribute [rw] columns
689
809
  # @return [::Array<::String>]
690
- # Required. The columns of {::Google::Cloud::Spanner::V1::ReadRequest#table table} to be returned for each row matching
691
- # this request.
810
+ # Required. The columns of {::Google::Cloud::Spanner::V1::ReadRequest#table table} to be
811
+ # returned for each row matching this request.
692
812
  # @!attribute [rw] key_set
693
813
  # @return [::Google::Cloud::Spanner::V1::KeySet]
694
814
  # Required. `key_set` identifies the rows to be yielded. `key_set` names the
695
- # primary keys of the rows in {::Google::Cloud::Spanner::V1::ReadRequest#table table} to be yielded, unless {::Google::Cloud::Spanner::V1::ReadRequest#index index}
696
- # is present. If {::Google::Cloud::Spanner::V1::ReadRequest#index index} is present, then {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} instead names
697
- # index keys in {::Google::Cloud::Spanner::V1::ReadRequest#index index}.
698
- #
699
- # If the {::Google::Cloud::Spanner::V1::ReadRequest#partition_token partition_token} field is empty, rows are yielded
700
- # in table primary key order (if {::Google::Cloud::Spanner::V1::ReadRequest#index index} is empty) or index key order
701
- # (if {::Google::Cloud::Spanner::V1::ReadRequest#index index} is non-empty). If the {::Google::Cloud::Spanner::V1::ReadRequest#partition_token partition_token} field is not
702
- # empty, rows will be yielded in an unspecified order.
815
+ # primary keys of the rows in {::Google::Cloud::Spanner::V1::ReadRequest#table table} to
816
+ # be yielded, unless {::Google::Cloud::Spanner::V1::ReadRequest#index index} is present.
817
+ # If {::Google::Cloud::Spanner::V1::ReadRequest#index index} is present, then
818
+ # {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} instead names index keys
819
+ # in {::Google::Cloud::Spanner::V1::ReadRequest#index index}.
820
+ #
821
+ # If the {::Google::Cloud::Spanner::V1::ReadRequest#partition_token partition_token}
822
+ # field is empty, rows are yielded in table primary key order (if
823
+ # {::Google::Cloud::Spanner::V1::ReadRequest#index index} is empty) or index key order
824
+ # (if {::Google::Cloud::Spanner::V1::ReadRequest#index index} is non-empty). If the
825
+ # {::Google::Cloud::Spanner::V1::ReadRequest#partition_token partition_token} field is
826
+ # not empty, rows will be yielded in an unspecified order.
703
827
  #
704
828
  # It is not an error for the `key_set` to name rows that do not
705
829
  # exist in the database. Read yields nothing for nonexistent rows.
@@ -712,9 +836,9 @@ module Google
712
836
  # @return [::String]
713
837
  # If this request is resuming a previously interrupted read,
714
838
  # `resume_token` should be copied from the last
715
- # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the interruption. Doing this
716
- # enables the new read to resume where the last read left off. The
717
- # rest of the request parameters must exactly match the request
839
+ # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the
840
+ # interruption. Doing this enables the new read to resume where the last read
841
+ # left off. The rest of the request parameters must exactly match the request
718
842
  # that yielded this token.
719
843
  # @!attribute [rw] partition_token
720
844
  # @return [::String]
@@ -725,19 +849,23 @@ module Google
725
849
  # @!attribute [rw] request_options
726
850
  # @return [::Google::Cloud::Spanner::V1::RequestOptions]
727
851
  # Common options for this request.
852
+ # @!attribute [rw] directed_read_options
853
+ # @return [::Google::Cloud::Spanner::V1::DirectedReadOptions]
854
+ # Directed read options for this request.
728
855
  # @!attribute [rw] data_boost_enabled
729
856
  # @return [::Boolean]
730
857
  # If this is for a partitioned read and this field is set to `true`, the
731
- # request will be executed via Spanner independent compute resources.
858
+ # request is executed with Spanner Data Boost independent compute resources.
732
859
  #
733
860
  # If the field is set to `true` but the request does not set
734
- # `partition_token`, the API will return an `INVALID_ARGUMENT` error.
861
+ # `partition_token`, the API returns an `INVALID_ARGUMENT` error.
735
862
  class ReadRequest
736
863
  include ::Google::Protobuf::MessageExts
737
864
  extend ::Google::Protobuf::MessageExts::ClassMethods
738
865
  end
739
866
 
740
- # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction BeginTransaction}.
867
+ # The request for
868
+ # {::Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction BeginTransaction}.
741
869
  # @!attribute [rw] session
742
870
  # @return [::String]
743
871
  # Required. The session in which the transaction runs.
@@ -782,8 +910,8 @@ module Google
782
910
  # @!attribute [rw] return_commit_stats
783
911
  # @return [::Boolean]
784
912
  # If `true`, then statistics related to the transaction will be included in
785
- # the {::Google::Cloud::Spanner::V1::CommitResponse#commit_stats CommitResponse}. Default value is
786
- # `false`.
913
+ # the {::Google::Cloud::Spanner::V1::CommitResponse#commit_stats CommitResponse}.
914
+ # Default value is `false`.
787
915
  # @!attribute [rw] request_options
788
916
  # @return [::Google::Cloud::Spanner::V1::RequestOptions]
789
917
  # Common options for this request.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-spanner-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-02 00:00:00.000000000 Z
11
+ date: 2024-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.20.0
19
+ version: 0.21.1
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.20.0
29
+ version: 0.21.1
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -223,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
223
  - !ruby/object:Gem::Version
224
224
  version: '0'
225
225
  requirements: []
226
- rubygems_version: 3.4.19
226
+ rubygems_version: 3.5.3
227
227
  signing_key:
228
228
  specification_version: 4
229
229
  summary: Cloud Spanner is a managed, mission-critical, globally consistent and scalable