google-cloud-spanner-v1 0.8.1 → 0.9.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 93f09468179faf9a4c502c5a276716deea004350d4e929f949f6569c45461cea
4
- data.tar.gz: 4b20dc3ee2b9271a1751424d3d7263e48805a9a83c89474c997375e3e7795bf7
3
+ metadata.gz: 107c7db85e616d72c82ff72eb07655d00ae1926f99c8002bfaf81eff4fb6caba
4
+ data.tar.gz: 42995b967b44b04c1b8effd91d090d05627cfa1df9c5ea01b1f6f9570cbefb07
5
5
  SHA512:
6
- metadata.gz: ddb5ead04c9bc1692f10899ed8dae40443a2121851b8be4d3538e67887556168920e9e7d9d8ccd19668acd9e670cfdf30ed37e711b03748207f902cb5cbf0b69
7
- data.tar.gz: 3bea006bc63c759c3c076cfcc1c935140115dcc64111e9c84e147381094c146064385ad858b91597ff024c3f48daf20053b513f81f4a34f069afe3f40e208b34
6
+ metadata.gz: a0f052167fd7a336f1566d4d9aefc9ff84e2e1b745b1c6999deae77d62900e82538943f7a25899390ddf6771ac08260ff0d1947cd10a8089eeabf73050156378
7
+ data.tar.gz: f0a3fed751f4d1af95465f51d4f94a6d423544fd28a6183b6ccfffe3ac423f2146f981b894a6600c2c8c214efa25f98828028cfa071cead7fa940bf77088fc83
data/README.md CHANGED
@@ -69,6 +69,11 @@ module GRPC
69
69
  end
70
70
  ```
71
71
 
72
+
73
+ ## Google Cloud Samples
74
+
75
+ To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
76
+
72
77
  ## Supported Ruby Versions
73
78
 
74
79
  This library is supported on Ruby 2.5+.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Spanner
23
23
  module V1
24
- VERSION = "0.8.1"
24
+ VERSION = "0.9.0"
25
25
  end
26
26
  end
27
27
  end
@@ -1,9 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/spanner/v1/commit_response.proto
3
3
 
4
- require 'google/protobuf/timestamp_pb'
5
4
  require 'google/protobuf'
6
5
 
6
+ require 'google/protobuf/timestamp_pb'
7
+
7
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
9
  add_file("google/spanner/v1/commit_response.proto", :syntax => :proto3) do
9
10
  add_message "google.spanner.v1.CommitResponse" do
@@ -1,9 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/spanner/v1/keys.proto
3
3
 
4
- require 'google/protobuf/struct_pb'
5
4
  require 'google/protobuf'
6
5
 
6
+ require 'google/protobuf/struct_pb'
7
+
7
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
9
  add_file("google/spanner/v1/keys.proto", :syntax => :proto3) do
9
10
  add_message "google.spanner.v1.KeyRange" do
@@ -1,10 +1,11 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/spanner/v1/mutation.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/field_behavior_pb'
5
7
  require 'google/protobuf/struct_pb'
6
8
  require 'google/spanner/v1/keys_pb'
7
- require 'google/protobuf'
8
9
 
9
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
11
  add_file("google/spanner/v1/mutation.proto", :syntax => :proto3) do
@@ -1,9 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/spanner/v1/query_plan.proto
3
3
 
4
- require 'google/protobuf/struct_pb'
5
4
  require 'google/protobuf'
6
5
 
6
+ require 'google/protobuf/struct_pb'
7
+
7
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
9
  add_file("google/spanner/v1/query_plan.proto", :syntax => :proto3) do
9
10
  add_message "google.spanner.v1.PlanNode" do
@@ -1,12 +1,12 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/spanner/v1/result_set.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/protobuf/struct_pb'
5
- require 'google/spanner/v1/commit_response_pb'
6
7
  require 'google/spanner/v1/query_plan_pb'
7
8
  require 'google/spanner/v1/transaction_pb'
8
9
  require 'google/spanner/v1/type_pb'
9
- require 'google/protobuf'
10
10
 
11
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
12
12
  add_file("google/spanner/v1/result_set.proto", :syntax => :proto3) do
@@ -1,6 +1,8 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/spanner/v1/spanner.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/annotations_pb'
5
7
  require 'google/api/client_pb'
6
8
  require 'google/api/field_behavior_pb'
@@ -15,7 +17,6 @@ require 'google/spanner/v1/mutation_pb'
15
17
  require 'google/spanner/v1/result_set_pb'
16
18
  require 'google/spanner/v1/transaction_pb'
17
19
  require 'google/spanner/v1/type_pb'
18
- require 'google/protobuf'
19
20
 
20
21
  Google::Protobuf::DescriptorPool.generated_pool.build do
21
22
  add_file("google/spanner/v1/spanner.proto", :syntax => :proto3) do
@@ -36,6 +37,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
36
37
  map :labels, :string, :string, 2
37
38
  optional :create_time, :message, 3, "google.protobuf.Timestamp"
38
39
  optional :approximate_last_use_time, :message, 4, "google.protobuf.Timestamp"
40
+ optional :creator_role, :string, 5
39
41
  end
40
42
  add_message "google.spanner.v1.GetSessionRequest" do
41
43
  optional :name, :string, 1
@@ -1,9 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/spanner/v1/transaction.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/protobuf/duration_pb'
5
7
  require 'google/protobuf/timestamp_pb'
6
- require 'google/protobuf'
7
8
 
8
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
10
  add_file("google/spanner/v1/transaction.proto", :syntax => :proto3) do
@@ -1,9 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/spanner/v1/type.proto
3
3
 
4
- require 'google/api/field_behavior_pb'
5
4
  require 'google/protobuf'
6
5
 
6
+ require 'google/api/field_behavior_pb'
7
+
7
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
9
  add_file("google/spanner/v1/type.proto", :syntax => :proto3) do
9
10
  add_message "google.spanner.v1.Type" do
@@ -44,7 +44,7 @@ module Google
44
44
  # foo = any.unpack(Foo.class);
45
45
  # }
46
46
  #
47
- # Example 3: Pack and unpack a message in Python.
47
+ # Example 3: Pack and unpack a message in Python.
48
48
  #
49
49
  # foo = Foo(...)
50
50
  # any = Any()
@@ -54,7 +54,7 @@ module Google
54
54
  # any.Unpack(foo)
55
55
  # ...
56
56
  #
57
- # Example 4: Pack and unpack a message in Go
57
+ # Example 4: Pack and unpack a message in Go
58
58
  #
59
59
  # foo := &pb.Foo{...}
60
60
  # any, err := anypb.New(foo)
@@ -75,7 +75,7 @@ module Google
75
75
  #
76
76
  #
77
77
  # JSON
78
- # ====
78
+ #
79
79
  # The JSON representation of an `Any` value uses the regular
80
80
  # representation of the deserialized, embedded message, with an
81
81
  # additional field `@type` which contains the type URL. Example:
@@ -46,8 +46,8 @@ module Google
46
46
 
47
47
  # `Value` represents a dynamically typed value which can be either
48
48
  # null, a number, a string, a boolean, a recursive struct value, or a
49
- # list of values. A producer of value is expected to set one of that
50
- # variants, absence of any variant indicates an error.
49
+ # list of values. A producer of value is expected to set one of these
50
+ # variants. Absence of any variant indicates an error.
51
51
  #
52
52
  # The JSON representation for `Value` is JSON value.
53
53
  # @!attribute [rw] null_value
@@ -83,6 +83,9 @@ module Google
83
83
  # @return [::Google::Protobuf::Timestamp]
84
84
  # Output only. The approximate timestamp when the session is last used. It is
85
85
  # typically earlier than the actual last use time.
86
+ # @!attribute [rw] creator_role
87
+ # @return [::String]
88
+ # The database role which created this session.
86
89
  class Session
87
90
  include ::Google::Protobuf::MessageExts
88
91
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -29,7 +29,8 @@ module Google
29
29
  # completed, the session can immediately be re-used for the next transaction.
30
30
  # It is not necessary to create a new session for each transaction.
31
31
  #
32
- # Transaction Modes:
32
+ # Transaction modes:
33
+ #
33
34
  # Cloud Spanner supports three transaction modes:
34
35
  #
35
36
  # 1. Locking read-write. This type of transaction is the only way
@@ -38,11 +39,18 @@ module Google
38
39
  # Locking read-write transactions may abort, requiring the
39
40
  # application to retry.
40
41
  #
41
- # 2. Snapshot read-only. This transaction type provides guaranteed
42
- # consistency across several reads, but does not allow
43
- # writes. Snapshot read-only transactions can be configured to
44
- # read at timestamps in the past. Snapshot read-only
45
- # transactions do not need to be committed.
42
+ # 2. Snapshot read-only. Snapshot read-only transactions provide guaranteed
43
+ # consistency across several reads, but do not allow
44
+ # writes. Snapshot read-only transactions can be configured to read at
45
+ # timestamps in the past, or configured to perform a strong read
46
+ # (where Spanner will select a timestamp such that the read is
47
+ # guaranteed to see the effects of all transactions that have committed
48
+ # before the start of the read). Snapshot read-only transactions do not
49
+ # need to be committed.
50
+ #
51
+ # Queries on change streams must be performed with the snapshot read-only
52
+ # transaction mode, specifying a strong read. Please see
53
+ # {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#strong TransactionOptions.ReadOnly.strong} for more details.
46
54
  #
47
55
  # 3. Partitioned DML. This type of transaction is used to execute
48
56
  # a single Partitioned DML statement. Partitioned DML partitions
@@ -57,11 +65,12 @@ module Google
57
65
  # not conflict with read-write transactions. As a consequence of not
58
66
  # taking locks, they also do not abort, so retry loops are not needed.
59
67
  #
60
- # Transactions may only read/write data in a single database. They
61
- # may, however, read/write data in different tables within that
68
+ # Transactions may only read-write data in a single database. They
69
+ # may, however, read-write data in different tables within that
62
70
  # database.
63
71
  #
64
- # Locking Read-Write Transactions:
72
+ # Locking read-write transactions:
73
+ #
65
74
  # Locking transactions may be used to atomically read-modify-write
66
75
  # data anywhere in a database. This type of transaction is externally
67
76
  # consistent.
@@ -72,7 +81,7 @@ module Google
72
81
  # active as long as the transaction continues to do reads, and the
73
82
  # transaction has not been terminated by
74
83
  # {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} or
75
- # {::Google::Cloud::Spanner::V1::Spanner::Client#rollback Rollback}. Long periods of
84
+ # {::Google::Cloud::Spanner::V1::Spanner::Client#rollback Rollback}. Long periods of
76
85
  # inactivity at the client may cause Cloud Spanner to release a
77
86
  # transaction's locks and abort it.
78
87
  #
@@ -84,6 +93,7 @@ module Google
84
93
  # transaction.
85
94
  #
86
95
  # Semantics:
96
+ #
87
97
  # Cloud Spanner can commit the transaction if all read locks it acquired
88
98
  # are still valid at commit time, and it is able to acquire write
89
99
  # locks for all writes. Cloud Spanner can abort the transaction for any
@@ -95,7 +105,8 @@ module Google
95
105
  # use Cloud Spanner locks for any sort of mutual exclusion other than
96
106
  # between Cloud Spanner transactions themselves.
97
107
  #
98
- # Retrying Aborted Transactions:
108
+ # Retrying aborted transactions:
109
+ #
99
110
  # When a transaction aborts, the application can choose to retry the
100
111
  # whole transaction again. To maximize the chances of successfully
101
112
  # committing the retry, the client should execute the retry in the
@@ -110,7 +121,8 @@ module Google
110
121
  # instead, it is better to limit the total amount of time spent
111
122
  # retrying.
112
123
  #
113
- # Idle Transactions:
124
+ # Idle transactions:
125
+ #
114
126
  # A transaction is considered idle if it has no outstanding reads or
115
127
  # SQL queries and has not started a read or SQL query within the last 10
116
128
  # seconds. Idle transactions can be aborted by Cloud Spanner so that they
@@ -121,7 +133,8 @@ module Google
121
133
  # SQL query in the transaction (for example, `SELECT 1`) prevents the
122
134
  # transaction from becoming idle.
123
135
  #
124
- # Snapshot Read-Only Transactions:
136
+ # Snapshot read-only transactions:
137
+ #
125
138
  # Snapshot read-only transactions provides a simpler method than
126
139
  # locking read-write transactions for doing several consistent
127
140
  # reads. However, this type of transaction does not support writes.
@@ -153,13 +166,12 @@ module Google
153
166
  #
154
167
  # If the Cloud Spanner database to be read is geographically distributed,
155
168
  # stale read-only transactions can execute more quickly than strong
156
- # or read-write transaction, because they are able to execute far
169
+ # or read-write transactions, because they are able to execute far
157
170
  # from the leader replica.
158
171
  #
159
172
  # Each type of timestamp bound is discussed in detail below.
160
173
  #
161
- # Strong:
162
- # Strong reads are guaranteed to see the effects of all transactions
174
+ # Strong: Strong reads are guaranteed to see the effects of all transactions
163
175
  # that have committed before the start of the read. Furthermore, all
164
176
  # rows yielded by a single read are consistent with each other -- if
165
177
  # any part of the read observes a transaction, all parts of the read
@@ -171,9 +183,13 @@ module Google
171
183
  # reads should be executed within a transaction or at an exact read
172
184
  # timestamp.
173
185
  #
186
+ # Queries on change streams (see below for more details) must also specify
187
+ # the strong read timestamp bound.
188
+ #
174
189
  # See {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#strong TransactionOptions.ReadOnly.strong}.
175
190
  #
176
- # Exact Staleness:
191
+ # Exact staleness:
192
+ #
177
193
  # These timestamp bounds execute reads at a user-specified
178
194
  # timestamp. Reads at a timestamp are guaranteed to see a consistent
179
195
  # prefix of the global transaction history: they observe
@@ -194,7 +210,8 @@ module Google
194
210
  # See {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#read_timestamp TransactionOptions.ReadOnly.read_timestamp} and
195
211
  # {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#exact_staleness TransactionOptions.ReadOnly.exact_staleness}.
196
212
  #
197
- # Bounded Staleness:
213
+ # Bounded staleness:
214
+ #
198
215
  # Bounded staleness modes allow Cloud Spanner to pick the read timestamp,
199
216
  # subject to a user-provided staleness bound. Cloud Spanner chooses the
200
217
  # newest timestamp within the staleness bound that allows execution
@@ -223,7 +240,8 @@ module Google
223
240
  # See {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#max_staleness TransactionOptions.ReadOnly.max_staleness} and
224
241
  # {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#min_read_timestamp TransactionOptions.ReadOnly.min_read_timestamp}.
225
242
  #
226
- # Old Read Timestamps and Garbage Collection:
243
+ # Old read timestamps and garbage collection:
244
+ #
227
245
  # Cloud Spanner continuously garbage collects deleted and overwritten data
228
246
  # in the background to reclaim storage space. This process is known
229
247
  # as "version GC". By default, version GC reclaims versions after they
@@ -233,7 +251,41 @@ module Google
233
251
  # timestamp become too old while executing. Reads and SQL queries with
234
252
  # too-old read timestamps fail with the error `FAILED_PRECONDITION`.
235
253
  #
236
- # Partitioned DML Transactions:
254
+ # You can configure and extend the `VERSION_RETENTION_PERIOD` of a
255
+ # database up to a period as long as one week, which allows Cloud Spanner
256
+ # to perform reads up to one week in the past.
257
+ #
258
+ # Querying change Streams:
259
+ #
260
+ # A Change Stream is a schema object that can be configured to watch data
261
+ # changes on the entire database, a set of tables, or a set of columns
262
+ # in a database.
263
+ #
264
+ # When a change stream is created, Spanner automatically defines a
265
+ # corresponding SQL Table-Valued Function (TVF) that can be used to query
266
+ # the change records in the associated change stream using the
267
+ # ExecuteStreamingSql API. The name of the TVF for a change stream is
268
+ # generated from the name of the change stream: READ_<change_stream_name>.
269
+ #
270
+ # All queries on change stream TVFs must be executed using the
271
+ # ExecuteStreamingSql API with a single-use read-only transaction with a
272
+ # strong read-only timestamp_bound. The change stream TVF allows users to
273
+ # specify the start_timestamp and end_timestamp for the time range of
274
+ # interest. All change records within the retention period is accessible
275
+ # using the strong read-only timestamp_bound. All other TransactionOptions
276
+ # are invalid for change stream queries.
277
+ #
278
+ # In addition, if TransactionOptions.read_only.return_read_timestamp is set
279
+ # to true, a special value of 2^63 - 2 will be returned in the
280
+ # {::Google::Cloud::Spanner::V1::Transaction Transaction} message that describes the
281
+ # transaction, instead of a valid read timestamp. This special value should be
282
+ # discarded and not used for any subsequent queries.
283
+ #
284
+ # Please see https://cloud.google.com/spanner/docs/change-streams
285
+ # for more details on how to query the change stream TVFs.
286
+ #
287
+ # Partitioned DML transactions:
288
+ #
237
289
  # Partitioned DML transactions are used to execute DML statements with a
238
290
  # different execution strategy that provides different, and often better,
239
291
  # scalability properties for large, table-wide operations than DML in a
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.8.1
4
+ version: 0.9.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-03-22 00:00:00.000000000 Z
11
+ date: 2022-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -221,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0'
223
223
  requirements: []
224
- rubygems_version: 3.3.5
224
+ rubygems_version: 3.3.14
225
225
  signing_key:
226
226
  specification_version: 4
227
227
  summary: API Client library for the Cloud Spanner V1 API