google-cloud-spanner-v1 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/spanner/v1/spanner/client.rb +74 -51
- data/lib/google/cloud/spanner/v1/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a274c4e1d09a3122c37193aca7a73d498e2e8a7493583b880dc327c4a8561abd
|
4
|
+
data.tar.gz: c5bec182d4e02eb05dc64d2042030ff2e0b282557fe62eb464b4f83a01ae4be8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e698b60a077b905df8d71fc9e0add9efcf5039d186780c5ff5f645bb23f873a62d7f21cfc9b243ce48255089bc3120d3b4c83d687a84252c9c50f2bc60404b7c
|
7
|
+
data.tar.gz: 806caae37da3d1d7f556567b5f2fab0dcfe0c4c699b2a1d9364816589aed039168c0c73845c96b2c475abd806d7975a57866e8df67e14c30299c0386110ea345
|
@@ -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
|
-
#
|
47
|
+
# @example
|
48
48
|
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
#
|
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]
|
@@ -166,19 +165,15 @@ module Google
|
|
166
165
|
##
|
167
166
|
# Create a new Spanner client object.
|
168
167
|
#
|
169
|
-
#
|
170
|
-
#
|
171
|
-
# To create a new Spanner client with the default
|
172
|
-
# configuration:
|
173
|
-
#
|
174
|
-
# client = ::Google::Cloud::Spanner::V1::Spanner::Client.new
|
168
|
+
# @example
|
175
169
|
#
|
176
|
-
#
|
177
|
-
#
|
170
|
+
# # Create a client using the default configuration
|
171
|
+
# client = ::Google::Cloud::Spanner::V1::Spanner::Client.new
|
178
172
|
#
|
179
|
-
#
|
180
|
-
#
|
181
|
-
#
|
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
|
182
177
|
#
|
183
178
|
# @yield [config] Configure the Spanner client.
|
184
179
|
# @yieldparam config [Client::Configuration]
|
@@ -198,10 +193,9 @@ module Google
|
|
198
193
|
|
199
194
|
# Create credentials
|
200
195
|
credentials = @config.credentials
|
201
|
-
# Use self-signed JWT if the
|
196
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
202
197
|
# but only if the default endpoint does not have a region prefix.
|
203
|
-
enable_self_signed_jwt = @config.
|
204
|
-
@config.endpoint == Client.configure.endpoint &&
|
198
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
205
199
|
!@config.endpoint.split(".").first.include?("-")
|
206
200
|
credentials ||= Credentials.default scope: @config.scope,
|
207
201
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -297,7 +291,9 @@ module Google
|
|
297
291
|
options.apply_defaults timeout: @config.rpcs.create_session.timeout,
|
298
292
|
metadata: metadata,
|
299
293
|
retry_policy: @config.rpcs.create_session.retry_policy
|
300
|
-
|
294
|
+
|
295
|
+
options.apply_defaults timeout: @config.timeout,
|
296
|
+
metadata: @config.metadata,
|
301
297
|
retry_policy: @config.retry_policy
|
302
298
|
|
303
299
|
@spanner_stub.call_rpc :create_session, request, options: options do |response, operation|
|
@@ -374,7 +370,9 @@ module Google
|
|
374
370
|
options.apply_defaults timeout: @config.rpcs.batch_create_sessions.timeout,
|
375
371
|
metadata: metadata,
|
376
372
|
retry_policy: @config.rpcs.batch_create_sessions.retry_policy
|
377
|
-
|
373
|
+
|
374
|
+
options.apply_defaults timeout: @config.timeout,
|
375
|
+
metadata: @config.metadata,
|
378
376
|
retry_policy: @config.retry_policy
|
379
377
|
|
380
378
|
@spanner_stub.call_rpc :batch_create_sessions, request, options: options do |response, operation|
|
@@ -442,7 +440,9 @@ module Google
|
|
442
440
|
options.apply_defaults timeout: @config.rpcs.get_session.timeout,
|
443
441
|
metadata: metadata,
|
444
442
|
retry_policy: @config.rpcs.get_session.retry_policy
|
445
|
-
|
443
|
+
|
444
|
+
options.apply_defaults timeout: @config.timeout,
|
445
|
+
metadata: @config.metadata,
|
446
446
|
retry_policy: @config.retry_policy
|
447
447
|
|
448
448
|
@spanner_stub.call_rpc :get_session, request, options: options do |response, operation|
|
@@ -526,7 +526,9 @@ module Google
|
|
526
526
|
options.apply_defaults timeout: @config.rpcs.list_sessions.timeout,
|
527
527
|
metadata: metadata,
|
528
528
|
retry_policy: @config.rpcs.list_sessions.retry_policy
|
529
|
-
|
529
|
+
|
530
|
+
options.apply_defaults timeout: @config.timeout,
|
531
|
+
metadata: @config.metadata,
|
530
532
|
retry_policy: @config.retry_policy
|
531
533
|
|
532
534
|
@spanner_stub.call_rpc :list_sessions, request, options: options do |response, operation|
|
@@ -595,7 +597,9 @@ module Google
|
|
595
597
|
options.apply_defaults timeout: @config.rpcs.delete_session.timeout,
|
596
598
|
metadata: metadata,
|
597
599
|
retry_policy: @config.rpcs.delete_session.retry_policy
|
598
|
-
|
600
|
+
|
601
|
+
options.apply_defaults timeout: @config.timeout,
|
602
|
+
metadata: @config.metadata,
|
599
603
|
retry_policy: @config.retry_policy
|
600
604
|
|
601
605
|
@spanner_stub.call_rpc :delete_session, request, options: options do |response, operation|
|
@@ -738,7 +742,9 @@ module Google
|
|
738
742
|
options.apply_defaults timeout: @config.rpcs.execute_sql.timeout,
|
739
743
|
metadata: metadata,
|
740
744
|
retry_policy: @config.rpcs.execute_sql.retry_policy
|
741
|
-
|
745
|
+
|
746
|
+
options.apply_defaults timeout: @config.timeout,
|
747
|
+
metadata: @config.metadata,
|
742
748
|
retry_policy: @config.retry_policy
|
743
749
|
|
744
750
|
@spanner_stub.call_rpc :execute_sql, request, options: options do |response, operation|
|
@@ -875,7 +881,9 @@ module Google
|
|
875
881
|
options.apply_defaults timeout: @config.rpcs.execute_streaming_sql.timeout,
|
876
882
|
metadata: metadata,
|
877
883
|
retry_policy: @config.rpcs.execute_streaming_sql.retry_policy
|
878
|
-
|
884
|
+
|
885
|
+
options.apply_defaults timeout: @config.timeout,
|
886
|
+
metadata: @config.metadata,
|
879
887
|
retry_policy: @config.retry_policy
|
880
888
|
|
881
889
|
@spanner_stub.call_rpc :execute_streaming_sql, request, options: options do |response, operation|
|
@@ -975,7 +983,9 @@ module Google
|
|
975
983
|
options.apply_defaults timeout: @config.rpcs.execute_batch_dml.timeout,
|
976
984
|
metadata: metadata,
|
977
985
|
retry_policy: @config.rpcs.execute_batch_dml.retry_policy
|
978
|
-
|
986
|
+
|
987
|
+
options.apply_defaults timeout: @config.timeout,
|
988
|
+
metadata: @config.metadata,
|
979
989
|
retry_policy: @config.retry_policy
|
980
990
|
|
981
991
|
@spanner_stub.call_rpc :execute_batch_dml, request, options: options do |response, operation|
|
@@ -1096,7 +1106,9 @@ module Google
|
|
1096
1106
|
options.apply_defaults timeout: @config.rpcs.read.timeout,
|
1097
1107
|
metadata: metadata,
|
1098
1108
|
retry_policy: @config.rpcs.read.retry_policy
|
1099
|
-
|
1109
|
+
|
1110
|
+
options.apply_defaults timeout: @config.timeout,
|
1111
|
+
metadata: @config.metadata,
|
1100
1112
|
retry_policy: @config.retry_policy
|
1101
1113
|
|
1102
1114
|
@spanner_stub.call_rpc :read, request, options: options do |response, operation|
|
@@ -1209,7 +1221,9 @@ module Google
|
|
1209
1221
|
options.apply_defaults timeout: @config.rpcs.streaming_read.timeout,
|
1210
1222
|
metadata: metadata,
|
1211
1223
|
retry_policy: @config.rpcs.streaming_read.retry_policy
|
1212
|
-
|
1224
|
+
|
1225
|
+
options.apply_defaults timeout: @config.timeout,
|
1226
|
+
metadata: @config.metadata,
|
1213
1227
|
retry_policy: @config.retry_policy
|
1214
1228
|
|
1215
1229
|
@spanner_stub.call_rpc :streaming_read, request, options: options do |response, operation|
|
@@ -1286,7 +1300,9 @@ module Google
|
|
1286
1300
|
options.apply_defaults timeout: @config.rpcs.begin_transaction.timeout,
|
1287
1301
|
metadata: metadata,
|
1288
1302
|
retry_policy: @config.rpcs.begin_transaction.retry_policy
|
1289
|
-
|
1303
|
+
|
1304
|
+
options.apply_defaults timeout: @config.timeout,
|
1305
|
+
metadata: @config.metadata,
|
1290
1306
|
retry_policy: @config.retry_policy
|
1291
1307
|
|
1292
1308
|
@spanner_stub.call_rpc :begin_transaction, request, options: options do |response, operation|
|
@@ -1387,7 +1403,9 @@ module Google
|
|
1387
1403
|
options.apply_defaults timeout: @config.rpcs.commit.timeout,
|
1388
1404
|
metadata: metadata,
|
1389
1405
|
retry_policy: @config.rpcs.commit.retry_policy
|
1390
|
-
|
1406
|
+
|
1407
|
+
options.apply_defaults timeout: @config.timeout,
|
1408
|
+
metadata: @config.metadata,
|
1391
1409
|
retry_policy: @config.retry_policy
|
1392
1410
|
|
1393
1411
|
@spanner_stub.call_rpc :commit, request, options: options do |response, operation|
|
@@ -1462,7 +1480,9 @@ module Google
|
|
1462
1480
|
options.apply_defaults timeout: @config.rpcs.rollback.timeout,
|
1463
1481
|
metadata: metadata,
|
1464
1482
|
retry_policy: @config.rpcs.rollback.retry_policy
|
1465
|
-
|
1483
|
+
|
1484
|
+
options.apply_defaults timeout: @config.timeout,
|
1485
|
+
metadata: @config.metadata,
|
1466
1486
|
retry_policy: @config.retry_policy
|
1467
1487
|
|
1468
1488
|
@spanner_stub.call_rpc :rollback, request, options: options do |response, operation|
|
@@ -1576,7 +1596,9 @@ module Google
|
|
1576
1596
|
options.apply_defaults timeout: @config.rpcs.partition_query.timeout,
|
1577
1597
|
metadata: metadata,
|
1578
1598
|
retry_policy: @config.rpcs.partition_query.retry_policy
|
1579
|
-
|
1599
|
+
|
1600
|
+
options.apply_defaults timeout: @config.timeout,
|
1601
|
+
metadata: @config.metadata,
|
1580
1602
|
retry_policy: @config.retry_policy
|
1581
1603
|
|
1582
1604
|
@spanner_stub.call_rpc :partition_query, request, options: options do |response, operation|
|
@@ -1676,7 +1698,9 @@ module Google
|
|
1676
1698
|
options.apply_defaults timeout: @config.rpcs.partition_read.timeout,
|
1677
1699
|
metadata: metadata,
|
1678
1700
|
retry_policy: @config.rpcs.partition_read.retry_policy
|
1679
|
-
|
1701
|
+
|
1702
|
+
options.apply_defaults timeout: @config.timeout,
|
1703
|
+
metadata: @config.metadata,
|
1680
1704
|
retry_policy: @config.retry_policy
|
1681
1705
|
|
1682
1706
|
@spanner_stub.call_rpc :partition_read, request, options: options do |response, operation|
|
@@ -1700,22 +1724,21 @@ module Google
|
|
1700
1724
|
# Configuration can be applied globally to all clients, or to a single client
|
1701
1725
|
# on construction.
|
1702
1726
|
#
|
1703
|
-
#
|
1704
|
-
#
|
1705
|
-
#
|
1706
|
-
# to 20 seconds,
|
1707
|
-
#
|
1708
|
-
#
|
1709
|
-
#
|
1710
|
-
#
|
1711
|
-
#
|
1712
|
-
#
|
1713
|
-
#
|
1714
|
-
#
|
1715
|
-
#
|
1716
|
-
#
|
1717
|
-
#
|
1718
|
-
# 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
|
1719
1742
|
#
|
1720
1743
|
# @!attribute [rw] endpoint
|
1721
1744
|
# The hostname or hostname:port of the service endpoint.
|
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
|
+
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-
|
11
|
+
date: 2021-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|