google-cloud-spanner-v1 0.7.4 → 0.8.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: b64f05386c2edb9c280625e5c53bbcf45f9fec1e2b32af526c0b9353910e4a86
4
- data.tar.gz: 2b6d4a71cbaa6981c7a1ad4f434fdda7c37e66eb0f6271c6904afb14902a0c14
3
+ metadata.gz: bb64f1bfd5d93cb49f610834908694139c4540d7aa6b012f06b609524aec2a90
4
+ data.tar.gz: '029130cb8fb140fee2322db3e98ac213c60d675910911f076d83dfb5fbc45b7e'
5
5
  SHA512:
6
- metadata.gz: 2adb5c7f6ddabfd316314fc82150681b755ea652db640df42486dbeff625294c5f765372e783ea6964785e9860663341c665f6d5e4b8659f4bfa9b4c1c8e6cd0
7
- data.tar.gz: d6d70ca8e7bf3979068c81ce7a5c2fcb2ecf1e3d4c987785255180376f78694d0234601e0a4340a438b27933789a85ccf53445c9a40b903c2564a288390fc215
6
+ metadata.gz: 5a2326c249ef795ee99a06efe95142203c3cbadd446828b0242f803cd4760f9d347c17059e416a5547e04b441da70d7260e455231ecd1950a81ad4bb479a2166
7
+ data.tar.gz: bc1af7e8c96a743d38ce177adc96cffc1940d55bd90b3a4ef632388285425ba23d39a7f4d5cc2d8c5e78626f3cb8c5c3cbd48911019960ec8a9bc736822150ad
data/README.md CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::Spanner::V1::CreateSessionRequest.new # (request fiel
37
37
  response = client.create_session request
38
38
  ```
39
39
 
40
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-spanner-v1/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-spanner-v1/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/spanner)
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Spanner
23
23
  module V1
24
- VERSION = "0.7.4"
24
+ VERSION = "0.8.0"
25
25
  end
26
26
  end
27
27
  end
@@ -1,9 +1,9 @@
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/api/annotations_pb'
4
5
  require 'google/protobuf/duration_pb'
5
6
  require 'google/protobuf/timestamp_pb'
6
- require 'google/api/annotations_pb'
7
7
  require 'google/protobuf'
8
8
 
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -1,8 +1,8 @@
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/api/annotations_pb'
5
+ require 'google/protobuf/struct_pb'
6
6
  require 'google/protobuf'
7
7
 
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -1,9 +1,9 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/spanner/v1/mutation.proto
3
3
 
4
+ require 'google/api/annotations_pb'
4
5
  require 'google/protobuf/struct_pb'
5
6
  require 'google/spanner/v1/keys_pb'
6
- require 'google/api/annotations_pb'
7
7
  require 'google/protobuf'
8
8
 
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -1,8 +1,8 @@
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/api/annotations_pb'
5
+ require 'google/protobuf/struct_pb'
6
6
  require 'google/protobuf'
7
7
 
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -1,11 +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/api/annotations_pb'
4
5
  require 'google/protobuf/struct_pb'
6
+ require 'google/spanner/v1/commit_response_pb'
5
7
  require 'google/spanner/v1/query_plan_pb'
6
8
  require 'google/spanner/v1/transaction_pb'
7
9
  require 'google/spanner/v1/type_pb'
8
- require 'google/api/annotations_pb'
9
10
  require 'google/protobuf'
10
11
 
11
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -1,7 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/spanner/v1/spanner.proto
3
3
 
4
- require 'google/spanner/v1/commit_response_pb'
5
4
  require 'google/api/annotations_pb'
6
5
  require 'google/api/client_pb'
7
6
  require 'google/api/field_behavior_pb'
@@ -10,6 +9,7 @@ require 'google/protobuf/empty_pb'
10
9
  require 'google/protobuf/struct_pb'
11
10
  require 'google/protobuf/timestamp_pb'
12
11
  require 'google/rpc/status_pb'
12
+ require 'google/spanner/v1/commit_response_pb'
13
13
  require 'google/spanner/v1/keys_pb'
14
14
  require 'google/spanner/v1/mutation_pb'
15
15
  require 'google/spanner/v1/result_set_pb'
@@ -1,9 +1,9 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/spanner/v1/transaction.proto
3
3
 
4
+ require 'google/api/annotations_pb'
4
5
  require 'google/protobuf/duration_pb'
5
6
  require 'google/protobuf/timestamp_pb'
6
- require 'google/api/annotations_pb'
7
7
  require 'google/protobuf'
8
8
 
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -1,8 +1,8 @@
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/api/annotations_pb'
5
+ require 'google/api/field_behavior_pb'
6
6
  require 'google/protobuf'
7
7
 
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -11,6 +11,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
11
11
  optional :code, :enum, 1, "google.spanner.v1.TypeCode"
12
12
  optional :array_element_type, :message, 2, "google.spanner.v1.Type"
13
13
  optional :struct_type, :message, 3, "google.spanner.v1.StructType"
14
+ optional :type_annotation, :enum, 4, "google.spanner.v1.TypeAnnotationCode"
14
15
  end
15
16
  add_message "google.spanner.v1.StructType" do
16
17
  repeated :fields, :message, 1, "google.spanner.v1.StructType.Field"
@@ -33,6 +34,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
33
34
  value :NUMERIC, 10
34
35
  value :JSON, 11
35
36
  end
37
+ add_enum "google.spanner.v1.TypeAnnotationCode" do
38
+ value :TYPE_ANNOTATION_CODE_UNSPECIFIED, 0
39
+ value :PG_NUMERIC, 2
40
+ end
36
41
  end
37
42
  end
38
43
 
@@ -44,6 +49,7 @@ module Google
44
49
  StructType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.StructType").msgclass
45
50
  StructType::Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.StructType.Field").msgclass
46
51
  TypeCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TypeCode").enummodule
52
+ TypeAnnotationCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TypeAnnotationCode").enummodule
47
53
  end
48
54
  end
49
55
  end
@@ -41,9 +41,9 @@ module Google
41
41
  # `mutation_count` value can help you maximize the number of mutations
42
42
  # in a transaction and minimize the number of API round trips. You can
43
43
  # also monitor this value to prevent transactions from exceeding the system
44
- # [limit](http://cloud.google.com/spanner/quotas#limits_for_creating_reading_updating_and_deleting_data).
44
+ # [limit](https://cloud.google.com/spanner/quotas#limits_for_creating_reading_updating_and_deleting_data).
45
45
  # If the number of mutations exceeds the limit, the server returns
46
- # [INVALID_ARGUMENT](http://cloud.google.com/spanner/docs/reference/rest/v1/Code#ENUM_VALUES.INVALID_ARGUMENT).
46
+ # [INVALID_ARGUMENT](https://cloud.google.com/spanner/docs/reference/rest/v1/Code#ENUM_VALUES.INVALID_ARGUMENT).
47
47
  class CommitStats
48
48
  include ::Google::Protobuf::MessageExts
49
49
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -174,6 +174,7 @@ module Google
174
174
  # Legal characters for `request_tag` values are all printable characters
175
175
  # (ASCII 32 - 126) and the length of a request_tag is limited to 50
176
176
  # characters. Values that exceed this limit are truncated.
177
+ # Any leading underscore (_) characters will be removed from the string.
177
178
  # @!attribute [rw] transaction_tag
178
179
  # @return [::String]
179
180
  # A tag used for statistics collection about this transaction.
@@ -181,11 +182,12 @@ module Google
181
182
  # that belongs to a transaction.
182
183
  # The value of transaction_tag should be the same for all requests belonging
183
184
  # to the same transaction.
184
- # If this request doesnt belong to any transaction, transaction_tag will be
185
+ # If this request doesn't belong to any transaction, transaction_tag will be
185
186
  # ignored.
186
187
  # Legal characters for `transaction_tag` values are all printable characters
187
188
  # (ASCII 32 - 126) and the length of a transaction_tag is limited to 50
188
189
  # characters. Values that exceed this limit are truncated.
190
+ # Any leading underscore (_) characters will be removed from the string.
189
191
  class RequestOptions
190
192
  include ::Google::Protobuf::MessageExts
191
193
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -21,8 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Spanner
23
23
  module V1
24
- # # Transactions
25
- #
24
+ # Transactions:
26
25
  #
27
26
  # Each session can have at most one active transaction at a time (note that
28
27
  # standalone reads and queries use a transaction internally and do count
@@ -30,8 +29,7 @@ module Google
30
29
  # completed, the session can immediately be re-used for the next transaction.
31
30
  # It is not necessary to create a new session for each transaction.
32
31
  #
33
- # # Transaction Modes
34
- #
32
+ # Transaction Modes:
35
33
  # Cloud Spanner supports three transaction modes:
36
34
  #
37
35
  # 1. Locking read-write. This type of transaction is the only way
@@ -63,8 +61,7 @@ module Google
63
61
  # may, however, read/write data in different tables within that
64
62
  # database.
65
63
  #
66
- # ## Locking Read-Write Transactions
67
- #
64
+ # Locking Read-Write Transactions:
68
65
  # Locking transactions may be used to atomically read-modify-write
69
66
  # data anywhere in a database. This type of transaction is externally
70
67
  # consistent.
@@ -86,8 +83,7 @@ module Google
86
83
  # {::Google::Cloud::Spanner::V1::Spanner::Client#rollback Rollback} request to abort the
87
84
  # transaction.
88
85
  #
89
- # ## Semantics
90
- #
86
+ # Semantics:
91
87
  # Cloud Spanner can commit the transaction if all read locks it acquired
92
88
  # are still valid at commit time, and it is able to acquire write
93
89
  # locks for all writes. Cloud Spanner can abort the transaction for any
@@ -99,8 +95,7 @@ module Google
99
95
  # use Cloud Spanner locks for any sort of mutual exclusion other than
100
96
  # between Cloud Spanner transactions themselves.
101
97
  #
102
- # ## Retrying Aborted Transactions
103
- #
98
+ # Retrying Aborted Transactions:
104
99
  # When a transaction aborts, the application can choose to retry the
105
100
  # whole transaction again. To maximize the chances of successfully
106
101
  # committing the retry, the client should execute the retry in the
@@ -108,27 +103,25 @@ module Google
108
103
  # priority increases with each consecutive abort, meaning that each
109
104
  # attempt has a slightly better chance of success than the previous.
110
105
  #
111
- # Under some circumstances (e.g., many transactions attempting to
106
+ # Under some circumstances (for example, many transactions attempting to
112
107
  # modify the same row(s)), a transaction can abort many times in a
113
108
  # short period before successfully committing. Thus, it is not a good
114
109
  # idea to cap the number of retries a transaction can attempt;
115
- # instead, it is better to limit the total amount of wall time spent
110
+ # instead, it is better to limit the total amount of time spent
116
111
  # retrying.
117
112
  #
118
- # ## Idle Transactions
119
- #
113
+ # Idle Transactions:
120
114
  # A transaction is considered idle if it has no outstanding reads or
121
115
  # SQL queries and has not started a read or SQL query within the last 10
122
116
  # seconds. Idle transactions can be aborted by Cloud Spanner so that they
123
- # don't hold on to locks indefinitely. In that case, the commit will
124
- # fail with error `ABORTED`.
117
+ # don't hold on to locks indefinitely. If an idle transaction is aborted, the
118
+ # commit will fail with error `ABORTED`.
125
119
  #
126
120
  # If this behavior is undesirable, periodically executing a simple
127
- # SQL query in the transaction (e.g., `SELECT 1`) prevents the
121
+ # SQL query in the transaction (for example, `SELECT 1`) prevents the
128
122
  # transaction from becoming idle.
129
123
  #
130
- # ## Snapshot Read-Only Transactions
131
- #
124
+ # Snapshot Read-Only Transactions:
132
125
  # Snapshot read-only transactions provides a simpler method than
133
126
  # locking read-write transactions for doing several consistent
134
127
  # reads. However, this type of transaction does not support writes.
@@ -165,8 +158,7 @@ module Google
165
158
  #
166
159
  # Each type of timestamp bound is discussed in detail below.
167
160
  #
168
- # ## Strong
169
- #
161
+ # Strong:
170
162
  # Strong reads are guaranteed to see the effects of all transactions
171
163
  # that have committed before the start of the read. Furthermore, all
172
164
  # rows yielded by a single read are consistent with each other -- if
@@ -181,13 +173,12 @@ module Google
181
173
  #
182
174
  # See {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#strong TransactionOptions.ReadOnly.strong}.
183
175
  #
184
- # ## Exact Staleness
185
- #
176
+ # Exact Staleness:
186
177
  # These timestamp bounds execute reads at a user-specified
187
178
  # timestamp. Reads at a timestamp are guaranteed to see a consistent
188
179
  # prefix of the global transaction history: they observe
189
- # modifications done by all transactions with a commit timestamp <=
190
- # the read timestamp, and observe none of the modifications done by
180
+ # modifications done by all transactions with a commit timestamp less than or
181
+ # equal to the read timestamp, and observe none of the modifications done by
191
182
  # transactions with a larger commit timestamp. They will block until
192
183
  # all conflicting transactions that may be assigned commit timestamps
193
184
  # <= the read timestamp have finished.
@@ -203,8 +194,7 @@ module Google
203
194
  # See {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#read_timestamp TransactionOptions.ReadOnly.read_timestamp} and
204
195
  # {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#exact_staleness TransactionOptions.ReadOnly.exact_staleness}.
205
196
  #
206
- # ## Bounded Staleness
207
- #
197
+ # Bounded Staleness:
208
198
  # Bounded staleness modes allow Cloud Spanner to pick the read timestamp,
209
199
  # subject to a user-provided staleness bound. Cloud Spanner chooses the
210
200
  # newest timestamp within the staleness bound that allows execution
@@ -233,8 +223,7 @@ module Google
233
223
  # See {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#max_staleness TransactionOptions.ReadOnly.max_staleness} and
234
224
  # {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#min_read_timestamp TransactionOptions.ReadOnly.min_read_timestamp}.
235
225
  #
236
- # ## Old Read Timestamps and Garbage Collection
237
- #
226
+ # Old Read Timestamps and Garbage Collection:
238
227
  # Cloud Spanner continuously garbage collects deleted and overwritten data
239
228
  # in the background to reclaim storage space. This process is known
240
229
  # as "version GC". By default, version GC reclaims versions after they
@@ -244,8 +233,7 @@ module Google
244
233
  # timestamp become too old while executing. Reads and SQL queries with
245
234
  # too-old read timestamps fail with the error `FAILED_PRECONDITION`.
246
235
  #
247
- # ## Partitioned DML Transactions
248
- #
236
+ # Partitioned DML Transactions:
249
237
  # Partitioned DML transactions are used to execute DML statements with a
250
238
  # different execution strategy that provides different, and often better,
251
239
  # scalability properties for large, table-wide operations than DML in a
@@ -34,6 +34,14 @@ module Google
34
34
  # @return [::Google::Cloud::Spanner::V1::StructType]
35
35
  # If {::Google::Cloud::Spanner::V1::Type#code code} == {::Google::Cloud::Spanner::V1::TypeCode::STRUCT STRUCT}, then `struct_type`
36
36
  # provides type information for the struct's fields.
37
+ # @!attribute [rw] type_annotation
38
+ # @return [::Google::Cloud::Spanner::V1::TypeAnnotationCode]
39
+ # The {::Google::Cloud::Spanner::V1::TypeAnnotationCode TypeAnnotationCode} that disambiguates SQL type that Spanner will
40
+ # use to represent values of this type during query processing. This is
41
+ # necessary for some type codes because a single {::Google::Cloud::Spanner::V1::TypeCode TypeCode} can be mapped
42
+ # to different SQL types depending on the SQL dialect. {::Google::Cloud::Spanner::V1::Type#type_annotation type_annotation}
43
+ # typically is not needed to process the content of a value (it doesn't
44
+ # affect serialization) and clients can ignore it on the read path.
37
45
  class Type
38
46
  include ::Google::Protobuf::MessageExts
39
47
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -132,15 +140,34 @@ module Google
132
140
  # <br>(ExponentIndicator is `"e"` or `"E"`)
133
141
  NUMERIC = 10
134
142
 
135
- # Encoded as a JSON-formatted 'string' as described in RFC 7159. The
136
- # following rules will be applied when parsing JSON input:
137
- # - Whitespace will be stripped from the document.
138
- # - If a JSON object has duplicate keys, only the first key will be
139
- # preserved.
143
+ # Encoded as a JSON-formatted `string` as described in RFC 7159. The
144
+ # following rules are applied when parsing JSON input:
145
+ #
146
+ # - Whitespace characters are not preserved.
147
+ # - If a JSON object has duplicate keys, only the first key is preserved.
140
148
  # - Members of a JSON object are not guaranteed to have their order
141
- # preserved. JSON array elements will have their order preserved.
149
+ # preserved.
150
+ # - JSON array elements will have their order preserved.
142
151
  JSON = 11
143
152
  end
153
+
154
+ # `TypeAnnotationCode` is used as a part of {::Google::Cloud::Spanner::V1::Type Type} to
155
+ # disambiguate SQL types that should be used for a given Cloud Spanner value.
156
+ # Disambiguation is needed because the same Cloud Spanner type can be mapped to
157
+ # different SQL types depending on SQL dialect. TypeAnnotationCode doesn't
158
+ # affect the way value is serialized.
159
+ module TypeAnnotationCode
160
+ # Not specified.
161
+ TYPE_ANNOTATION_CODE_UNSPECIFIED = 0
162
+
163
+ # PostgreSQL compatible NUMERIC type. This annotation needs to be applied to
164
+ # {::Google::Cloud::Spanner::V1::Type Type} instances having {::Google::Cloud::Spanner::V1::TypeCode::NUMERIC NUMERIC}
165
+ # type code to specify that values of this type should be treated as
166
+ # PostgreSQL NUMERIC values. Currently this annotation is always needed for
167
+ # {::Google::Cloud::Spanner::V1::TypeCode::NUMERIC NUMERIC} when a client interacts with PostgreSQL-enabled
168
+ # Spanner databases.
169
+ PG_NUMERIC = 2
170
+ end
144
171
  end
145
172
  end
146
173
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-spanner-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.8.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-01-11 00:00:00.000000000 Z
11
+ date: 2022-03-15 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.4
224
+ rubygems_version: 3.3.5
225
225
  signing_key:
226
226
  specification_version: 4
227
227
  summary: API Client library for the Cloud Spanner V1 API