google-cloud-spanner-v1 0.7.3 → 0.8.1

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: 2d2eae57af534d2c1d9c239bdbb609bba7279dbfcc92a4661f799201f04083a1
4
- data.tar.gz: e650e6ec37e392219e34fe2ae140cb4e36a93deffaa91c6ca2b15dc561b776c5
3
+ metadata.gz: 93f09468179faf9a4c502c5a276716deea004350d4e929f949f6569c45461cea
4
+ data.tar.gz: 4b20dc3ee2b9271a1751424d3d7263e48805a9a83c89474c997375e3e7795bf7
5
5
  SHA512:
6
- metadata.gz: aefacc2ac8a43f6466c1ffa1e6595784890977acfba2cbce7b8658be4b57c014052d73c10d3e21dae54ae01f261d607406ae26a7a0475d928aeeaeb60742304a
7
- data.tar.gz: ca8d386f050cfd8b41a5907b637150b10dd29459f4ede218cb6f6dd907fe81bfd3aca7a43a550941871d578f503e8325ab592a989049d5140259671f93463e12
6
+ metadata.gz: ddb5ead04c9bc1692f10899ed8dae40443a2121851b8be4d3538e67887556168920e9e7d9d8ccd19668acd9e670cfdf30ed37e711b03748207f902cb5cbf0b69
7
+ data.tar.gz: 3bea006bc63c759c3c076cfcc1c935140115dcc64111e9c84e147381094c146064385ad858b91597ff024c3f48daf20053b513f81f4a34f069afe3f40e208b34
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Cloud Spanner V1 API
2
+ --title="Cloud Spanner V1 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
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)
@@ -255,7 +255,7 @@ module Google
255
255
  # @param database [::String]
256
256
  # Required. The database in which the new session is created.
257
257
  # @param session [::Google::Cloud::Spanner::V1::Session, ::Hash]
258
- # The session to create.
258
+ # Required. The session to create.
259
259
  #
260
260
  # @yield [response, operation] Access the result along with the RPC operation
261
261
  # @yieldparam response [::Google::Cloud::Spanner::V1::Session]
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Spanner
23
23
  module V1
24
- VERSION = "0.7.3"
24
+ VERSION = "0.8.1"
25
25
  end
26
26
  end
27
27
  end
@@ -25,6 +25,8 @@ module Google
25
25
  ##
26
26
  # To load this package, including all its services, and instantiate a client:
27
27
  #
28
+ # @example
29
+ #
28
30
  # require "google/cloud/spanner/v1"
29
31
  # client = ::Google::Cloud::Spanner::V1::Spanner::Client.new
30
32
  #
@@ -1,9 +1,7 @@
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/duration_pb'
5
4
  require 'google/protobuf/timestamp_pb'
6
- require 'google/api/annotations_pb'
7
5
  require 'google/protobuf'
8
6
 
9
7
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -2,7 +2,6 @@
2
2
  # source: google/spanner/v1/keys.proto
3
3
 
4
4
  require 'google/protobuf/struct_pb'
5
- require 'google/api/annotations_pb'
6
5
  require 'google/protobuf'
7
6
 
8
7
  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/field_behavior_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
@@ -2,7 +2,6 @@
2
2
  # source: google/spanner/v1/query_plan.proto
3
3
 
4
4
  require 'google/protobuf/struct_pb'
5
- require 'google/api/annotations_pb'
6
5
  require 'google/protobuf'
7
6
 
8
7
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -2,10 +2,10 @@
2
2
  # source: google/spanner/v1/result_set.proto
3
3
 
4
4
  require 'google/protobuf/struct_pb'
5
+ require 'google/spanner/v1/commit_response_pb'
5
6
  require 'google/spanner/v1/query_plan_pb'
6
7
  require 'google/spanner/v1/transaction_pb'
7
8
  require 'google/spanner/v1/type_pb'
8
- require 'google/api/annotations_pb'
9
9
  require 'google/protobuf'
10
10
 
11
11
  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'
@@ -3,7 +3,6 @@
3
3
 
4
4
  require 'google/protobuf/duration_pb'
5
5
  require 'google/protobuf/timestamp_pb'
6
- require 'google/api/annotations_pb'
7
6
  require 'google/protobuf'
8
7
 
9
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -2,7 +2,6 @@
2
2
  # source: google/spanner/v1/type.proto
3
3
 
4
4
  require 'google/api/field_behavior_pb'
5
- require 'google/api/annotations_pb'
6
5
  require 'google/protobuf'
7
6
 
8
7
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -11,6 +10,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
11
10
  optional :code, :enum, 1, "google.spanner.v1.TypeCode"
12
11
  optional :array_element_type, :message, 2, "google.spanner.v1.Type"
13
12
  optional :struct_type, :message, 3, "google.spanner.v1.StructType"
13
+ optional :type_annotation, :enum, 4, "google.spanner.v1.TypeAnnotationCode"
14
14
  end
15
15
  add_message "google.spanner.v1.StructType" do
16
16
  repeated :fields, :message, 1, "google.spanner.v1.StructType.Field"
@@ -33,6 +33,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
33
33
  value :NUMERIC, 10
34
34
  value :JSON, 11
35
35
  end
36
+ add_enum "google.spanner.v1.TypeAnnotationCode" do
37
+ value :TYPE_ANNOTATION_CODE_UNSPECIFIED, 0
38
+ value :PG_NUMERIC, 2
39
+ end
36
40
  end
37
41
  end
38
42
 
@@ -44,6 +48,7 @@ module Google
44
48
  StructType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.StructType").msgclass
45
49
  StructType::Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.StructType.Field").msgclass
46
50
  TypeCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TypeCode").enummodule
51
+ TypeAnnotationCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TypeAnnotationCode").enummodule
47
52
  end
48
53
  end
49
54
  end
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
35
  # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of
@@ -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
@@ -27,7 +27,7 @@ module Google
27
27
  # Required. The database in which the new session is created.
28
28
  # @!attribute [rw] session
29
29
  # @return [::Google::Cloud::Spanner::V1::Session]
30
- # The session to create.
30
+ # Required. The session to create.
31
31
  class CreateSessionRequest
32
32
  include ::Google::Protobuf::MessageExts
33
33
  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.3
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-08 00:00:00.000000000 Z
11
+ date: 2022-03-22 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.2.17
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