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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 074ba65a11b32fc7a462954b0a1a2b551bd9524646028884a7f91a3053f7e085
4
- data.tar.gz: df7f103b0d1af51be718cecd31706b65a90cf94a635793af3ac6f37fdcb4b697
3
+ metadata.gz: 506e5f2c7f94609ad28e4a3d6d53a00ea9512e861999529e85cca4ab1d3a7fd1
4
+ data.tar.gz: c3998ce28c3c96271b0354c47cffd670ca43ac1193c33587a758da2593ba489a
5
5
  SHA512:
6
- metadata.gz: d9a2738f844a34f499c8743d8fb368776f7a9d374353a2d1c91b1ab7a7d77fd0a4c7704c668c858347b0ef99db0f8abfbf165fd3e4e4fe0d654d6c811cb3e0fb
7
- data.tar.gz: c8f2f845cd7be339fece8b0a62ff1be451afaf08296e7b275485823cc2639b75bb8fcb331ea779684944cf3a3c545e76da139bfa5be71f2fac9bb3593273c3f2
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
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Spanner
23
23
  module V1
24
- VERSION = "0.11.0"
24
+ VERSION = "0.13.0"
25
25
  end
26
26
  end
27
27
  end
@@ -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} for more details.
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 {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#strong TransactionOptions.ReadOnly.strong}.
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 {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#read_timestamp TransactionOptions.ReadOnly.read_timestamp} and
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 {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#max_staleness TransactionOptions.ReadOnly.max_staleness} and
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 the transaction.
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 information about transactions.
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}, which is a {::Google::Cloud::Spanner::V1::Transaction 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.11.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-08-29 00:00:00.000000000 Z
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.10'
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.10'
29
+ version: '0.12'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a