google-cloud-spanner-v1 0.6.0 → 0.7.2

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: 6fba6f09fa77e45b73c0fbc08dd22c14a136a70809e998c971d94607189209e5
4
- data.tar.gz: 0523b6fd8ec3ce8faf66afb5e258f0c00e21fb34f09c0e436695a24967f85a1a
3
+ metadata.gz: a274c4e1d09a3122c37193aca7a73d498e2e8a7493583b880dc327c4a8561abd
4
+ data.tar.gz: c5bec182d4e02eb05dc64d2042030ff2e0b282557fe62eb464b4f83a01ae4be8
5
5
  SHA512:
6
- metadata.gz: 5d3ab71a7be71babeeb5244d091253cc100d0a51b3b8442106dbfb9d13d9adb4cdff91e5606a4a2d354e024c9df6e636ae69f67016cca5b70928caf3965b31e1
7
- data.tar.gz: 6cb8b0f889e2a422df8b3faef5f20dc7949df73d3cef904b7fd96643efe6dd9692b9fec96073c80de375c4abf4be63c416628a83267f9411a4bf73c2e2f8ea1d
6
+ metadata.gz: e698b60a077b905df8d71fc9e0add9efcf5039d186780c5ff5f645bb23f873a62d7f21cfc9b243ce48255089bc3120d3b4c83d687a84252c9c50f2bc60404b7c
7
+ data.tar.gz: 806caae37da3d1d7f556567b5f2fab0dcfe0c4c699b2a1d9364816589aed039168c0c73845c96b2c475abd806d7975a57866e8df67e14c30299c0386110ea345
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-spanner-v1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::Spanner::V1::Spanner::Credentials}):
68
68
 
69
- 1. `SPANNER_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `SPANNER_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `SPANNER_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `SPANNER_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/spanner/v1"
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Spanner::V1::Spanner::Client.new
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/spanner/v1"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config|
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/spanner/v1"
data/README.md CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/spanner/v1"
34
34
 
35
35
  client = ::Google::Cloud::Spanner::V1::Spanner::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::Spanner::V1::CreateSessionRequest.new # (request fields as keyword arguments...)
37
37
  response = client.create_session request
38
38
  ```
39
39
 
@@ -44,13 +44,12 @@ module Google
44
44
  # See {::Google::Cloud::Spanner::V1::Spanner::Client::Configuration}
45
45
  # for a description of the configuration fields.
46
46
  #
47
- # ## Example
47
+ # @example
48
48
  #
49
- # To modify the configuration for all Spanner clients:
50
- #
51
- # ::Google::Cloud::Spanner::V1::Spanner::Client.configure do |config|
52
- # config.timeout = 10.0
53
- # end
49
+ # # Modify the configuration for all Spanner clients
50
+ # ::Google::Cloud::Spanner::V1::Spanner::Client.configure do |config|
51
+ # config.timeout = 10.0
52
+ # end
54
53
  #
55
54
  # @yield [config] Configure the Client client.
56
55
  # @yieldparam config [Client::Configuration]
@@ -70,110 +69,71 @@ module Google
70
69
 
71
70
  default_config.rpcs.create_session.timeout = 30.0
72
71
  default_config.rpcs.create_session.retry_policy = {
73
- initial_delay: 0.25,
74
- max_delay: 32.0,
75
- multiplier: 1.3,
76
- retry_codes: [14]
72
+ initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
77
73
  }
78
74
 
79
75
  default_config.rpcs.batch_create_sessions.timeout = 60.0
80
76
  default_config.rpcs.batch_create_sessions.retry_policy = {
81
- initial_delay: 0.25,
82
- max_delay: 32.0,
83
- multiplier: 1.3,
84
- retry_codes: [14]
77
+ initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
85
78
  }
86
79
 
87
80
  default_config.rpcs.get_session.timeout = 30.0
88
81
  default_config.rpcs.get_session.retry_policy = {
89
- initial_delay: 0.25,
90
- max_delay: 32.0,
91
- multiplier: 1.3,
92
- retry_codes: [14]
82
+ initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
93
83
  }
94
84
 
95
85
  default_config.rpcs.list_sessions.timeout = 3600.0
96
86
  default_config.rpcs.list_sessions.retry_policy = {
97
- initial_delay: 0.25,
98
- max_delay: 32.0,
99
- multiplier: 1.3,
100
- retry_codes: [14]
87
+ initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
101
88
  }
102
89
 
103
90
  default_config.rpcs.delete_session.timeout = 30.0
104
91
  default_config.rpcs.delete_session.retry_policy = {
105
- initial_delay: 0.25,
106
- max_delay: 32.0,
107
- multiplier: 1.3,
108
- retry_codes: [14]
92
+ initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
109
93
  }
110
94
 
111
95
  default_config.rpcs.execute_sql.timeout = 30.0
112
96
  default_config.rpcs.execute_sql.retry_policy = {
113
- initial_delay: 0.25,
114
- max_delay: 32.0,
115
- multiplier: 1.3,
116
- retry_codes: [14]
97
+ initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
117
98
  }
118
99
 
119
100
  default_config.rpcs.execute_streaming_sql.timeout = 3600.0
120
101
 
121
102
  default_config.rpcs.execute_batch_dml.timeout = 30.0
122
103
  default_config.rpcs.execute_batch_dml.retry_policy = {
123
- initial_delay: 0.25,
124
- max_delay: 32.0,
125
- multiplier: 1.3,
126
- retry_codes: [14]
104
+ initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
127
105
  }
128
106
 
129
107
  default_config.rpcs.read.timeout = 30.0
130
108
  default_config.rpcs.read.retry_policy = {
131
- initial_delay: 0.25,
132
- max_delay: 32.0,
133
- multiplier: 1.3,
134
- retry_codes: [14]
109
+ initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
135
110
  }
136
111
 
137
112
  default_config.rpcs.streaming_read.timeout = 3600.0
138
113
 
139
114
  default_config.rpcs.begin_transaction.timeout = 30.0
140
115
  default_config.rpcs.begin_transaction.retry_policy = {
141
- initial_delay: 0.25,
142
- max_delay: 32.0,
143
- multiplier: 1.3,
144
- retry_codes: [14]
116
+ initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
145
117
  }
146
118
 
147
119
  default_config.rpcs.commit.timeout = 3600.0
148
120
  default_config.rpcs.commit.retry_policy = {
149
- initial_delay: 0.25,
150
- max_delay: 32.0,
151
- multiplier: 1.3,
152
- retry_codes: [14]
121
+ initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
153
122
  }
154
123
 
155
124
  default_config.rpcs.rollback.timeout = 30.0
156
125
  default_config.rpcs.rollback.retry_policy = {
157
- initial_delay: 0.25,
158
- max_delay: 32.0,
159
- multiplier: 1.3,
160
- retry_codes: [14]
126
+ initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
161
127
  }
162
128
 
163
129
  default_config.rpcs.partition_query.timeout = 30.0
164
130
  default_config.rpcs.partition_query.retry_policy = {
165
- initial_delay: 0.25,
166
- max_delay: 32.0,
167
- multiplier: 1.3,
168
- retry_codes: [14]
131
+ initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
169
132
  }
170
133
 
171
134
  default_config.rpcs.partition_read.timeout = 30.0
172
135
  default_config.rpcs.partition_read.retry_policy = {
173
- initial_delay: 0.25,
174
- max_delay: 32.0,
175
- multiplier: 1.3,
176
- retry_codes: [14]
136
+ initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
177
137
  }
178
138
 
179
139
  default_config
@@ -205,19 +165,15 @@ module Google
205
165
  ##
206
166
  # Create a new Spanner client object.
207
167
  #
208
- # ## Examples
209
- #
210
- # To create a new Spanner client with the default
211
- # configuration:
212
- #
213
- # client = ::Google::Cloud::Spanner::V1::Spanner::Client.new
168
+ # @example
214
169
  #
215
- # To create a new Spanner client with a custom
216
- # configuration:
170
+ # # Create a client using the default configuration
171
+ # client = ::Google::Cloud::Spanner::V1::Spanner::Client.new
217
172
  #
218
- # client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config|
219
- # config.timeout = 10.0
220
- # end
173
+ # # Create a client using a custom configuration
174
+ # client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config|
175
+ # config.timeout = 10.0
176
+ # end
221
177
  #
222
178
  # @yield [config] Configure the Spanner client.
223
179
  # @yieldparam config [Client::Configuration]
@@ -237,14 +193,13 @@ module Google
237
193
 
238
194
  # Create credentials
239
195
  credentials = @config.credentials
240
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
196
+ # Use self-signed JWT if the endpoint is unchanged from default,
241
197
  # but only if the default endpoint does not have a region prefix.
242
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
243
- @config.endpoint == Client.configure.endpoint &&
198
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
244
199
  !@config.endpoint.split(".").first.include?("-")
245
200
  credentials ||= Credentials.default scope: @config.scope,
246
201
  enable_self_signed_jwt: enable_self_signed_jwt
247
- if credentials.is_a?(String) || credentials.is_a?(Hash)
202
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
248
203
  credentials = Credentials.new credentials, scope: @config.scope
249
204
  end
250
205
  @quota_project_id = @config.quota_project
@@ -336,7 +291,9 @@ module Google
336
291
  options.apply_defaults timeout: @config.rpcs.create_session.timeout,
337
292
  metadata: metadata,
338
293
  retry_policy: @config.rpcs.create_session.retry_policy
339
- options.apply_defaults metadata: @config.metadata,
294
+
295
+ options.apply_defaults timeout: @config.timeout,
296
+ metadata: @config.metadata,
340
297
  retry_policy: @config.retry_policy
341
298
 
342
299
  @spanner_stub.call_rpc :create_session, request, options: options do |response, operation|
@@ -413,7 +370,9 @@ module Google
413
370
  options.apply_defaults timeout: @config.rpcs.batch_create_sessions.timeout,
414
371
  metadata: metadata,
415
372
  retry_policy: @config.rpcs.batch_create_sessions.retry_policy
416
- options.apply_defaults metadata: @config.metadata,
373
+
374
+ options.apply_defaults timeout: @config.timeout,
375
+ metadata: @config.metadata,
417
376
  retry_policy: @config.retry_policy
418
377
 
419
378
  @spanner_stub.call_rpc :batch_create_sessions, request, options: options do |response, operation|
@@ -481,7 +440,9 @@ module Google
481
440
  options.apply_defaults timeout: @config.rpcs.get_session.timeout,
482
441
  metadata: metadata,
483
442
  retry_policy: @config.rpcs.get_session.retry_policy
484
- options.apply_defaults metadata: @config.metadata,
443
+
444
+ options.apply_defaults timeout: @config.timeout,
445
+ metadata: @config.metadata,
485
446
  retry_policy: @config.retry_policy
486
447
 
487
448
  @spanner_stub.call_rpc :get_session, request, options: options do |response, operation|
@@ -565,7 +526,9 @@ module Google
565
526
  options.apply_defaults timeout: @config.rpcs.list_sessions.timeout,
566
527
  metadata: metadata,
567
528
  retry_policy: @config.rpcs.list_sessions.retry_policy
568
- options.apply_defaults metadata: @config.metadata,
529
+
530
+ options.apply_defaults timeout: @config.timeout,
531
+ metadata: @config.metadata,
569
532
  retry_policy: @config.retry_policy
570
533
 
571
534
  @spanner_stub.call_rpc :list_sessions, request, options: options do |response, operation|
@@ -634,7 +597,9 @@ module Google
634
597
  options.apply_defaults timeout: @config.rpcs.delete_session.timeout,
635
598
  metadata: metadata,
636
599
  retry_policy: @config.rpcs.delete_session.retry_policy
637
- options.apply_defaults metadata: @config.metadata,
600
+
601
+ options.apply_defaults timeout: @config.timeout,
602
+ metadata: @config.metadata,
638
603
  retry_policy: @config.retry_policy
639
604
 
640
605
  @spanner_stub.call_rpc :delete_session, request, options: options do |response, operation|
@@ -777,7 +742,9 @@ module Google
777
742
  options.apply_defaults timeout: @config.rpcs.execute_sql.timeout,
778
743
  metadata: metadata,
779
744
  retry_policy: @config.rpcs.execute_sql.retry_policy
780
- options.apply_defaults metadata: @config.metadata,
745
+
746
+ options.apply_defaults timeout: @config.timeout,
747
+ metadata: @config.metadata,
781
748
  retry_policy: @config.retry_policy
782
749
 
783
750
  @spanner_stub.call_rpc :execute_sql, request, options: options do |response, operation|
@@ -914,7 +881,9 @@ module Google
914
881
  options.apply_defaults timeout: @config.rpcs.execute_streaming_sql.timeout,
915
882
  metadata: metadata,
916
883
  retry_policy: @config.rpcs.execute_streaming_sql.retry_policy
917
- options.apply_defaults metadata: @config.metadata,
884
+
885
+ options.apply_defaults timeout: @config.timeout,
886
+ metadata: @config.metadata,
918
887
  retry_policy: @config.retry_policy
919
888
 
920
889
  @spanner_stub.call_rpc :execute_streaming_sql, request, options: options do |response, operation|
@@ -1014,7 +983,9 @@ module Google
1014
983
  options.apply_defaults timeout: @config.rpcs.execute_batch_dml.timeout,
1015
984
  metadata: metadata,
1016
985
  retry_policy: @config.rpcs.execute_batch_dml.retry_policy
1017
- options.apply_defaults metadata: @config.metadata,
986
+
987
+ options.apply_defaults timeout: @config.timeout,
988
+ metadata: @config.metadata,
1018
989
  retry_policy: @config.retry_policy
1019
990
 
1020
991
  @spanner_stub.call_rpc :execute_batch_dml, request, options: options do |response, operation|
@@ -1135,7 +1106,9 @@ module Google
1135
1106
  options.apply_defaults timeout: @config.rpcs.read.timeout,
1136
1107
  metadata: metadata,
1137
1108
  retry_policy: @config.rpcs.read.retry_policy
1138
- options.apply_defaults metadata: @config.metadata,
1109
+
1110
+ options.apply_defaults timeout: @config.timeout,
1111
+ metadata: @config.metadata,
1139
1112
  retry_policy: @config.retry_policy
1140
1113
 
1141
1114
  @spanner_stub.call_rpc :read, request, options: options do |response, operation|
@@ -1248,7 +1221,9 @@ module Google
1248
1221
  options.apply_defaults timeout: @config.rpcs.streaming_read.timeout,
1249
1222
  metadata: metadata,
1250
1223
  retry_policy: @config.rpcs.streaming_read.retry_policy
1251
- options.apply_defaults metadata: @config.metadata,
1224
+
1225
+ options.apply_defaults timeout: @config.timeout,
1226
+ metadata: @config.metadata,
1252
1227
  retry_policy: @config.retry_policy
1253
1228
 
1254
1229
  @spanner_stub.call_rpc :streaming_read, request, options: options do |response, operation|
@@ -1325,7 +1300,9 @@ module Google
1325
1300
  options.apply_defaults timeout: @config.rpcs.begin_transaction.timeout,
1326
1301
  metadata: metadata,
1327
1302
  retry_policy: @config.rpcs.begin_transaction.retry_policy
1328
- options.apply_defaults metadata: @config.metadata,
1303
+
1304
+ options.apply_defaults timeout: @config.timeout,
1305
+ metadata: @config.metadata,
1329
1306
  retry_policy: @config.retry_policy
1330
1307
 
1331
1308
  @spanner_stub.call_rpc :begin_transaction, request, options: options do |response, operation|
@@ -1426,7 +1403,9 @@ module Google
1426
1403
  options.apply_defaults timeout: @config.rpcs.commit.timeout,
1427
1404
  metadata: metadata,
1428
1405
  retry_policy: @config.rpcs.commit.retry_policy
1429
- options.apply_defaults metadata: @config.metadata,
1406
+
1407
+ options.apply_defaults timeout: @config.timeout,
1408
+ metadata: @config.metadata,
1430
1409
  retry_policy: @config.retry_policy
1431
1410
 
1432
1411
  @spanner_stub.call_rpc :commit, request, options: options do |response, operation|
@@ -1501,7 +1480,9 @@ module Google
1501
1480
  options.apply_defaults timeout: @config.rpcs.rollback.timeout,
1502
1481
  metadata: metadata,
1503
1482
  retry_policy: @config.rpcs.rollback.retry_policy
1504
- options.apply_defaults metadata: @config.metadata,
1483
+
1484
+ options.apply_defaults timeout: @config.timeout,
1485
+ metadata: @config.metadata,
1505
1486
  retry_policy: @config.retry_policy
1506
1487
 
1507
1488
  @spanner_stub.call_rpc :rollback, request, options: options do |response, operation|
@@ -1615,7 +1596,9 @@ module Google
1615
1596
  options.apply_defaults timeout: @config.rpcs.partition_query.timeout,
1616
1597
  metadata: metadata,
1617
1598
  retry_policy: @config.rpcs.partition_query.retry_policy
1618
- options.apply_defaults metadata: @config.metadata,
1599
+
1600
+ options.apply_defaults timeout: @config.timeout,
1601
+ metadata: @config.metadata,
1619
1602
  retry_policy: @config.retry_policy
1620
1603
 
1621
1604
  @spanner_stub.call_rpc :partition_query, request, options: options do |response, operation|
@@ -1715,7 +1698,9 @@ module Google
1715
1698
  options.apply_defaults timeout: @config.rpcs.partition_read.timeout,
1716
1699
  metadata: metadata,
1717
1700
  retry_policy: @config.rpcs.partition_read.retry_policy
1718
- options.apply_defaults metadata: @config.metadata,
1701
+
1702
+ options.apply_defaults timeout: @config.timeout,
1703
+ metadata: @config.metadata,
1719
1704
  retry_policy: @config.retry_policy
1720
1705
 
1721
1706
  @spanner_stub.call_rpc :partition_read, request, options: options do |response, operation|
@@ -1739,22 +1724,21 @@ module Google
1739
1724
  # Configuration can be applied globally to all clients, or to a single client
1740
1725
  # on construction.
1741
1726
  #
1742
- # # Examples
1743
- #
1744
- # To modify the global config, setting the timeout for create_session
1745
- # to 20 seconds, and all remaining timeouts to 10 seconds:
1746
- #
1747
- # ::Google::Cloud::Spanner::V1::Spanner::Client.configure do |config|
1748
- # config.timeout = 10.0
1749
- # config.rpcs.create_session.timeout = 20.0
1750
- # end
1751
- #
1752
- # To apply the above configuration only to a new client:
1753
- #
1754
- # client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config|
1755
- # config.timeout = 10.0
1756
- # config.rpcs.create_session.timeout = 20.0
1757
- # end
1727
+ # @example
1728
+ #
1729
+ # # Modify the global config, setting the timeout for
1730
+ # # create_session to 20 seconds,
1731
+ # # and all remaining timeouts to 10 seconds.
1732
+ # ::Google::Cloud::Spanner::V1::Spanner::Client.configure do |config|
1733
+ # config.timeout = 10.0
1734
+ # config.rpcs.create_session.timeout = 20.0
1735
+ # end
1736
+ #
1737
+ # # Apply the above configuration only to a new client.
1738
+ # client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config|
1739
+ # config.timeout = 10.0
1740
+ # config.rpcs.create_session.timeout = 20.0
1741
+ # end
1758
1742
  #
1759
1743
  # @!attribute [rw] endpoint
1760
1744
  # The hostname or hostname:port of the service endpoint.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Spanner
23
23
  module V1
24
- VERSION = "0.6.0"
24
+ VERSION = "0.7.2"
25
25
  end
26
26
  end
27
27
  end
@@ -0,0 +1,30 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/spanner/v1/commit_response.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/protobuf/duration_pb'
7
+ require 'google/protobuf/timestamp_pb'
8
+ require 'google/api/annotations_pb'
9
+ Google::Protobuf::DescriptorPool.generated_pool.build do
10
+ add_file("google/spanner/v1/commit_response.proto", :syntax => :proto3) do
11
+ add_message "google.spanner.v1.CommitResponse" do
12
+ optional :commit_timestamp, :message, 1, "google.protobuf.Timestamp"
13
+ optional :commit_stats, :message, 2, "google.spanner.v1.CommitResponse.CommitStats"
14
+ end
15
+ add_message "google.spanner.v1.CommitResponse.CommitStats" do
16
+ optional :mutation_count, :int64, 1
17
+ end
18
+ end
19
+ end
20
+
21
+ module Google
22
+ module Cloud
23
+ module Spanner
24
+ module V1
25
+ CommitResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitResponse").msgclass
26
+ CommitResponse::CommitStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitResponse.CommitStats").msgclass
27
+ end
28
+ end
29
+ end
30
+ end
@@ -3,11 +3,11 @@
3
3
 
4
4
  require 'google/protobuf'
5
5
 
6
+ require 'google/spanner/v1/commit_response_pb'
6
7
  require 'google/api/annotations_pb'
7
8
  require 'google/api/client_pb'
8
9
  require 'google/api/field_behavior_pb'
9
10
  require 'google/api/resource_pb'
10
- require 'google/protobuf/duration_pb'
11
11
  require 'google/protobuf/empty_pb'
12
12
  require 'google/protobuf/struct_pb'
13
13
  require 'google/protobuf/timestamp_pb'
@@ -157,13 +157,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
157
157
  optional :single_use_transaction, :message, 3, "google.spanner.v1.TransactionOptions"
158
158
  end
159
159
  end
160
- add_message "google.spanner.v1.CommitResponse" do
161
- optional :commit_timestamp, :message, 1, "google.protobuf.Timestamp"
162
- optional :commit_stats, :message, 2, "google.spanner.v1.CommitResponse.CommitStats"
163
- end
164
- add_message "google.spanner.v1.CommitResponse.CommitStats" do
165
- optional :mutation_count, :int64, 1
166
- end
167
160
  add_message "google.spanner.v1.RollbackRequest" do
168
161
  optional :session, :string, 1
169
162
  optional :transaction_id, :bytes, 2
@@ -199,8 +192,6 @@ module Google
199
192
  ReadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ReadRequest").msgclass
200
193
  BeginTransactionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.BeginTransactionRequest").msgclass
201
194
  CommitRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitRequest").msgclass
202
- CommitResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitResponse").msgclass
203
- CommitResponse::CommitStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitResponse.CommitStats").msgclass
204
195
  RollbackRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.RollbackRequest").msgclass
205
196
  end
206
197
  end
@@ -31,6 +31,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
31
31
  value :ARRAY, 8
32
32
  value :STRUCT, 9
33
33
  value :NUMERIC, 10
34
+ value :JSON, 11
34
35
  end
35
36
  end
36
37
  end
@@ -57,9 +57,15 @@ module Google
57
57
 
58
58
  # Denotes that a (repeated) field is an unordered list.
59
59
  # This indicates that the service may provide the elements of the list
60
- # in any arbitrary order, rather than the order the user originally
60
+ # in any arbitrary order, rather than the order the user originally
61
61
  # provided. Additionally, the list's order may or may not be stable.
62
62
  UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
63
69
  end
64
70
  end
65
71
  end
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Spanner
23
+ module V1
24
+ # The response for {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit}.
25
+ # @!attribute [rw] commit_timestamp
26
+ # @return [::Google::Protobuf::Timestamp]
27
+ # The Cloud Spanner timestamp at which the transaction committed.
28
+ # @!attribute [rw] commit_stats
29
+ # @return [::Google::Cloud::Spanner::V1::CommitResponse::CommitStats]
30
+ # The statistics about this Commit. Not returned by default.
31
+ # For more information, see
32
+ # {::Google::Cloud::Spanner::V1::CommitRequest#return_commit_stats CommitRequest.return_commit_stats}.
33
+ class CommitResponse
34
+ include ::Google::Protobuf::MessageExts
35
+ extend ::Google::Protobuf::MessageExts::ClassMethods
36
+
37
+ # Additional statistics about a commit.
38
+ # @!attribute [rw] mutation_count
39
+ # @return [::Integer]
40
+ # The total number of mutations for the transaction. Knowing the
41
+ # `mutation_count` value can help you maximize the number of mutations
42
+ # in a transaction and minimize the number of API round trips. You can
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).
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).
47
+ class CommitStats
48
+ include ::Google::Protobuf::MessageExts
49
+ extend ::Google::Protobuf::MessageExts::ClassMethods
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
@@ -171,8 +171,9 @@ module Google
171
171
  # that belongs to a transaction.
172
172
  # This field is ignored for requests where it's not applicable (e.g.
173
173
  # CommitRequest).
174
- # `request_tag` must be a valid identifier of the form:
175
- # `[a-zA-Z][a-zA-Z0-9_\-]` between 2 and 64 characters in length
174
+ # Legal characters for `request_tag` values are all printable characters
175
+ # (ASCII 32 - 126) and the length of a request_tag is limited to 50
176
+ # characters. Values that exceed this limit are truncated.
176
177
  # @!attribute [rw] transaction_tag
177
178
  # @return [::String]
178
179
  # A tag used for statistics collection about this transaction.
@@ -182,8 +183,9 @@ module Google
182
183
  # to the same transaction.
183
184
  # If this request doesn’t belong to any transaction, transaction_tag will be
184
185
  # ignored.
185
- # `transaction_tag` must be a valid identifier of the format:
186
- # `[a-zA-Z][a-zA-Z0-9_\-]{0,49}`
186
+ # Legal characters for `transaction_tag` values are all printable characters
187
+ # (ASCII 32 - 126) and the length of a transaction_tag is limited to 50
188
+ # characters. Values that exceed this limit are truncated.
187
189
  class RequestOptions
188
190
  include ::Google::Protobuf::MessageExts
189
191
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -771,35 +773,6 @@ module Google
771
773
  extend ::Google::Protobuf::MessageExts::ClassMethods
772
774
  end
773
775
 
774
- # The response for {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit}.
775
- # @!attribute [rw] commit_timestamp
776
- # @return [::Google::Protobuf::Timestamp]
777
- # The Cloud Spanner timestamp at which the transaction committed.
778
- # @!attribute [rw] commit_stats
779
- # @return [::Google::Cloud::Spanner::V1::CommitResponse::CommitStats]
780
- # The statistics about this Commit. Not returned by default.
781
- # For more information, see
782
- # {::Google::Cloud::Spanner::V1::CommitRequest#return_commit_stats CommitRequest.return_commit_stats}.
783
- class CommitResponse
784
- include ::Google::Protobuf::MessageExts
785
- extend ::Google::Protobuf::MessageExts::ClassMethods
786
-
787
- # Additional statistics about a commit.
788
- # @!attribute [rw] mutation_count
789
- # @return [::Integer]
790
- # The total number of mutations for the transaction. Knowing the
791
- # `mutation_count` value can help you maximize the number of mutations
792
- # in a transaction and minimize the number of API round trips. You can
793
- # also monitor this value to prevent transactions from exceeding the system
794
- # [limit](http://cloud.google.com/spanner/quotas#limits_for_creating_reading_updating_and_deleting_data).
795
- # If the number of mutations exceeds the limit, the server returns
796
- # [INVALID_ARGUMENT](http://cloud.google.com/spanner/docs/reference/rest/v1/Code#ENUM_VALUES.INVALID_ARGUMENT).
797
- class CommitStats
798
- include ::Google::Protobuf::MessageExts
799
- extend ::Google::Protobuf::MessageExts::ClassMethods
800
- end
801
- end
802
-
803
776
  # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#rollback Rollback}.
804
777
  # @!attribute [rw] session
805
778
  # @return [::String]
@@ -131,6 +131,15 @@ module Google
131
131
  # <br>`[+-][Digits].Digits[ExponentIndicator[+-]Digits]`
132
132
  # <br>(ExponentIndicator is `"e"` or `"E"`)
133
133
  NUMERIC = 10
134
+
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.
140
+ # - Members of a JSON object are not guaranteed to have their order
141
+ # preserved. JSON array elements will have their order preserved.
142
+ JSON = 11
134
143
  end
135
144
  end
136
145
  end
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-spanner-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.2
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-04-05 00:00:00.000000000 Z
11
+ date: 2021-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0.7'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '0.4'
22
+ version: 2.a
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '0.7'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '0.4'
32
+ version: 2.a
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: google-cloud-errors
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -170,6 +176,7 @@ files:
170
176
  - lib/google/cloud/spanner/v1/spanner/credentials.rb
171
177
  - lib/google/cloud/spanner/v1/spanner/paths.rb
172
178
  - lib/google/cloud/spanner/v1/version.rb
179
+ - lib/google/spanner/v1/commit_response_pb.rb
173
180
  - lib/google/spanner/v1/keys_pb.rb
174
181
  - lib/google/spanner/v1/mutation_pb.rb
175
182
  - lib/google/spanner/v1/query_plan_pb.rb
@@ -187,6 +194,7 @@ files:
187
194
  - proto_docs/google/protobuf/struct.rb
188
195
  - proto_docs/google/protobuf/timestamp.rb
189
196
  - proto_docs/google/rpc/status.rb
197
+ - proto_docs/google/spanner/v1/commit_response.rb
190
198
  - proto_docs/google/spanner/v1/keys.rb
191
199
  - proto_docs/google/spanner/v1/mutation.rb
192
200
  - proto_docs/google/spanner/v1/query_plan.rb
@@ -213,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
213
221
  - !ruby/object:Gem::Version
214
222
  version: '0'
215
223
  requirements: []
216
- rubygems_version: 3.2.13
224
+ rubygems_version: 3.2.17
217
225
  signing_key:
218
226
  specification_version: 4
219
227
  summary: API Client library for the Cloud Spanner V1 API