google-cloud-spanner-v1 0.17.0 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/spanner/v1/spanner/client.rb +163 -115
- data/lib/google/cloud/spanner/v1/version.rb +1 -1
- data/lib/google/spanner/v1/spanner_pb.rb +7 -2
- data/lib/google/spanner/v1/spanner_services_pb.rb +37 -29
- data/lib/google/spanner/v1/type_pb.rb +1 -1
- data/proto_docs/google/spanner/v1/spanner.rb +206 -78
- data/proto_docs/google/spanner/v1/type.rb +5 -0
- metadata +2 -2
@@ -33,7 +33,8 @@ module Google
|
|
33
33
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
34
34
|
end
|
35
35
|
|
36
|
-
# The request for
|
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}
|
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
|
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}
|
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
|
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
|
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
|
279
|
-
# enables the new SQL statement execution to resume
|
280
|
-
# off. The rest of the request parameters must
|
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
|
286
|
-
#
|
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
|
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
|
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
|
416
|
-
# serially, such that the effects of statement `i` are visible to
|
417
|
-
# `i+1`. Each statement must be a DML statement. Execution stops at
|
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.
|
424
|
-
# makes each request idempotent such that if the request is
|
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
|
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
|
482
|
-
#
|
483
|
-
#
|
484
|
-
#
|
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
|
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`
|
492
|
-
# statement `N+1` in
|
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
|
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
|
503
|
-
#
|
504
|
-
#
|
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
|
508
|
-
# in the same order as the statements in the
|
509
|
-
#
|
510
|
-
#
|
511
|
-
#
|
512
|
-
#
|
513
|
-
#
|
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
|
559
|
-
# the query is not root partitionable.
|
560
|
-
# partitionable
|
561
|
-
#
|
562
|
-
#
|
563
|
-
#
|
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
|
-
#
|
566
|
-
# DELETE. Use
|
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
|
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
|
623
|
-
#
|
624
|
-
#
|
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
|
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
|
633
|
-
#
|
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
|
686
|
-
#
|
687
|
-
#
|
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
|
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
|
696
|
-
#
|
697
|
-
#
|
698
|
-
#
|
699
|
-
#
|
700
|
-
#
|
701
|
-
#
|
702
|
-
# empty, rows
|
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
|
716
|
-
# enables the new read to resume where the last read
|
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
|
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
|
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
|
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}.
|
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.
|
@@ -175,6 +175,11 @@ module Google
|
|
175
175
|
# {::Google::Cloud::Spanner::V1::TypeCode::JSON JSON} when a client interacts with PostgreSQL-enabled
|
176
176
|
# Spanner databases.
|
177
177
|
PG_JSONB = 3
|
178
|
+
|
179
|
+
# PostgreSQL compatible OID type. This annotation can be used by a client
|
180
|
+
# interacting with PostgreSQL-enabled Spanner database to specify that a
|
181
|
+
# value should be treated using the semantics of the OID type.
|
182
|
+
PG_OID = 4
|
178
183
|
end
|
179
184
|
end
|
180
185
|
end
|
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.
|
4
|
+
version: 0.19.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
|
+
date: 2023-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|