google-apis-spanner_v1 0.38.0 → 0.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/google/apis/spanner_v1/classes.rb +437 -179
- data/lib/google/apis/spanner_v1/gem_version.rb +2 -2
- data/lib/google/apis/spanner_v1/representations.rb +118 -0
- data/lib/google/apis/spanner_v1/service.rb +148 -40
- metadata +4 -4
@@ -22,6 +22,124 @@ module Google
|
|
22
22
|
module Apis
|
23
23
|
module SpannerV1
|
24
24
|
|
25
|
+
# Message sent by the client to the adapter.
|
26
|
+
class AdaptMessageRequest
|
27
|
+
include Google::Apis::Core::Hashable
|
28
|
+
|
29
|
+
# Optional. Opaque request state passed by the client to the server.
|
30
|
+
# Corresponds to the JSON property `attachments`
|
31
|
+
# @return [Hash<String,String>]
|
32
|
+
attr_accessor :attachments
|
33
|
+
|
34
|
+
# Optional. Uninterpreted bytes from the underlying wire protocol.
|
35
|
+
# Corresponds to the JSON property `payload`
|
36
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
37
|
+
# @return [String]
|
38
|
+
attr_accessor :payload
|
39
|
+
|
40
|
+
# Required. Identifier for the underlying wire protocol.
|
41
|
+
# Corresponds to the JSON property `protocol`
|
42
|
+
# @return [String]
|
43
|
+
attr_accessor :protocol
|
44
|
+
|
45
|
+
def initialize(**args)
|
46
|
+
update!(**args)
|
47
|
+
end
|
48
|
+
|
49
|
+
# Update properties of this object
|
50
|
+
def update!(**args)
|
51
|
+
@attachments = args[:attachments] if args.key?(:attachments)
|
52
|
+
@payload = args[:payload] if args.key?(:payload)
|
53
|
+
@protocol = args[:protocol] if args.key?(:protocol)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# Message sent by the adapter to the client.
|
58
|
+
class AdaptMessageResponse
|
59
|
+
include Google::Apis::Core::Hashable
|
60
|
+
|
61
|
+
# Optional. Uninterpreted bytes from the underlying wire protocol.
|
62
|
+
# Corresponds to the JSON property `payload`
|
63
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
64
|
+
# @return [String]
|
65
|
+
attr_accessor :payload
|
66
|
+
|
67
|
+
# Optional. Opaque state updates to be applied by the client.
|
68
|
+
# Corresponds to the JSON property `stateUpdates`
|
69
|
+
# @return [Hash<String,String>]
|
70
|
+
attr_accessor :state_updates
|
71
|
+
|
72
|
+
def initialize(**args)
|
73
|
+
update!(**args)
|
74
|
+
end
|
75
|
+
|
76
|
+
# Update properties of this object
|
77
|
+
def update!(**args)
|
78
|
+
@payload = args[:payload] if args.key?(:payload)
|
79
|
+
@state_updates = args[:state_updates] if args.key?(:state_updates)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
# A session in the Cloud Spanner Adapter API.
|
84
|
+
class AdapterSession
|
85
|
+
include Google::Apis::Core::Hashable
|
86
|
+
|
87
|
+
# Identifier. The name of the session. This is always system-assigned.
|
88
|
+
# Corresponds to the JSON property `name`
|
89
|
+
# @return [String]
|
90
|
+
attr_accessor :name
|
91
|
+
|
92
|
+
def initialize(**args)
|
93
|
+
update!(**args)
|
94
|
+
end
|
95
|
+
|
96
|
+
# Update properties of this object
|
97
|
+
def update!(**args)
|
98
|
+
@name = args[:name] if args.key?(:name)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
# The request for AddSplitPoints.
|
103
|
+
class AddSplitPointsRequest
|
104
|
+
include Google::Apis::Core::Hashable
|
105
|
+
|
106
|
+
# Optional. A user-supplied tag associated with the split points. For example, "
|
107
|
+
# initial_data_load", "special_event_1". Defaults to "CloudAddSplitPointsAPI" if
|
108
|
+
# not specified. The length of the tag must not exceed 50 characters,else will
|
109
|
+
# be trimmed. Only valid UTF8 characters are allowed.
|
110
|
+
# Corresponds to the JSON property `initiator`
|
111
|
+
# @return [String]
|
112
|
+
attr_accessor :initiator
|
113
|
+
|
114
|
+
# Required. The split points to add.
|
115
|
+
# Corresponds to the JSON property `splitPoints`
|
116
|
+
# @return [Array<Google::Apis::SpannerV1::SplitPoints>]
|
117
|
+
attr_accessor :split_points
|
118
|
+
|
119
|
+
def initialize(**args)
|
120
|
+
update!(**args)
|
121
|
+
end
|
122
|
+
|
123
|
+
# Update properties of this object
|
124
|
+
def update!(**args)
|
125
|
+
@initiator = args[:initiator] if args.key?(:initiator)
|
126
|
+
@split_points = args[:split_points] if args.key?(:split_points)
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
# The response for AddSplitPoints.
|
131
|
+
class AddSplitPointsResponse
|
132
|
+
include Google::Apis::Core::Hashable
|
133
|
+
|
134
|
+
def initialize(**args)
|
135
|
+
update!(**args)
|
136
|
+
end
|
137
|
+
|
138
|
+
# Update properties of this object
|
139
|
+
def update!(**args)
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
25
143
|
# AsymmetricAutoscalingOption specifies the scaling of replicas identified by
|
26
144
|
# the given selection.
|
27
145
|
class AsymmetricAutoscalingOption
|
@@ -290,6 +408,13 @@ module Google
|
|
290
408
|
# @return [String]
|
291
409
|
attr_accessor :incremental_backup_chain_id
|
292
410
|
|
411
|
+
# Output only. The instance partition(s) storing the backup. This is the same as
|
412
|
+
# the list of the instance partition(s) that the database had footprint in at
|
413
|
+
# the backup's `version_time`.
|
414
|
+
# Corresponds to the JSON property `instancePartitions`
|
415
|
+
# @return [Array<Google::Apis::SpannerV1::BackupInstancePartition>]
|
416
|
+
attr_accessor :instance_partitions
|
417
|
+
|
293
418
|
# Output only. The max allowed expiration time of the backup, with microseconds
|
294
419
|
# granularity. A backup's expiration time can be configured in multiple APIs:
|
295
420
|
# CreateBackup, UpdateBackup, CopyBackup. When updating or copying an existing
|
@@ -375,6 +500,7 @@ module Google
|
|
375
500
|
@expire_time = args[:expire_time] if args.key?(:expire_time)
|
376
501
|
@freeable_size_bytes = args[:freeable_size_bytes] if args.key?(:freeable_size_bytes)
|
377
502
|
@incremental_backup_chain_id = args[:incremental_backup_chain_id] if args.key?(:incremental_backup_chain_id)
|
503
|
+
@instance_partitions = args[:instance_partitions] if args.key?(:instance_partitions)
|
378
504
|
@max_expire_time = args[:max_expire_time] if args.key?(:max_expire_time)
|
379
505
|
@name = args[:name] if args.key?(:name)
|
380
506
|
@oldest_version_time = args[:oldest_version_time] if args.key?(:oldest_version_time)
|
@@ -426,6 +552,26 @@ module Google
|
|
426
552
|
end
|
427
553
|
end
|
428
554
|
|
555
|
+
# Instance partition information for the backup.
|
556
|
+
class BackupInstancePartition
|
557
|
+
include Google::Apis::Core::Hashable
|
558
|
+
|
559
|
+
# A unique identifier for the instance partition. Values are of the form `
|
560
|
+
# projects//instances//instancePartitions/`
|
561
|
+
# Corresponds to the JSON property `instancePartition`
|
562
|
+
# @return [String]
|
563
|
+
attr_accessor :instance_partition
|
564
|
+
|
565
|
+
def initialize(**args)
|
566
|
+
update!(**args)
|
567
|
+
end
|
568
|
+
|
569
|
+
# Update properties of this object
|
570
|
+
def update!(**args)
|
571
|
+
@instance_partition = args[:instance_partition] if args.key?(:instance_partition)
|
572
|
+
end
|
573
|
+
end
|
574
|
+
|
429
575
|
# BackupSchedule expresses the automated backup creation specification for a
|
430
576
|
# Spanner database.
|
431
577
|
class BackupSchedule
|
@@ -500,7 +646,7 @@ module Google
|
|
500
646
|
include Google::Apis::Core::Hashable
|
501
647
|
|
502
648
|
# CrontabSpec can be used to specify the version time and frequency at which the
|
503
|
-
# backup
|
649
|
+
# backup is created.
|
504
650
|
# Corresponds to the JSON property `cronSpec`
|
505
651
|
# @return [Google::Apis::SpannerV1::CrontabSpec]
|
506
652
|
attr_accessor :cron_spec
|
@@ -519,10 +665,10 @@ module Google
|
|
519
665
|
class BatchCreateSessionsRequest
|
520
666
|
include Google::Apis::Core::Hashable
|
521
667
|
|
522
|
-
# Required. The number of sessions to be created in this batch call. The API
|
668
|
+
# Required. The number of sessions to be created in this batch call. The API can
|
523
669
|
# return fewer than the requested number of sessions. If a specific number of
|
524
|
-
# sessions are desired, the client can make additional calls to
|
525
|
-
# BatchCreateSessions (adjusting session_count as necessary).
|
670
|
+
# sessions are desired, the client can make additional calls to `
|
671
|
+
# BatchCreateSessions` (adjusting session_count as necessary).
|
526
672
|
# Corresponds to the JSON property `sessionCount`
|
527
673
|
# @return [Fixnum]
|
528
674
|
attr_accessor :session_count
|
@@ -567,15 +713,15 @@ module Google
|
|
567
713
|
include Google::Apis::Core::Hashable
|
568
714
|
|
569
715
|
# Optional. When `exclude_txn_from_change_streams` is set to `true`: *
|
570
|
-
# Modifications from all transactions in this batch write operation
|
716
|
+
# Modifications from all transactions in this batch write operation are not be
|
571
717
|
# recorded in change streams with DDL option `allow_txn_exclusion=true` that are
|
572
718
|
# tracking columns modified by these transactions. * Modifications from all
|
573
|
-
# transactions in this batch write operation
|
574
|
-
#
|
575
|
-
#
|
576
|
-
#
|
577
|
-
#
|
578
|
-
#
|
719
|
+
# transactions in this batch write operation are recorded in change streams with
|
720
|
+
# DDL option `allow_txn_exclusion=false or not set` that are tracking columns
|
721
|
+
# modified by these transactions. When `exclude_txn_from_change_streams` is set
|
722
|
+
# to `false` or not set, Modifications from all transactions in this batch write
|
723
|
+
# operation are recorded in all change streams that are tracking columns
|
724
|
+
# modified by these transactions.
|
579
725
|
# Corresponds to the JSON property `excludeTxnFromChangeStreams`
|
580
726
|
# @return [Boolean]
|
581
727
|
attr_accessor :exclude_txn_from_change_streams
|
@@ -1077,7 +1223,7 @@ module Google
|
|
1077
1223
|
include Google::Apis::Core::Hashable
|
1078
1224
|
|
1079
1225
|
# Optional. The amount of latency this request is configured to incur in order
|
1080
|
-
# to improve throughput. If this field
|
1226
|
+
# to improve throughput. If this field isn't set, Spanner assumes requests are
|
1081
1227
|
# relatively latency sensitive and automatically determines an appropriate delay
|
1082
1228
|
# time. You can specify a commit delay value between 0 and 500 ms.
|
1083
1229
|
# Corresponds to the JSON property `maxCommitDelay`
|
@@ -1091,9 +1237,9 @@ module Google
|
|
1091
1237
|
attr_accessor :mutations
|
1092
1238
|
|
1093
1239
|
# When a read-write transaction is executed on a multiplexed session, this
|
1094
|
-
# precommit token is sent back to the client as a part of the
|
1095
|
-
# message in the BeginTransaction response and also as a part of the
|
1096
|
-
# and
|
1240
|
+
# precommit token is sent back to the client as a part of the Transaction
|
1241
|
+
# message in the BeginTransaction response and also as a part of the ResultSet
|
1242
|
+
# and PartialResultSet responses.
|
1097
1243
|
# Corresponds to the JSON property `precommitToken`
|
1098
1244
|
# @return [Google::Apis::SpannerV1::MultiplexedSessionPrecommitToken]
|
1099
1245
|
attr_accessor :precommit_token
|
@@ -1103,7 +1249,7 @@ module Google
|
|
1103
1249
|
# @return [Google::Apis::SpannerV1::RequestOptions]
|
1104
1250
|
attr_accessor :request_options
|
1105
1251
|
|
1106
|
-
# If `true`, then statistics related to the transaction
|
1252
|
+
# If `true`, then statistics related to the transaction is included in the
|
1107
1253
|
# CommitResponse. Default value is `false`.
|
1108
1254
|
# Corresponds to the JSON property `returnCommitStats`
|
1109
1255
|
# @return [Boolean]
|
@@ -1343,9 +1489,9 @@ module Google
|
|
1343
1489
|
attr_accessor :commit_timestamp
|
1344
1490
|
|
1345
1491
|
# When a read-write transaction is executed on a multiplexed session, this
|
1346
|
-
# precommit token is sent back to the client as a part of the
|
1347
|
-
# message in the BeginTransaction response and also as a part of the
|
1348
|
-
# and
|
1492
|
+
# precommit token is sent back to the client as a part of the Transaction
|
1493
|
+
# message in the BeginTransaction response and also as a part of the ResultSet
|
1494
|
+
# and PartialResultSet responses.
|
1349
1495
|
# Corresponds to the JSON property `precommitToken`
|
1350
1496
|
# @return [Google::Apis::SpannerV1::MultiplexedSessionPrecommitToken]
|
1351
1497
|
attr_accessor :precommit_token
|
@@ -1958,35 +2104,37 @@ module Google
|
|
1958
2104
|
end
|
1959
2105
|
|
1960
2106
|
# CrontabSpec can be used to specify the version time and frequency at which the
|
1961
|
-
# backup
|
2107
|
+
# backup is created.
|
1962
2108
|
class CrontabSpec
|
1963
2109
|
include Google::Apis::Core::Hashable
|
1964
2110
|
|
1965
|
-
# Output only.
|
1966
|
-
#
|
1967
|
-
#
|
1968
|
-
#
|
1969
|
-
#
|
1970
|
-
#
|
2111
|
+
# Output only. Scheduled backups contain an externally consistent copy of the
|
2112
|
+
# database at the version time specified in `schedule_spec.cron_spec`. However,
|
2113
|
+
# Spanner might not initiate the creation of the scheduled backups at that
|
2114
|
+
# version time. Spanner initiates the creation of scheduled backups within the
|
2115
|
+
# time window bounded by the version_time specified in `schedule_spec.cron_spec`
|
2116
|
+
# and version_time + `creation_window`.
|
1971
2117
|
# Corresponds to the JSON property `creationWindow`
|
1972
2118
|
# @return [String]
|
1973
2119
|
attr_accessor :creation_window
|
1974
2120
|
|
1975
2121
|
# Required. Textual representation of the crontab. User can customize the backup
|
1976
2122
|
# frequency and the backup version time using the cron expression. The version
|
1977
|
-
# time must be in UTC
|
1978
|
-
# copy of the database at the version time.
|
1979
|
-
#
|
1980
|
-
#
|
1981
|
-
# every 12 hours at (2,14) hours past midnight in UTC. * `0 2 * *
|
1982
|
-
#
|
1983
|
-
#
|
1984
|
-
# midnight in UTC.
|
2123
|
+
# time must be in UTC timezone. The backup will contain an externally consistent
|
2124
|
+
# copy of the database at the version time. Full backups must be scheduled a
|
2125
|
+
# minimum of 12 hours apart and incremental backups must be scheduled a minimum
|
2126
|
+
# of 4 hours apart. Examples of valid cron specifications: * `0 2/12 * * *` :
|
2127
|
+
# every 12 hours at (2, 14) hours past midnight in UTC. * `0 2,14 * * *` : every
|
2128
|
+
# 12 hours at (2, 14) hours past midnight in UTC. * `0 */4 * * *` : (incremental
|
2129
|
+
# backups only) every 4 hours at (0, 4, 8, 12, 16, 20) hours past midnight in
|
2130
|
+
# UTC. * `0 2 * * *` : once a day at 2 past midnight in UTC. * `0 2 * * 0` :
|
2131
|
+
# once a week every Sunday at 2 past midnight in UTC. * `0 2 8 * *` : once a
|
2132
|
+
# month on 8th day at 2 past midnight in UTC.
|
1985
2133
|
# Corresponds to the JSON property `text`
|
1986
2134
|
# @return [String]
|
1987
2135
|
attr_accessor :text
|
1988
2136
|
|
1989
|
-
# Output only. The time zone of the times in `CrontabSpec.text`. Currently only
|
2137
|
+
# Output only. The time zone of the times in `CrontabSpec.text`. Currently, only
|
1990
2138
|
# UTC is supported.
|
1991
2139
|
# Corresponds to the JSON property `timeZone`
|
1992
2140
|
# @return [String]
|
@@ -2287,9 +2435,9 @@ module Google
|
|
2287
2435
|
end
|
2288
2436
|
end
|
2289
2437
|
|
2290
|
-
# The DirectedReadOptions can be used to indicate which replicas or regions
|
2291
|
-
# should be used for non-transactional reads or queries. DirectedReadOptions
|
2292
|
-
# only be specified for a read-only transaction, otherwise the API
|
2438
|
+
# The `DirectedReadOptions` can be used to indicate which replicas or regions
|
2439
|
+
# should be used for non-transactional reads or queries. `DirectedReadOptions`
|
2440
|
+
# can only be specified for a read-only transaction, otherwise the API returns
|
2293
2441
|
# an `INVALID_ARGUMENT` error.
|
2294
2442
|
class DirectedReadOptions
|
2295
2443
|
include Google::Apis::Core::Hashable
|
@@ -2300,8 +2448,8 @@ module Google
|
|
2300
2448
|
# @return [Google::Apis::SpannerV1::ExcludeReplicas]
|
2301
2449
|
attr_accessor :exclude_replicas
|
2302
2450
|
|
2303
|
-
# An IncludeReplicas contains a repeated set of ReplicaSelection which
|
2304
|
-
# the order in which replicas should be considered.
|
2451
|
+
# An `IncludeReplicas` contains a repeated set of `ReplicaSelection` which
|
2452
|
+
# indicates the order in which replicas should be considered.
|
2305
2453
|
# Corresponds to the JSON property `includeReplicas`
|
2306
2454
|
# @return [Google::Apis::SpannerV1::IncludeReplicas]
|
2307
2455
|
attr_accessor :include_replicas
|
@@ -2443,6 +2591,18 @@ module Google
|
|
2443
2591
|
class ExecuteBatchDmlRequest
|
2444
2592
|
include Google::Apis::Core::Hashable
|
2445
2593
|
|
2594
|
+
# Optional. If set to `true`, this request marks the end of the transaction.
|
2595
|
+
# After these statements execute, you must commit or abort the transaction.
|
2596
|
+
# Attempts to execute any other requests against this transaction (including
|
2597
|
+
# reads and queries) are rejected. Setting this option might cause some error
|
2598
|
+
# reporting to be deferred until commit time (for example, validation of unique
|
2599
|
+
# constraints). Given this, successful execution of statements shouldn't be
|
2600
|
+
# assumed until a subsequent `Commit` call completes successfully.
|
2601
|
+
# Corresponds to the JSON property `lastStatements`
|
2602
|
+
# @return [Boolean]
|
2603
|
+
attr_accessor :last_statements
|
2604
|
+
alias_method :last_statements?, :last_statements
|
2605
|
+
|
2446
2606
|
# Common request options for various APIs.
|
2447
2607
|
# Corresponds to the JSON property `requestOptions`
|
2448
2608
|
# @return [Google::Apis::SpannerV1::RequestOptions]
|
@@ -2450,11 +2610,11 @@ module Google
|
|
2450
2610
|
|
2451
2611
|
# Required. A per-transaction sequence number used to identify this request.
|
2452
2612
|
# This field makes each request idempotent such that if the request is received
|
2453
|
-
# multiple times, at most one
|
2613
|
+
# multiple times, at most one succeeds. The sequence number must be
|
2454
2614
|
# monotonically increasing within the transaction. If a request arrives for the
|
2455
|
-
# first time with an out-of-order sequence number, the transaction
|
2456
|
-
# aborted. Replays of previously handled requests
|
2457
|
-
#
|
2615
|
+
# first time with an out-of-order sequence number, the transaction might be
|
2616
|
+
# aborted. Replays of previously handled requests yield the same response as the
|
2617
|
+
# first execution.
|
2458
2618
|
# Corresponds to the JSON property `seqno`
|
2459
2619
|
# @return [Fixnum]
|
2460
2620
|
attr_accessor :seqno
|
@@ -2480,6 +2640,7 @@ module Google
|
|
2480
2640
|
|
2481
2641
|
# Update properties of this object
|
2482
2642
|
def update!(**args)
|
2643
|
+
@last_statements = args[:last_statements] if args.key?(:last_statements)
|
2483
2644
|
@request_options = args[:request_options] if args.key?(:request_options)
|
2484
2645
|
@seqno = args[:seqno] if args.key?(:seqno)
|
2485
2646
|
@statements = args[:statements] if args.key?(:statements)
|
@@ -2505,9 +2666,9 @@ module Google
|
|
2505
2666
|
include Google::Apis::Core::Hashable
|
2506
2667
|
|
2507
2668
|
# When a read-write transaction is executed on a multiplexed session, this
|
2508
|
-
# precommit token is sent back to the client as a part of the
|
2509
|
-
# message in the BeginTransaction response and also as a part of the
|
2510
|
-
# and
|
2669
|
+
# precommit token is sent back to the client as a part of the Transaction
|
2670
|
+
# message in the BeginTransaction response and also as a part of the ResultSet
|
2671
|
+
# and PartialResultSet responses.
|
2511
2672
|
# Corresponds to the JSON property `precommitToken`
|
2512
2673
|
# @return [Google::Apis::SpannerV1::MultiplexedSessionPrecommitToken]
|
2513
2674
|
attr_accessor :precommit_token
|
@@ -2549,26 +2710,40 @@ module Google
|
|
2549
2710
|
|
2550
2711
|
# If this is for a partitioned query and this field is set to `true`, the
|
2551
2712
|
# request is executed with Spanner Data Boost independent compute resources. If
|
2552
|
-
# the field is set to `true` but the request
|
2713
|
+
# the field is set to `true` but the request doesn't set `partition_token`, the
|
2553
2714
|
# API returns an `INVALID_ARGUMENT` error.
|
2554
2715
|
# Corresponds to the JSON property `dataBoostEnabled`
|
2555
2716
|
# @return [Boolean]
|
2556
2717
|
attr_accessor :data_boost_enabled
|
2557
2718
|
alias_method :data_boost_enabled?, :data_boost_enabled
|
2558
2719
|
|
2559
|
-
# The DirectedReadOptions can be used to indicate which replicas or regions
|
2560
|
-
# should be used for non-transactional reads or queries. DirectedReadOptions
|
2561
|
-
# only be specified for a read-only transaction, otherwise the API
|
2720
|
+
# The `DirectedReadOptions` can be used to indicate which replicas or regions
|
2721
|
+
# should be used for non-transactional reads or queries. `DirectedReadOptions`
|
2722
|
+
# can only be specified for a read-only transaction, otherwise the API returns
|
2562
2723
|
# an `INVALID_ARGUMENT` error.
|
2563
2724
|
# Corresponds to the JSON property `directedReadOptions`
|
2564
2725
|
# @return [Google::Apis::SpannerV1::DirectedReadOptions]
|
2565
2726
|
attr_accessor :directed_read_options
|
2566
2727
|
|
2567
|
-
#
|
2728
|
+
# Optional. If set to `true`, this statement marks the end of the transaction.
|
2729
|
+
# After this statement executes, you must commit or abort the transaction.
|
2730
|
+
# Attempts to execute any other requests against this transaction (including
|
2731
|
+
# reads and queries) are rejected. For DML statements, setting this option might
|
2732
|
+
# cause some error reporting to be deferred until commit time (for example,
|
2733
|
+
# validation of unique constraints). Given this, successful execution of a DML
|
2734
|
+
# statement shouldn't be assumed until a subsequent `Commit` call completes
|
2735
|
+
# successfully.
|
2736
|
+
# Corresponds to the JSON property `lastStatement`
|
2737
|
+
# @return [Boolean]
|
2738
|
+
attr_accessor :last_statement
|
2739
|
+
alias_method :last_statement?, :last_statement
|
2740
|
+
|
2741
|
+
# It isn't always possible for Cloud Spanner to infer the right SQL type from a
|
2568
2742
|
# JSON value. For example, values of type `BYTES` and values of type `STRING`
|
2569
|
-
# both appear in params as JSON strings. In these cases,
|
2570
|
-
#
|
2571
|
-
# parameters. See the definition of Type for more information about
|
2743
|
+
# both appear in params as JSON strings. In these cases, you can use `
|
2744
|
+
# param_types` to specify the exact SQL type for some or all of the SQL
|
2745
|
+
# statement parameters. See the definition of Type for more information about
|
2746
|
+
# SQL types.
|
2572
2747
|
# Corresponds to the JSON property `paramTypes`
|
2573
2748
|
# @return [Hash<String,Google::Apis::SpannerV1::Type>]
|
2574
2749
|
attr_accessor :param_types
|
@@ -2579,16 +2754,16 @@ module Google
|
|
2579
2754
|
# requirements of identifiers as specified at https://cloud.google.com/spanner/
|
2580
2755
|
# docs/lexical#identifiers. Parameters can appear anywhere that a literal value
|
2581
2756
|
# is expected. The same parameter name can be used more than once, for example: `
|
2582
|
-
# "WHERE id > @msg_id AND id < @msg_id + 100"` It
|
2757
|
+
# "WHERE id > @msg_id AND id < @msg_id + 100"` It's an error to execute a SQL
|
2583
2758
|
# statement with unbound parameters.
|
2584
2759
|
# Corresponds to the JSON property `params`
|
2585
2760
|
# @return [Hash<String,Object>]
|
2586
2761
|
attr_accessor :params
|
2587
2762
|
|
2588
|
-
# If present, results
|
2589
|
-
# created using PartitionQuery
|
2590
|
-
# fields common to this message and the PartitionQueryRequest message used to
|
2591
|
-
# create this partition_token
|
2763
|
+
# If present, results are restricted to the specified partition previously
|
2764
|
+
# created using `PartitionQuery`. There must be an exact match for the values of
|
2765
|
+
# fields common to this message and the `PartitionQueryRequest` message used to
|
2766
|
+
# create this `partition_token`.
|
2592
2767
|
# Corresponds to the JSON property `partitionToken`
|
2593
2768
|
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
2594
2769
|
# @return [String]
|
@@ -2622,11 +2797,11 @@ module Google
|
|
2622
2797
|
|
2623
2798
|
# A per-transaction sequence number used to identify this request. This field
|
2624
2799
|
# makes each request idempotent such that if the request is received multiple
|
2625
|
-
# times, at most one
|
2800
|
+
# times, at most one succeeds. The sequence number must be monotonically
|
2626
2801
|
# increasing within the transaction. If a request arrives for the first time
|
2627
|
-
# with an out-of-order sequence number, the transaction
|
2628
|
-
# of previously handled requests
|
2629
|
-
#
|
2802
|
+
# with an out-of-order sequence number, the transaction can be aborted. Replays
|
2803
|
+
# of previously handled requests yield the same response as the first execution.
|
2804
|
+
# Required for DML statements. Ignored for queries.
|
2630
2805
|
# Corresponds to the JSON property `seqno`
|
2631
2806
|
# @return [Fixnum]
|
2632
2807
|
attr_accessor :seqno
|
@@ -2650,6 +2825,7 @@ module Google
|
|
2650
2825
|
def update!(**args)
|
2651
2826
|
@data_boost_enabled = args[:data_boost_enabled] if args.key?(:data_boost_enabled)
|
2652
2827
|
@directed_read_options = args[:directed_read_options] if args.key?(:directed_read_options)
|
2828
|
+
@last_statement = args[:last_statement] if args.key?(:last_statement)
|
2653
2829
|
@param_types = args[:param_types] if args.key?(:param_types)
|
2654
2830
|
@params = args[:params] if args.key?(:params)
|
2655
2831
|
@partition_token = args[:partition_token] if args.key?(:partition_token)
|
@@ -2877,13 +3053,13 @@ module Google
|
|
2877
3053
|
end
|
2878
3054
|
end
|
2879
3055
|
|
2880
|
-
# An IncludeReplicas contains a repeated set of ReplicaSelection which
|
2881
|
-
# the order in which replicas should be considered.
|
3056
|
+
# An `IncludeReplicas` contains a repeated set of `ReplicaSelection` which
|
3057
|
+
# indicates the order in which replicas should be considered.
|
2882
3058
|
class IncludeReplicas
|
2883
3059
|
include Google::Apis::Core::Hashable
|
2884
3060
|
|
2885
|
-
# If true
|
2886
|
-
# include_replicas list when all of the specified replicas are unavailable or
|
3061
|
+
# If `true`, Spanner doesn't route requests to a replica outside the <`
|
3062
|
+
# include_replicas` list when all of the specified replicas are unavailable or
|
2887
3063
|
# unhealthy. Default value is `false`.
|
2888
3064
|
# Corresponds to the JSON property `autoFailoverDisabled`
|
2889
3065
|
# @return [Boolean]
|
@@ -3013,12 +3189,14 @@ module Google
|
|
3013
3189
|
# @return [String]
|
3014
3190
|
attr_accessor :create_time
|
3015
3191
|
|
3016
|
-
# Optional. Controls the default backup behavior for new databases
|
3017
|
-
# instance.
|
3018
|
-
#
|
3019
|
-
#
|
3020
|
-
#
|
3021
|
-
#
|
3192
|
+
# Optional. Controls the default backup schedule behavior for new databases
|
3193
|
+
# within the instance. By default, a backup schedule is created automatically
|
3194
|
+
# when a new database is created in a new instance. Note that the `AUTOMATIC`
|
3195
|
+
# value isn't permitted for free instances, as backups and backup schedules aren'
|
3196
|
+
# t supported for free instances. In the `GetInstance` or `ListInstances`
|
3197
|
+
# response, if the value of `default_backup_schedule_type` isn't set, or set to `
|
3198
|
+
# NONE`, Spanner doesn't create a default backup schedule for new databases in
|
3199
|
+
# the instance.
|
3022
3200
|
# Corresponds to the JSON property `defaultBackupScheduleType`
|
3023
3201
|
# @return [String]
|
3024
3202
|
attr_accessor :default_backup_schedule_type
|
@@ -3084,8 +3262,11 @@ module Google
|
|
3084
3262
|
# the instance. If autoscaling is enabled, `node_count` is treated as an `
|
3085
3263
|
# OUTPUT_ONLY` field and reflects the current number of nodes allocated to the
|
3086
3264
|
# instance. This might be zero in API responses for instances that are not yet
|
3087
|
-
# in the `READY` state.
|
3088
|
-
#
|
3265
|
+
# in the `READY` state. If the instance has varying node count across replicas (
|
3266
|
+
# achieved by setting `asymmetric_autoscaling_options` in the autoscaling
|
3267
|
+
# configuration), the `node_count` set here is the maximum node count across all
|
3268
|
+
# replicas. For more information, see [Compute capacity, nodes, and processing
|
3269
|
+
# units](https://cloud.google.com/spanner/docs/compute-capacity).
|
3089
3270
|
# Corresponds to the JSON property `nodeCount`
|
3090
3271
|
# @return [Fixnum]
|
3091
3272
|
attr_accessor :node_count
|
@@ -3096,9 +3277,12 @@ module Google
|
|
3096
3277
|
# processing units allocated to the instance. If autoscaling is enabled, `
|
3097
3278
|
# processing_units` is treated as an `OUTPUT_ONLY` field and reflects the
|
3098
3279
|
# current number of processing units allocated to the instance. This might be
|
3099
|
-
# zero in API responses for instances that are not yet in the `READY` state.
|
3100
|
-
#
|
3101
|
-
#
|
3280
|
+
# zero in API responses for instances that are not yet in the `READY` state. If
|
3281
|
+
# the instance has varying processing units per replica (achieved by setting `
|
3282
|
+
# asymmetric_autoscaling_options` in the autoscaling configuration), the `
|
3283
|
+
# processing_units` set here is the maximum processing units across all replicas.
|
3284
|
+
# For more information, see [Compute capacity, nodes and processing units](
|
3285
|
+
# https://cloud.google.com/spanner/docs/compute-capacity).
|
3102
3286
|
# Corresponds to the JSON property `processingUnits`
|
3103
3287
|
# @return [Fixnum]
|
3104
3288
|
attr_accessor :processing_units
|
@@ -3441,6 +3625,25 @@ module Google
|
|
3441
3625
|
end
|
3442
3626
|
end
|
3443
3627
|
|
3628
|
+
# A split key.
|
3629
|
+
class Key
|
3630
|
+
include Google::Apis::Core::Hashable
|
3631
|
+
|
3632
|
+
# Required. The column values making up the split key.
|
3633
|
+
# Corresponds to the JSON property `keyParts`
|
3634
|
+
# @return [Array<Object>]
|
3635
|
+
attr_accessor :key_parts
|
3636
|
+
|
3637
|
+
def initialize(**args)
|
3638
|
+
update!(**args)
|
3639
|
+
end
|
3640
|
+
|
3641
|
+
# Update properties of this object
|
3642
|
+
def update!(**args)
|
3643
|
+
@key_parts = args[:key_parts] if args.key?(:key_parts)
|
3644
|
+
end
|
3645
|
+
end
|
3646
|
+
|
3444
3647
|
# KeyRange represents a range of rows in a table or index. A range has a start
|
3445
3648
|
# key and an end key. These keys can be open or closed, indicating if the range
|
3446
3649
|
# includes rows with that key. Keys are represented by lists, where the ith
|
@@ -4248,9 +4451,9 @@ module Google
|
|
4248
4451
|
end
|
4249
4452
|
|
4250
4453
|
# When a read-write transaction is executed on a multiplexed session, this
|
4251
|
-
# precommit token is sent back to the client as a part of the
|
4252
|
-
# message in the BeginTransaction response and also as a part of the
|
4253
|
-
# and
|
4454
|
+
# precommit token is sent back to the client as a part of the Transaction
|
4455
|
+
# message in the BeginTransaction response and also as a part of the ResultSet
|
4456
|
+
# and PartialResultSet responses.
|
4254
4457
|
class MultiplexedSessionPrecommitToken
|
4255
4458
|
include Google::Apis::Core::Hashable
|
4256
4459
|
|
@@ -4480,15 +4683,23 @@ module Google
|
|
4480
4683
|
attr_accessor :chunked_value
|
4481
4684
|
alias_method :chunked_value?, :chunked_value
|
4482
4685
|
|
4686
|
+
# Optional. Indicates whether this is the last `PartialResultSet` in the stream.
|
4687
|
+
# The server might optionally set this field. Clients shouldn't rely on this
|
4688
|
+
# field being set in all cases.
|
4689
|
+
# Corresponds to the JSON property `last`
|
4690
|
+
# @return [Boolean]
|
4691
|
+
attr_accessor :last
|
4692
|
+
alias_method :last?, :last
|
4693
|
+
|
4483
4694
|
# Metadata about a ResultSet or PartialResultSet.
|
4484
4695
|
# Corresponds to the JSON property `metadata`
|
4485
4696
|
# @return [Google::Apis::SpannerV1::ResultSetMetadata]
|
4486
4697
|
attr_accessor :metadata
|
4487
4698
|
|
4488
4699
|
# When a read-write transaction is executed on a multiplexed session, this
|
4489
|
-
# precommit token is sent back to the client as a part of the
|
4490
|
-
# message in the BeginTransaction response and also as a part of the
|
4491
|
-
# and
|
4700
|
+
# precommit token is sent back to the client as a part of the Transaction
|
4701
|
+
# message in the BeginTransaction response and also as a part of the ResultSet
|
4702
|
+
# and PartialResultSet responses.
|
4492
4703
|
# Corresponds to the JSON property `precommitToken`
|
4493
4704
|
# @return [Google::Apis::SpannerV1::MultiplexedSessionPrecommitToken]
|
4494
4705
|
attr_accessor :precommit_token
|
@@ -4511,37 +4722,37 @@ module Google
|
|
4511
4722
|
# into many `PartialResultSet` messages to accommodate large rows and/or large
|
4512
4723
|
# values. Every N complete values defines a row, where N is equal to the number
|
4513
4724
|
# of entries in metadata.row_type.fields. Most values are encoded based on type
|
4514
|
-
# as described here. It
|
4725
|
+
# as described here. It's possible that the last value in values is "chunked",
|
4515
4726
|
# meaning that the rest of the value is sent in subsequent `PartialResultSet`(s).
|
4516
4727
|
# This is denoted by the chunked_value field. Two or more chunked values can be
|
4517
|
-
# merged to form a complete value as follows: * `bool/number/null`:
|
4728
|
+
# merged to form a complete value as follows: * `bool/number/null`: can't be
|
4518
4729
|
# chunked * `string`: concatenate the strings * `list`: concatenate the lists.
|
4519
4730
|
# If the last element in a list is a `string`, `list`, or `object`, merge it
|
4520
4731
|
# with the first element in the next list by applying these rules recursively. *
|
4521
4732
|
# `object`: concatenate the (field name, field value) pairs. If a field name is
|
4522
4733
|
# duplicated, then apply these rules recursively to merge the field values. Some
|
4523
|
-
# examples of merging:
|
4524
|
-
#
|
4525
|
-
# concatenated, but the last and first elements are merged
|
4526
|
-
# strings. ["a", "b"], ["c", "d"] => ["a", "bc", "d"]
|
4527
|
-
# but the last and first elements are merged
|
4528
|
-
#
|
4529
|
-
#
|
4530
|
-
#
|
4531
|
-
#
|
4532
|
-
#
|
4533
|
-
#
|
4534
|
-
#
|
4535
|
-
#
|
4536
|
-
#
|
4537
|
-
#
|
4538
|
-
#
|
4539
|
-
#
|
4540
|
-
#
|
4541
|
-
#
|
4542
|
-
#
|
4543
|
-
#
|
4544
|
-
#
|
4734
|
+
# examples of merging: Strings are concatenated. "foo", "bar" => "foobar" Lists
|
4735
|
+
# of non-strings are concatenated. [2, 3], [4] => [2, 3, 4] Lists are
|
4736
|
+
# concatenated, but the last and first elements are merged because they are
|
4737
|
+
# strings. ["a", "b"], ["c", "d"] => ["a", "bc", "d"] Lists are concatenated,
|
4738
|
+
# but the last and first elements are merged because they are lists. Recursively,
|
4739
|
+
# the last and first elements of the inner lists are merged because they are
|
4740
|
+
# strings. ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] Non-
|
4741
|
+
# overlapping object fields are combined. `"a": "1"`, `"b": "2"` => `"a": "1", "
|
4742
|
+
# b": 2"` Overlapping object fields are merged. `"a": "1"`, `"a": "2"` => `"a": "
|
4743
|
+
# 12"` Examples of merging objects containing lists of strings. `"a": ["1"]`, `"
|
4744
|
+
# a": ["2"]` => `"a": ["12"]` For a more complete example, suppose a streaming
|
4745
|
+
# SQL query is yielding a result set whose rows contain a single string field.
|
4746
|
+
# The following `PartialResultSet`s might be yielded: ` "metadata": ` ... ` "
|
4747
|
+
# values": ["Hello", "W"] "chunked_value": true "resume_token": "Af65..." ` ` "
|
4748
|
+
# values": ["orl"] "chunked_value": true ` ` "values": ["d"] "resume_token": "
|
4749
|
+
# Zx1B..." ` This sequence of `PartialResultSet`s encodes two rows, one
|
4750
|
+
# containing the field value `"Hello"`, and a second containing the field value `
|
4751
|
+
# "World" = "W" + "orl" + "d"`. Not all `PartialResultSet`s contain a `
|
4752
|
+
# resume_token`. Execution can only be resumed from a previously yielded `
|
4753
|
+
# resume_token`. For the above sequence of `PartialResultSet`s, resuming the
|
4754
|
+
# query with `"resume_token": "Af65..."` yields results from the `
|
4755
|
+
# PartialResultSet` with value "orl".
|
4545
4756
|
# Corresponds to the JSON property `values`
|
4546
4757
|
# @return [Array<Object>]
|
4547
4758
|
attr_accessor :values
|
@@ -4553,6 +4764,7 @@ module Google
|
|
4553
4764
|
# Update properties of this object
|
4554
4765
|
def update!(**args)
|
4555
4766
|
@chunked_value = args[:chunked_value] if args.key?(:chunked_value)
|
4767
|
+
@last = args[:last] if args.key?(:last)
|
4556
4768
|
@metadata = args[:metadata] if args.key?(:metadata)
|
4557
4769
|
@precommit_token = args[:precommit_token] if args.key?(:precommit_token)
|
4558
4770
|
@resume_token = args[:resume_token] if args.key?(:resume_token)
|
@@ -4565,8 +4777,8 @@ module Google
|
|
4565
4777
|
class Partition
|
4566
4778
|
include Google::Apis::Core::Hashable
|
4567
4779
|
|
4568
|
-
# This token can be passed to Read
|
4569
|
-
# ExecuteStreamingSql requests to restrict the results to those identified by
|
4780
|
+
# This token can be passed to `Read`, `StreamingRead`, `ExecuteSql`, or `
|
4781
|
+
# ExecuteStreamingSql` requests to restrict the results to those identified by
|
4570
4782
|
# this partition token.
|
4571
4783
|
# Corresponds to the JSON property `partitionToken`
|
4572
4784
|
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
@@ -4583,24 +4795,24 @@ module Google
|
|
4583
4795
|
end
|
4584
4796
|
end
|
4585
4797
|
|
4586
|
-
# Options for a PartitionQueryRequest and PartitionReadRequest
|
4798
|
+
# Options for a `PartitionQueryRequest` and `PartitionReadRequest`.
|
4587
4799
|
class PartitionOptions
|
4588
4800
|
include Google::Apis::Core::Hashable
|
4589
4801
|
|
4590
|
-
# **Note:** This hint is currently ignored by PartitionQuery and
|
4591
|
-
# requests. The desired maximum number of partitions to return.
|
4592
|
-
# this
|
4593
|
-
# option is currently 10,000. The maximum value is currently 200,000.
|
4594
|
-
# only a hint. The actual number of partitions returned
|
4595
|
-
# than this maximum count request.
|
4802
|
+
# **Note:** This hint is currently ignored by `PartitionQuery` and `
|
4803
|
+
# PartitionRead` requests. The desired maximum number of partitions to return.
|
4804
|
+
# For example, this might be set to the number of workers available. The default
|
4805
|
+
# for this option is currently 10,000. The maximum value is currently 200,000.
|
4806
|
+
# This is only a hint. The actual number of partitions returned can be smaller
|
4807
|
+
# or larger than this maximum count request.
|
4596
4808
|
# Corresponds to the JSON property `maxPartitions`
|
4597
4809
|
# @return [Fixnum]
|
4598
4810
|
attr_accessor :max_partitions
|
4599
4811
|
|
4600
|
-
# **Note:** This hint is currently ignored by PartitionQuery and
|
4601
|
-
# requests. The desired data size for each partition generated.
|
4602
|
-
# this option is currently 1 GiB. This is only a hint. The
|
4603
|
-
# partition
|
4812
|
+
# **Note:** This hint is currently ignored by `PartitionQuery` and `
|
4813
|
+
# PartitionRead` requests. The desired data size for each partition generated.
|
4814
|
+
# The default for this option is currently 1 GiB. This is only a hint. The
|
4815
|
+
# actual size of each partition can be smaller or larger than this size request.
|
4604
4816
|
# Corresponds to the JSON property `partitionSizeBytes`
|
4605
4817
|
# @return [Fixnum]
|
4606
4818
|
attr_accessor :partition_size_bytes
|
@@ -4620,7 +4832,7 @@ module Google
|
|
4620
4832
|
class PartitionQueryRequest
|
4621
4833
|
include Google::Apis::Core::Hashable
|
4622
4834
|
|
4623
|
-
# It
|
4835
|
+
# It isn't always possible for Cloud Spanner to infer the right SQL type from a
|
4624
4836
|
# JSON value. For example, values of type `BYTES` and values of type `STRING`
|
4625
4837
|
# both appear in params as JSON strings. In these cases, `param_types` can be
|
4626
4838
|
# used to specify the exact SQL type for some or all of the SQL query parameters.
|
@@ -4634,25 +4846,25 @@ module Google
|
|
4634
4846
|
# name (for example, `@firstName`). Parameter names can contain letters, numbers,
|
4635
4847
|
# and underscores. Parameters can appear anywhere that a literal value is
|
4636
4848
|
# expected. The same parameter name can be used more than once, for example: `"
|
4637
|
-
# WHERE id > @msg_id AND id < @msg_id + 100"` It
|
4849
|
+
# WHERE id > @msg_id AND id < @msg_id + 100"` It's an error to execute a SQL
|
4638
4850
|
# statement with unbound parameters.
|
4639
4851
|
# Corresponds to the JSON property `params`
|
4640
4852
|
# @return [Hash<String,Object>]
|
4641
4853
|
attr_accessor :params
|
4642
4854
|
|
4643
|
-
# Options for a PartitionQueryRequest and PartitionReadRequest
|
4855
|
+
# Options for a `PartitionQueryRequest` and `PartitionReadRequest`.
|
4644
4856
|
# Corresponds to the JSON property `partitionOptions`
|
4645
4857
|
# @return [Google::Apis::SpannerV1::PartitionOptions]
|
4646
4858
|
attr_accessor :partition_options
|
4647
4859
|
|
4648
4860
|
# Required. The query request to generate partitions for. The request fails if
|
4649
|
-
# the query
|
4861
|
+
# the query isn't root partitionable. For a query to be root partitionable, it
|
4650
4862
|
# needs to satisfy a few conditions. For example, if the query execution plan
|
4651
4863
|
# contains a distributed union operator, then it must be the first operator in
|
4652
4864
|
# the plan. For more information about other conditions, see [Read data in
|
4653
4865
|
# parallel](https://cloud.google.com/spanner/docs/reads#read_data_in_parallel).
|
4654
4866
|
# The query request must not contain DML commands, such as `INSERT`, `UPDATE`,
|
4655
|
-
# or `DELETE`. Use `ExecuteStreamingSql` with a PartitionedDml transaction for
|
4867
|
+
# or `DELETE`. Use `ExecuteStreamingSql` with a `PartitionedDml` transaction for
|
4656
4868
|
# large, partition-friendly DML operations.
|
4657
4869
|
# Corresponds to the JSON property `sql`
|
4658
4870
|
# @return [String]
|
@@ -4703,7 +4915,7 @@ module Google
|
|
4703
4915
|
# @return [Google::Apis::SpannerV1::KeySet]
|
4704
4916
|
attr_accessor :key_set
|
4705
4917
|
|
4706
|
-
# Options for a PartitionQueryRequest and PartitionReadRequest
|
4918
|
+
# Options for a `PartitionQueryRequest` and `PartitionReadRequest`.
|
4707
4919
|
# Corresponds to the JSON property `partitionOptions`
|
4708
4920
|
# @return [Google::Apis::SpannerV1::PartitionOptions]
|
4709
4921
|
attr_accessor :partition_options
|
@@ -5004,10 +5216,10 @@ module Google
|
|
5004
5216
|
# statistics package. Specifying `latest` as a value instructs Cloud Spanner to
|
5005
5217
|
# use the latest generated statistics package. If not specified, Cloud Spanner
|
5006
5218
|
# uses the statistics package set at the database level options, or the latest
|
5007
|
-
# package if the database option
|
5219
|
+
# package if the database option isn't set. The statistics package requested by
|
5008
5220
|
# the query has to be exempt from garbage collection. This can be achieved with
|
5009
|
-
# the following DDL statement: ``` ALTER STATISTICS SET OPTIONS (allow_gc=
|
5010
|
-
# ``` The list of available statistics packages can be queried from `
|
5221
|
+
# the following DDL statement: ```sql ALTER STATISTICS SET OPTIONS (allow_gc=
|
5222
|
+
# false) ``` The list of available statistics packages can be queried from `
|
5011
5223
|
# INFORMATION_SCHEMA.SPANNER_STATISTICS`. Executing a SQL statement with an
|
5012
5224
|
# invalid optimizer statistics package or with a statistics package that allows
|
5013
5225
|
# garbage collection fails with an `INVALID_ARGUMENT` error.
|
@@ -5021,8 +5233,8 @@ module Google
|
|
5021
5233
|
# optimizer version. If not specified, Cloud Spanner uses the optimizer version
|
5022
5234
|
# set at the database level options. Any other positive integer (from the list
|
5023
5235
|
# of supported optimizer versions) overrides the default optimizer version for
|
5024
|
-
# query execution. The list of supported optimizer versions can be queried from
|
5025
|
-
# SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS
|
5236
|
+
# query execution. The list of supported optimizer versions can be queried from `
|
5237
|
+
# SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS`. Executing a SQL statement with an
|
5026
5238
|
# invalid optimizer version fails with an `INVALID_ARGUMENT` error. See https://
|
5027
5239
|
# cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer for more
|
5028
5240
|
# information on managing the query optimizer. The `optimizer_version` statement
|
@@ -5222,16 +5434,16 @@ module Google
|
|
5222
5434
|
|
5223
5435
|
# If this is for a partitioned read and this field is set to `true`, the request
|
5224
5436
|
# is executed with Spanner Data Boost independent compute resources. If the
|
5225
|
-
# field is set to `true` but the request
|
5437
|
+
# field is set to `true` but the request doesn't set `partition_token`, the API
|
5226
5438
|
# returns an `INVALID_ARGUMENT` error.
|
5227
5439
|
# Corresponds to the JSON property `dataBoostEnabled`
|
5228
5440
|
# @return [Boolean]
|
5229
5441
|
attr_accessor :data_boost_enabled
|
5230
5442
|
alias_method :data_boost_enabled?, :data_boost_enabled
|
5231
5443
|
|
5232
|
-
# The DirectedReadOptions can be used to indicate which replicas or regions
|
5233
|
-
# should be used for non-transactional reads or queries. DirectedReadOptions
|
5234
|
-
# only be specified for a read-only transaction, otherwise the API
|
5444
|
+
# The `DirectedReadOptions` can be used to indicate which replicas or regions
|
5445
|
+
# should be used for non-transactional reads or queries. `DirectedReadOptions`
|
5446
|
+
# can only be specified for a read-only transaction, otherwise the API returns
|
5235
5447
|
# an `INVALID_ARGUMENT` error.
|
5236
5448
|
# Corresponds to the JSON property `directedReadOptions`
|
5237
5449
|
# @return [Google::Apis::SpannerV1::DirectedReadOptions]
|
@@ -5254,7 +5466,7 @@ module Google
|
|
5254
5466
|
attr_accessor :key_set
|
5255
5467
|
|
5256
5468
|
# If greater than zero, only the first `limit` rows are yielded. If `limit` is
|
5257
|
-
# zero, the default is no limit. A limit
|
5469
|
+
# zero, the default is no limit. A limit can't be specified if `partition_token`
|
5258
5470
|
# is set.
|
5259
5471
|
# Corresponds to the JSON property `limit`
|
5260
5472
|
# @return [Fixnum]
|
@@ -5266,18 +5478,18 @@ module Google
|
|
5266
5478
|
# @return [String]
|
5267
5479
|
attr_accessor :lock_hint
|
5268
5480
|
|
5269
|
-
# Optional. Order for the returned rows. By default, Spanner
|
5270
|
-
#
|
5271
|
-
#
|
5481
|
+
# Optional. Order for the returned rows. By default, Spanner returns result rows
|
5482
|
+
# in primary key order except for PartitionRead requests. For applications that
|
5483
|
+
# don't require rows to be returned in primary key (`ORDER_BY_PRIMARY_KEY`)
|
5272
5484
|
# order, setting `ORDER_BY_NO_ORDER` option allows Spanner to optimize row
|
5273
|
-
# retrieval, resulting in lower latencies in certain cases (
|
5274
|
-
# lookups).
|
5485
|
+
# retrieval, resulting in lower latencies in certain cases (for example, bulk
|
5486
|
+
# point lookups).
|
5275
5487
|
# Corresponds to the JSON property `orderBy`
|
5276
5488
|
# @return [String]
|
5277
5489
|
attr_accessor :order_by
|
5278
5490
|
|
5279
|
-
# If present, results
|
5280
|
-
# created using PartitionRead
|
5491
|
+
# If present, results are restricted to the specified partition previously
|
5492
|
+
# created using `PartitionRead`. There must be an exact match for the values of
|
5281
5493
|
# fields common to this message and the PartitionReadRequest message used to
|
5282
5494
|
# create this partition_token.
|
5283
5495
|
# Corresponds to the JSON property `partitionToken`
|
@@ -5434,15 +5646,15 @@ module Google
|
|
5434
5646
|
# following fields for replica selection: * `location` - The location must be
|
5435
5647
|
# one of the regions within the multi-region configuration of your database. * `
|
5436
5648
|
# type` - The type of the replica. Some examples of using replica_selectors are:
|
5437
|
-
# * `location:us-east1` --> The "us-east1" replica(s) of any available type
|
5438
|
-
#
|
5439
|
-
# replica(s) in nearest available location
|
5649
|
+
# * `location:us-east1` --> The "us-east1" replica(s) of any available type is
|
5650
|
+
# used to process the request. * `type:READ_ONLY` --> The "READ_ONLY" type
|
5651
|
+
# replica(s) in the nearest available location are used to process the request. *
|
5440
5652
|
# `location:us-east1 type:READ_ONLY` --> The "READ_ONLY" type replica(s) in
|
5441
|
-
# location "us-east1"
|
5653
|
+
# location "us-east1" is used to process the request.
|
5442
5654
|
class ReplicaSelection
|
5443
5655
|
include Google::Apis::Core::Hashable
|
5444
5656
|
|
5445
|
-
# The location or region of the serving requests,
|
5657
|
+
# The location or region of the serving requests, for example, "us-east1".
|
5446
5658
|
# Corresponds to the JSON property `location`
|
5447
5659
|
# @return [String]
|
5448
5660
|
attr_accessor :location
|
@@ -5473,26 +5685,26 @@ module Google
|
|
5473
5685
|
attr_accessor :priority
|
5474
5686
|
|
5475
5687
|
# A per-request tag which can be applied to queries or reads, used for
|
5476
|
-
# statistics collection. Both request_tag and transaction_tag can be
|
5477
|
-
# for a read or query that belongs to a transaction. This field is
|
5478
|
-
# requests where it's not applicable (
|
5479
|
-
# request_tag` values are all printable characters (ASCII
|
5480
|
-
# length of a request_tag is limited to 50 characters. Values
|
5481
|
-
# limit are truncated. Any leading underscore (_) characters
|
5482
|
-
# from the string.
|
5688
|
+
# statistics collection. Both `request_tag` and `transaction_tag` can be
|
5689
|
+
# specified for a read or query that belongs to a transaction. This field is
|
5690
|
+
# ignored for requests where it's not applicable (for example, `CommitRequest`).
|
5691
|
+
# Legal characters for `request_tag` values are all printable characters (ASCII
|
5692
|
+
# 32 - 126) and the length of a request_tag is limited to 50 characters. Values
|
5693
|
+
# that exceed this limit are truncated. Any leading underscore (_) characters
|
5694
|
+
# are removed from the string.
|
5483
5695
|
# Corresponds to the JSON property `requestTag`
|
5484
5696
|
# @return [String]
|
5485
5697
|
attr_accessor :request_tag
|
5486
5698
|
|
5487
|
-
# A tag used for statistics collection about this transaction. Both request_tag
|
5488
|
-
# and transaction_tag can be specified for a read or query that belongs to a
|
5699
|
+
# A tag used for statistics collection about this transaction. Both `request_tag`
|
5700
|
+
# and `transaction_tag` can be specified for a read or query that belongs to a
|
5489
5701
|
# transaction. The value of transaction_tag should be the same for all requests
|
5490
5702
|
# belonging to the same transaction. If this request doesn't belong to any
|
5491
|
-
# transaction, transaction_tag
|
5703
|
+
# transaction, `transaction_tag` is ignored. Legal characters for `
|
5492
5704
|
# transaction_tag` values are all printable characters (ASCII 32 - 126) and the
|
5493
|
-
# length of a transaction_tag is limited to 50 characters. Values that exceed
|
5494
|
-
# this limit are truncated. Any leading underscore (_) characters
|
5495
|
-
#
|
5705
|
+
# length of a `transaction_tag` is limited to 50 characters. Values that exceed
|
5706
|
+
# this limit are truncated. Any leading underscore (_) characters are removed
|
5707
|
+
# from the string.
|
5496
5708
|
# Corresponds to the JSON property `transactionTag`
|
5497
5709
|
# @return [String]
|
5498
5710
|
attr_accessor :transaction_tag
|
@@ -5687,9 +5899,9 @@ module Google
|
|
5687
5899
|
attr_accessor :metadata
|
5688
5900
|
|
5689
5901
|
# When a read-write transaction is executed on a multiplexed session, this
|
5690
|
-
# precommit token is sent back to the client as a part of the
|
5691
|
-
# message in the BeginTransaction response and also as a part of the
|
5692
|
-
# and
|
5902
|
+
# precommit token is sent back to the client as a part of the Transaction
|
5903
|
+
# message in the BeginTransaction response and also as a part of the ResultSet
|
5904
|
+
# and PartialResultSet responses.
|
5693
5905
|
# Corresponds to the JSON property `precommitToken`
|
5694
5906
|
# @return [Google::Apis::SpannerV1::MultiplexedSessionPrecommitToken]
|
5695
5907
|
attr_accessor :precommit_token
|
@@ -5771,7 +5983,7 @@ module Google
|
|
5771
5983
|
# @return [Fixnum]
|
5772
5984
|
attr_accessor :row_count_exact
|
5773
5985
|
|
5774
|
-
# Partitioned DML
|
5986
|
+
# Partitioned DML doesn't offer exactly-once semantics, so it returns a lower
|
5775
5987
|
# bound of the rows modified.
|
5776
5988
|
# Corresponds to the JSON property `rowCountLowerBound`
|
5777
5989
|
# @return [Fixnum]
|
@@ -5895,7 +6107,7 @@ module Google
|
|
5895
6107
|
class Session
|
5896
6108
|
include Google::Apis::Core::Hashable
|
5897
6109
|
|
5898
|
-
# Output only. The approximate timestamp when the session is last used. It
|
6110
|
+
# Output only. The approximate timestamp when the session is last used. It's
|
5899
6111
|
# typically earlier than the actual last use time.
|
5900
6112
|
# Corresponds to the JSON property `approximateLastUseTime`
|
5901
6113
|
# @return [String]
|
@@ -5921,11 +6133,11 @@ module Google
|
|
5921
6133
|
# @return [Hash<String,String>]
|
5922
6134
|
attr_accessor :labels
|
5923
6135
|
|
5924
|
-
# Optional. If true
|
5925
|
-
# for multiple, concurrent read-only operations. Don't use them for read-
|
5926
|
-
# transactions, partitioned reads, or partitioned queries. Use
|
5927
|
-
# create multiplexed sessions. Don't use BatchCreateSessions to
|
5928
|
-
# multiplexed session. You can't delete or list multiplexed sessions.
|
6136
|
+
# Optional. If `true`, specifies a multiplexed session. Use a multiplexed
|
6137
|
+
# session for multiple, concurrent read-only operations. Don't use them for read-
|
6138
|
+
# write transactions, partitioned reads, or partitioned queries. Use `sessions.
|
6139
|
+
# create` to create multiplexed sessions. Don't use BatchCreateSessions to
|
6140
|
+
# create a multiplexed session. You can't delete or list multiplexed sessions.
|
5929
6141
|
# Corresponds to the JSON property `multiplexed`
|
5930
6142
|
# @return [Boolean]
|
5931
6143
|
attr_accessor :multiplexed
|
@@ -6048,11 +6260,51 @@ module Google
|
|
6048
6260
|
end
|
6049
6261
|
end
|
6050
6262
|
|
6263
|
+
# The split points of a table/index.
|
6264
|
+
class SplitPoints
|
6265
|
+
include Google::Apis::Core::Hashable
|
6266
|
+
|
6267
|
+
# Optional. The expiration timestamp of the split points. A timestamp in the
|
6268
|
+
# past means immediate expiration. The maximum value can be 30 days in the
|
6269
|
+
# future. Defaults to 10 days in the future if not specified.
|
6270
|
+
# Corresponds to the JSON property `expireTime`
|
6271
|
+
# @return [String]
|
6272
|
+
attr_accessor :expire_time
|
6273
|
+
|
6274
|
+
# The index to split. If specified, the `table` field must refer to the index's
|
6275
|
+
# base table.
|
6276
|
+
# Corresponds to the JSON property `index`
|
6277
|
+
# @return [String]
|
6278
|
+
attr_accessor :index
|
6279
|
+
|
6280
|
+
# Required. The list of split keys, i.e., the split boundaries.
|
6281
|
+
# Corresponds to the JSON property `keys`
|
6282
|
+
# @return [Array<Google::Apis::SpannerV1::Key>]
|
6283
|
+
attr_accessor :keys
|
6284
|
+
|
6285
|
+
# The table to split.
|
6286
|
+
# Corresponds to the JSON property `table`
|
6287
|
+
# @return [String]
|
6288
|
+
attr_accessor :table
|
6289
|
+
|
6290
|
+
def initialize(**args)
|
6291
|
+
update!(**args)
|
6292
|
+
end
|
6293
|
+
|
6294
|
+
# Update properties of this object
|
6295
|
+
def update!(**args)
|
6296
|
+
@expire_time = args[:expire_time] if args.key?(:expire_time)
|
6297
|
+
@index = args[:index] if args.key?(:index)
|
6298
|
+
@keys = args[:keys] if args.key?(:keys)
|
6299
|
+
@table = args[:table] if args.key?(:table)
|
6300
|
+
end
|
6301
|
+
end
|
6302
|
+
|
6051
6303
|
# A single DML statement.
|
6052
6304
|
class Statement
|
6053
6305
|
include Google::Apis::Core::Hashable
|
6054
6306
|
|
6055
|
-
# It
|
6307
|
+
# It isn't always possible for Cloud Spanner to infer the right SQL type from a
|
6056
6308
|
# JSON value. For example, values of type `BYTES` and values of type `STRING`
|
6057
6309
|
# both appear in params as JSON strings. In these cases, `param_types` can be
|
6058
6310
|
# used to specify the exact SQL type for some or all of the SQL statement
|
@@ -6066,7 +6318,7 @@ module Google
|
|
6066
6318
|
# name (for example, `@firstName`). Parameter names can contain letters, numbers,
|
6067
6319
|
# and underscores. Parameters can appear anywhere that a literal value is
|
6068
6320
|
# expected. The same parameter name can be used more than once, for example: `"
|
6069
|
-
# WHERE id > @msg_id AND id < @msg_id + 100"` It
|
6321
|
+
# WHERE id > @msg_id AND id < @msg_id + 100"` It's an error to execute a SQL
|
6070
6322
|
# statement with unbound parameters.
|
6071
6323
|
# Corresponds to the JSON property `params`
|
6072
6324
|
# @return [Hash<String,Object>]
|
@@ -6203,9 +6455,9 @@ module Google
|
|
6203
6455
|
attr_accessor :id
|
6204
6456
|
|
6205
6457
|
# When a read-write transaction is executed on a multiplexed session, this
|
6206
|
-
# precommit token is sent back to the client as a part of the
|
6207
|
-
# message in the BeginTransaction response and also as a part of the
|
6208
|
-
# and
|
6458
|
+
# precommit token is sent back to the client as a part of the Transaction
|
6459
|
+
# message in the BeginTransaction response and also as a part of the ResultSet
|
6460
|
+
# and PartialResultSet responses.
|
6209
6461
|
# Corresponds to the JSON property `precommitToken`
|
6210
6462
|
# @return [Google::Apis::SpannerV1::MultiplexedSessionPrecommitToken]
|
6211
6463
|
attr_accessor :precommit_token
|
@@ -6441,6 +6693,11 @@ module Google
|
|
6441
6693
|
attr_accessor :exclude_txn_from_change_streams
|
6442
6694
|
alias_method :exclude_txn_from_change_streams?, :exclude_txn_from_change_streams
|
6443
6695
|
|
6696
|
+
# Isolation level for the transaction.
|
6697
|
+
# Corresponds to the JSON property `isolationLevel`
|
6698
|
+
# @return [String]
|
6699
|
+
attr_accessor :isolation_level
|
6700
|
+
|
6444
6701
|
# Message type to initiate a Partitioned DML transaction.
|
6445
6702
|
# Corresponds to the JSON property `partitionedDml`
|
6446
6703
|
# @return [Google::Apis::SpannerV1::PartitionedDml]
|
@@ -6464,6 +6721,7 @@ module Google
|
|
6464
6721
|
# Update properties of this object
|
6465
6722
|
def update!(**args)
|
6466
6723
|
@exclude_txn_from_change_streams = args[:exclude_txn_from_change_streams] if args.key?(:exclude_txn_from_change_streams)
|
6724
|
+
@isolation_level = args[:isolation_level] if args.key?(:isolation_level)
|
6467
6725
|
@partitioned_dml = args[:partitioned_dml] if args.key?(:partitioned_dml)
|
6468
6726
|
@read_only = args[:read_only] if args.key?(:read_only)
|
6469
6727
|
@read_write = args[:read_write] if args.key?(:read_write)
|
@@ -7025,7 +7283,7 @@ module Google
|
|
7025
7283
|
attr_accessor :operation_id
|
7026
7284
|
|
7027
7285
|
# Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements.
|
7028
|
-
# Contains a protobuf-serialized [google.
|
7286
|
+
# Contains a protobuf-serialized [google.protobuf.FileDescriptorSet](https://
|
7029
7287
|
# github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.
|
7030
7288
|
# proto). To generate it, [install](https://grpc.io/docs/protoc-installation/)
|
7031
7289
|
# and run `protoc` with --include_imports and --descriptor_set_out. For example,
|