google-cloud-spanner-v1 0.11.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/lib/google/cloud/spanner/v1/version.rb +1 -1
- data/lib/google/spanner/v1/result_set_pb.rb +1 -0
- data/lib/google/spanner/v1/transaction_pb.rb +7 -0
- data/proto_docs/google/spanner/v1/result_set.rb +12 -0
- data/proto_docs/google/spanner/v1/transaction.rb +40 -7
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 506e5f2c7f94609ad28e4a3d6d53a00ea9512e861999529e85cca4ab1d3a7fd1
|
4
|
+
data.tar.gz: c3998ce28c3c96271b0354c47cffd670ca43ac1193c33587a758da2593ba489a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2e57a196955b402002d7a50965d08eb676360188d59e063b478635d2a972f458b7643f298414b135738b53fe1234307fefbb3cc091715437b81c6a68220fe93
|
7
|
+
data.tar.gz: 35c0bf23032ad50669c14e5035893d968d100e4e90639cf6ccd787a9647bace9513d8d6a44ec44a96b28adf4b4220ca29d1caad4f38e6f330d76b557f31282c1
|
data/AUTHENTICATION.md
CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
|
|
114
114
|
To configure your system for this, simply:
|
115
115
|
|
116
116
|
1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
|
117
|
-
2. Authenticate using OAuth 2.0 `$ gcloud auth login`
|
117
|
+
2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
|
118
118
|
3. Write code as if already authenticated.
|
119
119
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
@@ -25,6 +25,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
25
25
|
add_message "google.spanner.v1.ResultSetMetadata" do
|
26
26
|
optional :row_type, :message, 1, "google.spanner.v1.StructType"
|
27
27
|
optional :transaction, :message, 2, "google.spanner.v1.Transaction"
|
28
|
+
optional :undeclared_parameters, :message, 3, "google.spanner.v1.StructType"
|
28
29
|
end
|
29
30
|
add_message "google.spanner.v1.ResultSetStats" do
|
30
31
|
optional :query_plan, :message, 1, "google.spanner.v1.QueryPlan"
|
@@ -16,6 +16,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
add_message "google.spanner.v1.TransactionOptions.ReadWrite" do
|
19
|
+
optional :read_lock_mode, :enum, 1, "google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode"
|
20
|
+
end
|
21
|
+
add_enum "google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode" do
|
22
|
+
value :READ_LOCK_MODE_UNSPECIFIED, 0
|
23
|
+
value :PESSIMISTIC, 1
|
24
|
+
value :OPTIMISTIC, 2
|
19
25
|
end
|
20
26
|
add_message "google.spanner.v1.TransactionOptions.PartitionedDml" do
|
21
27
|
end
|
@@ -49,6 +55,7 @@ module Google
|
|
49
55
|
module V1
|
50
56
|
TransactionOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TransactionOptions").msgclass
|
51
57
|
TransactionOptions::ReadWrite = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TransactionOptions.ReadWrite").msgclass
|
58
|
+
TransactionOptions::ReadWrite::ReadLockMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode").enummodule
|
52
59
|
TransactionOptions::PartitionedDml = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TransactionOptions.PartitionedDml").msgclass
|
53
60
|
TransactionOptions::ReadOnly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TransactionOptions.ReadOnly").msgclass
|
54
61
|
Transaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Transaction").msgclass
|
@@ -171,6 +171,18 @@ module Google
|
|
171
171
|
# @return [::Google::Cloud::Spanner::V1::Transaction]
|
172
172
|
# If the read or SQL query began a transaction as a side-effect, the
|
173
173
|
# information about the new transaction is yielded here.
|
174
|
+
# @!attribute [rw] undeclared_parameters
|
175
|
+
# @return [::Google::Cloud::Spanner::V1::StructType]
|
176
|
+
# A SQL query can be parameterized. In PLAN mode, these parameters can be
|
177
|
+
# undeclared. This indicates the field names and types for those undeclared
|
178
|
+
# parameters in the SQL query. For example, a SQL query like `"SELECT * FROM
|
179
|
+
# Users where UserId = @userId and UserName = @userName "` could return a
|
180
|
+
# `undeclared_parameters` value like:
|
181
|
+
#
|
182
|
+
# "fields": [
|
183
|
+
# { "name": "UserId", "type": { "code": "INT64" } },
|
184
|
+
# { "name": "UserName", "type": { "code": "STRING" } },
|
185
|
+
# ]
|
174
186
|
class ResultSetMetadata
|
175
187
|
include ::Google::Protobuf::MessageExts
|
176
188
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -50,7 +50,8 @@ module Google
|
|
50
50
|
#
|
51
51
|
# Queries on change streams must be performed with the snapshot read-only
|
52
52
|
# transaction mode, specifying a strong read. Please see
|
53
|
-
# {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#strong TransactionOptions.ReadOnly.strong}
|
53
|
+
# {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#strong TransactionOptions.ReadOnly.strong}
|
54
|
+
# for more details.
|
54
55
|
#
|
55
56
|
# 3. Partitioned DML. This type of transaction is used to execute
|
56
57
|
# a single Partitioned DML statement. Partitioned DML partitions
|
@@ -186,7 +187,8 @@ module Google
|
|
186
187
|
# Queries on change streams (see below for more details) must also specify
|
187
188
|
# the strong read timestamp bound.
|
188
189
|
#
|
189
|
-
# See
|
190
|
+
# See
|
191
|
+
# {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#strong TransactionOptions.ReadOnly.strong}.
|
190
192
|
#
|
191
193
|
# Exact staleness:
|
192
194
|
#
|
@@ -207,7 +209,9 @@ module Google
|
|
207
209
|
# equivalent boundedly stale concurrency modes. On the other hand,
|
208
210
|
# boundedly stale reads usually return fresher results.
|
209
211
|
#
|
210
|
-
# See
|
212
|
+
# See
|
213
|
+
# {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#read_timestamp TransactionOptions.ReadOnly.read_timestamp}
|
214
|
+
# and
|
211
215
|
# {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#exact_staleness TransactionOptions.ReadOnly.exact_staleness}.
|
212
216
|
#
|
213
217
|
# Bounded staleness:
|
@@ -237,7 +241,9 @@ module Google
|
|
237
241
|
# which rows will be read, it can only be used with single-use
|
238
242
|
# read-only transactions.
|
239
243
|
#
|
240
|
-
# See
|
244
|
+
# See
|
245
|
+
# {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#max_staleness TransactionOptions.ReadOnly.max_staleness}
|
246
|
+
# and
|
241
247
|
# {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#min_read_timestamp TransactionOptions.ReadOnly.min_read_timestamp}.
|
242
248
|
#
|
243
249
|
# Old read timestamps and garbage collection:
|
@@ -366,9 +372,33 @@ module Google
|
|
366
372
|
|
367
373
|
# Message type to initiate a read-write transaction. Currently this
|
368
374
|
# transaction type has no options.
|
375
|
+
# @!attribute [rw] read_lock_mode
|
376
|
+
# @return [::Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite::ReadLockMode]
|
377
|
+
# Read lock mode for the transaction.
|
369
378
|
class ReadWrite
|
370
379
|
include ::Google::Protobuf::MessageExts
|
371
380
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
381
|
+
|
382
|
+
# `ReadLockMode` is used to set the read lock mode for read-write
|
383
|
+
# transactions.
|
384
|
+
module ReadLockMode
|
385
|
+
# Default value.
|
386
|
+
#
|
387
|
+
# If the value is not specified, the pessimistic read lock is used.
|
388
|
+
READ_LOCK_MODE_UNSPECIFIED = 0
|
389
|
+
|
390
|
+
# Pessimistic lock mode.
|
391
|
+
#
|
392
|
+
# Read locks are acquired immediately on read.
|
393
|
+
PESSIMISTIC = 1
|
394
|
+
|
395
|
+
# Optimistic lock mode.
|
396
|
+
#
|
397
|
+
# Locks for reads within the transaction are not acquired on read.
|
398
|
+
# Instead the locks are acquired on a commit to validate that
|
399
|
+
# read/queried data has not changed since the transaction started.
|
400
|
+
OPTIMISTIC = 2
|
401
|
+
end
|
372
402
|
end
|
373
403
|
|
374
404
|
# Message type to initiate a Partitioned DML transaction.
|
@@ -439,7 +469,8 @@ module Google
|
|
439
469
|
# @!attribute [rw] return_read_timestamp
|
440
470
|
# @return [::Boolean]
|
441
471
|
# If true, the Cloud Spanner-selected read timestamp is included in
|
442
|
-
# the {::Google::Cloud::Spanner::V1::Transaction Transaction} message that describes
|
472
|
+
# the {::Google::Cloud::Spanner::V1::Transaction Transaction} message that describes
|
473
|
+
# the transaction.
|
443
474
|
class ReadOnly
|
444
475
|
include ::Google::Protobuf::MessageExts
|
445
476
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -474,7 +505,8 @@ module Google
|
|
474
505
|
# {::Google::Cloud::Spanner::V1::Spanner::Client#read Read} or
|
475
506
|
# {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql} call runs.
|
476
507
|
#
|
477
|
-
# See {::Google::Cloud::Spanner::V1::TransactionOptions TransactionOptions} for more
|
508
|
+
# See {::Google::Cloud::Spanner::V1::TransactionOptions TransactionOptions} for more
|
509
|
+
# information about transactions.
|
478
510
|
# @!attribute [rw] single_use
|
479
511
|
# @return [::Google::Cloud::Spanner::V1::TransactionOptions]
|
480
512
|
# Execute the read or SQL query in a temporary transaction.
|
@@ -487,7 +519,8 @@ module Google
|
|
487
519
|
# @return [::Google::Cloud::Spanner::V1::TransactionOptions]
|
488
520
|
# Begin a new transaction and execute this read or SQL query in
|
489
521
|
# it. The transaction ID of the new transaction is returned in
|
490
|
-
# {::Google::Cloud::Spanner::V1::ResultSetMetadata#transaction ResultSetMetadata.transaction},
|
522
|
+
# {::Google::Cloud::Spanner::V1::ResultSetMetadata#transaction ResultSetMetadata.transaction},
|
523
|
+
# which is a {::Google::Cloud::Spanner::V1::Transaction Transaction}.
|
491
524
|
class TransactionSelector
|
492
525
|
include ::Google::Protobuf::MessageExts
|
493
526
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
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.13.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: 2022-
|
11
|
+
date: 2022-10-24 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.
|
19
|
+
version: '0.12'
|
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.
|
29
|
+
version: '0.12'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|