google-cloud-spanner-v1 0.26.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3de91d70197f20bb4e8a166132aafd07665288f25bb415e3634f620bdb82a650
|
|
4
|
+
data.tar.gz: fa03fd77c09003a0e0f917f0ad3b0f384e4aa2fec908b8b4de7450ee370c2e90
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6daf1eda9121e736946e5c292e06f1167030807a4fcaeebeb23e68191572ce7949ec58acb0a264926725065845ae209c1cae6913e7967edb17b637d5cc996bce
|
|
7
|
+
data.tar.gz: 5fef422f32c4f660508bbd1ff6b8937f3d1a3fc95ae17652b82e873f44dd1fdcf4b37d1accdbf63217e0f33a9d0acb3c950f36a61e2fba8f6411dc532ea4007c
|
|
@@ -33,6 +33,9 @@ module Google
|
|
|
33
33
|
# transactions on data stored in Cloud Spanner databases.
|
|
34
34
|
#
|
|
35
35
|
class Client
|
|
36
|
+
# @private
|
|
37
|
+
API_VERSION = ""
|
|
38
|
+
|
|
36
39
|
# @private
|
|
37
40
|
DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$"
|
|
38
41
|
|
|
@@ -309,10 +312,11 @@ module Google
|
|
|
309
312
|
# Customize the options with defaults
|
|
310
313
|
metadata = @config.rpcs.create_session.metadata.to_h
|
|
311
314
|
|
|
312
|
-
# Set x-goog-api-client
|
|
315
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
313
316
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
314
317
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
315
318
|
gapic_version: ::Google::Cloud::Spanner::V1::VERSION
|
|
319
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
316
320
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
317
321
|
|
|
318
322
|
header_params = {}
|
|
@@ -406,10 +410,11 @@ module Google
|
|
|
406
410
|
# Customize the options with defaults
|
|
407
411
|
metadata = @config.rpcs.batch_create_sessions.metadata.to_h
|
|
408
412
|
|
|
409
|
-
# Set x-goog-api-client
|
|
413
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
410
414
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
411
415
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
412
416
|
gapic_version: ::Google::Cloud::Spanner::V1::VERSION
|
|
417
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
413
418
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
414
419
|
|
|
415
420
|
header_params = {}
|
|
@@ -493,10 +498,11 @@ module Google
|
|
|
493
498
|
# Customize the options with defaults
|
|
494
499
|
metadata = @config.rpcs.get_session.metadata.to_h
|
|
495
500
|
|
|
496
|
-
# Set x-goog-api-client
|
|
501
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
497
502
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
498
503
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
499
504
|
gapic_version: ::Google::Cloud::Spanner::V1::VERSION
|
|
505
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
500
506
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
501
507
|
|
|
502
508
|
header_params = {}
|
|
@@ -601,10 +607,11 @@ module Google
|
|
|
601
607
|
# Customize the options with defaults
|
|
602
608
|
metadata = @config.rpcs.list_sessions.metadata.to_h
|
|
603
609
|
|
|
604
|
-
# Set x-goog-api-client
|
|
610
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
605
611
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
606
612
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
607
613
|
gapic_version: ::Google::Cloud::Spanner::V1::VERSION
|
|
614
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
608
615
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
609
616
|
|
|
610
617
|
header_params = {}
|
|
@@ -689,10 +696,11 @@ module Google
|
|
|
689
696
|
# Customize the options with defaults
|
|
690
697
|
metadata = @config.rpcs.delete_session.metadata.to_h
|
|
691
698
|
|
|
692
|
-
# Set x-goog-api-client
|
|
699
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
693
700
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
694
701
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
695
702
|
gapic_version: ::Google::Cloud::Spanner::V1::VERSION
|
|
703
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
696
704
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
697
705
|
|
|
698
706
|
header_params = {}
|
|
@@ -865,10 +873,11 @@ module Google
|
|
|
865
873
|
# Customize the options with defaults
|
|
866
874
|
metadata = @config.rpcs.execute_sql.metadata.to_h
|
|
867
875
|
|
|
868
|
-
# Set x-goog-api-client
|
|
876
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
869
877
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
870
878
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
871
879
|
gapic_version: ::Google::Cloud::Spanner::V1::VERSION
|
|
880
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
872
881
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
873
882
|
|
|
874
883
|
header_params = {}
|
|
@@ -1036,10 +1045,11 @@ module Google
|
|
|
1036
1045
|
# Customize the options with defaults
|
|
1037
1046
|
metadata = @config.rpcs.execute_streaming_sql.metadata.to_h
|
|
1038
1047
|
|
|
1039
|
-
# Set x-goog-api-client
|
|
1048
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1040
1049
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1041
1050
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1042
1051
|
gapic_version: ::Google::Cloud::Spanner::V1::VERSION
|
|
1052
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1043
1053
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1044
1054
|
|
|
1045
1055
|
header_params = {}
|
|
@@ -1156,10 +1166,11 @@ module Google
|
|
|
1156
1166
|
# Customize the options with defaults
|
|
1157
1167
|
metadata = @config.rpcs.execute_batch_dml.metadata.to_h
|
|
1158
1168
|
|
|
1159
|
-
# Set x-goog-api-client
|
|
1169
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1160
1170
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1161
1171
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1162
1172
|
gapic_version: ::Google::Cloud::Spanner::V1::VERSION
|
|
1173
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1163
1174
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1164
1175
|
|
|
1165
1176
|
header_params = {}
|
|
@@ -1212,7 +1223,7 @@ module Google
|
|
|
1212
1223
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1213
1224
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1214
1225
|
#
|
|
1215
|
-
# @overload read(session: nil, transaction: nil, table: nil, index: nil, columns: nil, key_set: nil, limit: nil, resume_token: nil, partition_token: nil, request_options: nil, directed_read_options: nil, data_boost_enabled: nil)
|
|
1226
|
+
# @overload read(session: nil, transaction: nil, table: nil, index: nil, columns: nil, key_set: nil, limit: nil, resume_token: nil, partition_token: nil, request_options: nil, directed_read_options: nil, data_boost_enabled: nil, order_by: nil, lock_hint: nil)
|
|
1216
1227
|
# Pass arguments to `read` via keyword arguments. Note that at
|
|
1217
1228
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1218
1229
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -1277,6 +1288,17 @@ module Google
|
|
|
1277
1288
|
#
|
|
1278
1289
|
# If the field is set to `true` but the request does not set
|
|
1279
1290
|
# `partition_token`, the API returns an `INVALID_ARGUMENT` error.
|
|
1291
|
+
# @param order_by [::Google::Cloud::Spanner::V1::ReadRequest::OrderBy]
|
|
1292
|
+
# Optional. Order for the returned rows.
|
|
1293
|
+
#
|
|
1294
|
+
# By default, Spanner will return result rows in primary key order except for
|
|
1295
|
+
# PartitionRead requests. For applications that do not require rows to be
|
|
1296
|
+
# returned in primary key (`ORDER_BY_PRIMARY_KEY`) order, setting
|
|
1297
|
+
# `ORDER_BY_NO_ORDER` option allows Spanner to optimize row retrieval,
|
|
1298
|
+
# resulting in lower latencies in certain cases (e.g. bulk point lookups).
|
|
1299
|
+
# @param lock_hint [::Google::Cloud::Spanner::V1::ReadRequest::LockHint]
|
|
1300
|
+
# Optional. Lock Hint for the request, it can only be used with read-write
|
|
1301
|
+
# transactions.
|
|
1280
1302
|
#
|
|
1281
1303
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
1282
1304
|
# @yieldparam response [::Google::Cloud::Spanner::V1::ResultSet]
|
|
@@ -1312,10 +1334,11 @@ module Google
|
|
|
1312
1334
|
# Customize the options with defaults
|
|
1313
1335
|
metadata = @config.rpcs.read.metadata.to_h
|
|
1314
1336
|
|
|
1315
|
-
# Set x-goog-api-client
|
|
1337
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1316
1338
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1317
1339
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1318
1340
|
gapic_version: ::Google::Cloud::Spanner::V1::VERSION
|
|
1341
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1319
1342
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1320
1343
|
|
|
1321
1344
|
header_params = {}
|
|
@@ -1359,7 +1382,7 @@ module Google
|
|
|
1359
1382
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1360
1383
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1361
1384
|
#
|
|
1362
|
-
# @overload streaming_read(session: nil, transaction: nil, table: nil, index: nil, columns: nil, key_set: nil, limit: nil, resume_token: nil, partition_token: nil, request_options: nil, directed_read_options: nil, data_boost_enabled: nil)
|
|
1385
|
+
# @overload streaming_read(session: nil, transaction: nil, table: nil, index: nil, columns: nil, key_set: nil, limit: nil, resume_token: nil, partition_token: nil, request_options: nil, directed_read_options: nil, data_boost_enabled: nil, order_by: nil, lock_hint: nil)
|
|
1363
1386
|
# Pass arguments to `streaming_read` via keyword arguments. Note that at
|
|
1364
1387
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1365
1388
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -1424,6 +1447,17 @@ module Google
|
|
|
1424
1447
|
#
|
|
1425
1448
|
# If the field is set to `true` but the request does not set
|
|
1426
1449
|
# `partition_token`, the API returns an `INVALID_ARGUMENT` error.
|
|
1450
|
+
# @param order_by [::Google::Cloud::Spanner::V1::ReadRequest::OrderBy]
|
|
1451
|
+
# Optional. Order for the returned rows.
|
|
1452
|
+
#
|
|
1453
|
+
# By default, Spanner will return result rows in primary key order except for
|
|
1454
|
+
# PartitionRead requests. For applications that do not require rows to be
|
|
1455
|
+
# returned in primary key (`ORDER_BY_PRIMARY_KEY`) order, setting
|
|
1456
|
+
# `ORDER_BY_NO_ORDER` option allows Spanner to optimize row retrieval,
|
|
1457
|
+
# resulting in lower latencies in certain cases (e.g. bulk point lookups).
|
|
1458
|
+
# @param lock_hint [::Google::Cloud::Spanner::V1::ReadRequest::LockHint]
|
|
1459
|
+
# Optional. Lock Hint for the request, it can only be used with read-write
|
|
1460
|
+
# transactions.
|
|
1427
1461
|
#
|
|
1428
1462
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
1429
1463
|
# @yieldparam response [::Enumerable<::Google::Cloud::Spanner::V1::PartialResultSet>]
|
|
@@ -1462,10 +1496,11 @@ module Google
|
|
|
1462
1496
|
# Customize the options with defaults
|
|
1463
1497
|
metadata = @config.rpcs.streaming_read.metadata.to_h
|
|
1464
1498
|
|
|
1465
|
-
# Set x-goog-api-client
|
|
1499
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1466
1500
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1467
1501
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1468
1502
|
gapic_version: ::Google::Cloud::Spanner::V1::VERSION
|
|
1503
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1469
1504
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1470
1505
|
|
|
1471
1506
|
header_params = {}
|
|
@@ -1559,10 +1594,11 @@ module Google
|
|
|
1559
1594
|
# Customize the options with defaults
|
|
1560
1595
|
metadata = @config.rpcs.begin_transaction.metadata.to_h
|
|
1561
1596
|
|
|
1562
|
-
# Set x-goog-api-client
|
|
1597
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1563
1598
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1564
1599
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1565
1600
|
gapic_version: ::Google::Cloud::Spanner::V1::VERSION
|
|
1601
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1566
1602
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1567
1603
|
|
|
1568
1604
|
header_params = {}
|
|
@@ -1685,10 +1721,11 @@ module Google
|
|
|
1685
1721
|
# Customize the options with defaults
|
|
1686
1722
|
metadata = @config.rpcs.commit.metadata.to_h
|
|
1687
1723
|
|
|
1688
|
-
# Set x-goog-api-client
|
|
1724
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1689
1725
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1690
1726
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1691
1727
|
gapic_version: ::Google::Cloud::Spanner::V1::VERSION
|
|
1728
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1692
1729
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1693
1730
|
|
|
1694
1731
|
header_params = {}
|
|
@@ -1780,10 +1817,11 @@ module Google
|
|
|
1780
1817
|
# Customize the options with defaults
|
|
1781
1818
|
metadata = @config.rpcs.rollback.metadata.to_h
|
|
1782
1819
|
|
|
1783
|
-
# Set x-goog-api-client
|
|
1820
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1784
1821
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1785
1822
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1786
1823
|
gapic_version: ::Google::Cloud::Spanner::V1::VERSION
|
|
1824
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1787
1825
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1788
1826
|
|
|
1789
1827
|
header_params = {}
|
|
@@ -1917,10 +1955,11 @@ module Google
|
|
|
1917
1955
|
# Customize the options with defaults
|
|
1918
1956
|
metadata = @config.rpcs.partition_query.metadata.to_h
|
|
1919
1957
|
|
|
1920
|
-
# Set x-goog-api-client
|
|
1958
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1921
1959
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1922
1960
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1923
1961
|
gapic_version: ::Google::Cloud::Spanner::V1::VERSION
|
|
1962
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1924
1963
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1925
1964
|
|
|
1926
1965
|
header_params = {}
|
|
@@ -2043,10 +2082,11 @@ module Google
|
|
|
2043
2082
|
# Customize the options with defaults
|
|
2044
2083
|
metadata = @config.rpcs.partition_read.metadata.to_h
|
|
2045
2084
|
|
|
2046
|
-
# Set x-goog-api-client
|
|
2085
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
2047
2086
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
2048
2087
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
2049
2088
|
gapic_version: ::Google::Cloud::Spanner::V1::VERSION
|
|
2089
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
2050
2090
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
2051
2091
|
|
|
2052
2092
|
header_params = {}
|
|
@@ -2162,10 +2202,11 @@ module Google
|
|
|
2162
2202
|
# Customize the options with defaults
|
|
2163
2203
|
metadata = @config.rpcs.batch_write.metadata.to_h
|
|
2164
2204
|
|
|
2165
|
-
# Set x-goog-api-client
|
|
2205
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
2166
2206
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
2167
2207
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
2168
2208
|
gapic_version: ::Google::Cloud::Spanner::V1::VERSION
|
|
2209
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
2169
2210
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
2170
2211
|
|
|
2171
2212
|
header_params = {}
|
|
@@ -21,7 +21,7 @@ require 'google/spanner/v1/transaction_pb'
|
|
|
21
21
|
require 'google/spanner/v1/type_pb'
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
descriptor_data = "\n\x1fgoogle/spanner/v1/spanner.proto\x12\x11google.spanner.v1\x1a\'google/spanner/v1/commit_response.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/spanner/v1/keys.proto\x1a google/spanner/v1/mutation.proto\x1a\"google/spanner/v1/result_set.proto\x1a#google/spanner/v1/transaction.proto\x1a\x1cgoogle/spanner/v1/type.proto\"\x83\x01\n\x14\x43reateSessionRequest\x12\x39\n\x08\x64\x61tabase\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12\x30\n\x07session\x18\x02 \x01(\x0b\x32\x1a.google.spanner.v1.SessionB\x03\xe0\x41\x02\"\xa9\x01\n\x1a\x42\x61tchCreateSessionsRequest\x12\x39\n\x08\x64\x61tabase\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12\x34\n\x10session_template\x18\x02 \x01(\x0b\x32\x1a.google.spanner.v1.Session\x12\x1a\n\rsession_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"J\n\x1b\x42\x61tchCreateSessionsResponse\x12+\n\x07session\x18\x01 \x03(\x0b\x32\x1a.google.spanner.v1.Session\"\xa3\x03\n\x07Session\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x36\n\x06labels\x18\x02 \x03(\x0b\x32&.google.spanner.v1.Session.LabelsEntry\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x19\x61pproximate_last_use_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x14\n\x0c\x63reator_role\x18\x05 \x01(\t\x12\x18\n\x0bmultiplexed\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:t\xea\x41q\n\x1espanner.googleapis.com/Session\x12Oprojects/{project}/instances/{instance}/databases/{database}/sessions/{session}\"I\n\x11GetSessionRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\"\x87\x01\n\x13ListSessionsRequest\x12\x39\n\x08\x64\x61tabase\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"]\n\x14ListSessionsResponse\x12,\n\x08sessions\x18\x01 \x03(\x0b\x32\x1a.google.spanner.v1.Session\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"L\n\x14\x44\x65leteSessionRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\"\xdc\x01\n\x0eRequestOptions\x12<\n\x08priority\x18\x01 \x01(\x0e\x32*.google.spanner.v1.RequestOptions.Priority\x12\x13\n\x0brequest_tag\x18\x02 \x01(\t\x12\x17\n\x0ftransaction_tag\x18\x03 \x01(\t\"^\n\x08Priority\x12\x18\n\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cPRIORITY_LOW\x10\x01\x12\x13\n\x0fPRIORITY_MEDIUM\x10\x02\x12\x11\n\rPRIORITY_HIGH\x10\x03\"\xea\x04\n\x13\x44irectedReadOptions\x12R\n\x10include_replicas\x18\x01 \x01(\x0b\x32\x36.google.spanner.v1.DirectedReadOptions.IncludeReplicasH\x00\x12R\n\x10\x65xclude_replicas\x18\x02 \x01(\x0b\x32\x36.google.spanner.v1.DirectedReadOptions.ExcludeReplicasH\x00\x1a\xad\x01\n\x10ReplicaSelection\x12\x10\n\x08location\x18\x01 \x01(\t\x12J\n\x04type\x18\x02 \x01(\x0e\x32<.google.spanner.v1.DirectedReadOptions.ReplicaSelection.Type\";\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nREAD_WRITE\x10\x01\x12\r\n\tREAD_ONLY\x10\x02\x1a\x86\x01\n\x0fIncludeReplicas\x12S\n\x12replica_selections\x18\x01 \x03(\x0b\x32\x37.google.spanner.v1.DirectedReadOptions.ReplicaSelection\x12\x1e\n\x16\x61uto_failover_disabled\x18\x02 \x01(\x08\x1a\x66\n\x0f\x45xcludeReplicas\x12S\n\x12replica_selections\x18\x01 \x03(\x0b\x32\x37.google.spanner.v1.DirectedReadOptions.ReplicaSelectionB\n\n\x08replicas\"\xc7\x06\n\x11\x45xecuteSqlRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12;\n\x0btransaction\x18\x02 \x01(\x0b\x32&.google.spanner.v1.TransactionSelector\x12\x10\n\x03sql\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x06params\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12I\n\x0bparam_types\x18\x05 \x03(\x0b\x32\x34.google.spanner.v1.ExecuteSqlRequest.ParamTypesEntry\x12\x14\n\x0cresume_token\x18\x06 \x01(\x0c\x12\x42\n\nquery_mode\x18\x07 \x01(\x0e\x32..google.spanner.v1.ExecuteSqlRequest.QueryMode\x12\x17\n\x0fpartition_token\x18\x08 \x01(\x0c\x12\r\n\x05seqno\x18\t \x01(\x03\x12H\n\rquery_options\x18\n \x01(\x0b\x32\x31.google.spanner.v1.ExecuteSqlRequest.QueryOptions\x12:\n\x0frequest_options\x18\x0b \x01(\x0b\x32!.google.spanner.v1.RequestOptions\x12\x45\n\x15\x64irected_read_options\x18\x0f \x01(\x0b\x32&.google.spanner.v1.DirectedReadOptions\x12\x1a\n\x12\x64\x61ta_boost_enabled\x18\x10 \x01(\x08\x1aO\n\x0cQueryOptions\x12\x19\n\x11optimizer_version\x18\x01 \x01(\t\x12$\n\x1coptimizer_statistics_package\x18\x02 \x01(\t\x1aJ\n\x0fParamTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.google.spanner.v1.Type:\x02\x38\x01\".\n\tQueryMode\x12\n\n\x06NORMAL\x10\x00\x12\x08\n\x04PLAN\x10\x01\x12\x0b\n\x07PROFILE\x10\x02\"\xa0\x04\n\x16\x45xecuteBatchDmlRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12@\n\x0btransaction\x18\x02 \x01(\x0b\x32&.google.spanner.v1.TransactionSelectorB\x03\xe0\x41\x02\x12L\n\nstatements\x18\x03 \x03(\x0b\x32\x33.google.spanner.v1.ExecuteBatchDmlRequest.StatementB\x03\xe0\x41\x02\x12\x12\n\x05seqno\x18\x04 \x01(\x03\x42\x03\xe0\x41\x02\x12:\n\x0frequest_options\x18\x05 \x01(\x0b\x32!.google.spanner.v1.RequestOptions\x1a\xec\x01\n\tStatement\x12\x10\n\x03sql\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x06params\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12X\n\x0bparam_types\x18\x03 \x03(\x0b\x32\x43.google.spanner.v1.ExecuteBatchDmlRequest.Statement.ParamTypesEntry\x1aJ\n\x0fParamTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.google.spanner.v1.Type:\x02\x38\x01\"p\n\x17\x45xecuteBatchDmlResponse\x12\x31\n\x0bresult_sets\x18\x01 \x03(\x0b\x32\x1c.google.spanner.v1.ResultSet\x12\"\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"H\n\x10PartitionOptions\x12\x1c\n\x14partition_size_bytes\x18\x01 \x01(\x03\x12\x16\n\x0emax_partitions\x18\x02 \x01(\x03\"\xa3\x03\n\x15PartitionQueryRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12;\n\x0btransaction\x18\x02 \x01(\x0b\x32&.google.spanner.v1.TransactionSelector\x12\x10\n\x03sql\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x06params\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12M\n\x0bparam_types\x18\x05 \x03(\x0b\x32\x38.google.spanner.v1.PartitionQueryRequest.ParamTypesEntry\x12>\n\x11partition_options\x18\x06 \x01(\x0b\x32#.google.spanner.v1.PartitionOptions\x1aJ\n\x0fParamTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.google.spanner.v1.Type:\x02\x38\x01\"\xb1\x02\n\x14PartitionReadRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12;\n\x0btransaction\x18\x02 \x01(\x0b\x32&.google.spanner.v1.TransactionSelector\x12\x12\n\x05table\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\r\n\x05index\x18\x04 \x01(\t\x12\x0f\n\x07\x63olumns\x18\x05 \x03(\t\x12/\n\x07key_set\x18\x06 \x01(\x0b\x32\x19.google.spanner.v1.KeySetB\x03\xe0\x41\x02\x12>\n\x11partition_options\x18\t \x01(\x0b\x32#.google.spanner.v1.PartitionOptions\"$\n\tPartition\x12\x17\n\x0fpartition_token\x18\x01 \x01(\x0c\"z\n\x11PartitionResponse\x12\x30\n\npartitions\x18\x01 \x03(\x0b\x32\x1c.google.spanner.v1.Partition\x12\x33\n\x0btransaction\x18\x02 \x01(\x0b\x32\x1e.google.spanner.v1.Transaction\"\xca\x03\n\x0bReadRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12;\n\x0btransaction\x18\x02 \x01(\x0b\x32&.google.spanner.v1.TransactionSelector\x12\x12\n\x05table\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\r\n\x05index\x18\x04 \x01(\t\x12\x14\n\x07\x63olumns\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12/\n\x07key_set\x18\x06 \x01(\x0b\x32\x19.google.spanner.v1.KeySetB\x03\xe0\x41\x02\x12\r\n\x05limit\x18\x08 \x01(\x03\x12\x14\n\x0cresume_token\x18\t \x01(\x0c\x12\x17\n\x0fpartition_token\x18\n \x01(\x0c\x12:\n\x0frequest_options\x18\x0b \x01(\x0b\x32!.google.spanner.v1.RequestOptions\x12\x45\n\x15\x64irected_read_options\x18\x0e \x01(\x0b\x32&.google.spanner.v1.DirectedReadOptions\x12\x1a\n\x12\x64\x61ta_boost_enabled\x18\x0f \x01(\x08\"\xcb\x01\n\x17\x42\x65ginTransactionRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12;\n\x07options\x18\x02 \x01(\x0b\x32%.google.spanner.v1.TransactionOptionsB\x03\xe0\x41\x02\x12:\n\x0frequest_options\x18\x03 \x01(\x0b\x32!.google.spanner.v1.RequestOptions\"\xfd\x02\n\rCommitRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12\x18\n\x0etransaction_id\x18\x02 \x01(\x0cH\x00\x12G\n\x16single_use_transaction\x18\x03 \x01(\x0b\x32%.google.spanner.v1.TransactionOptionsH\x00\x12.\n\tmutations\x18\x04 \x03(\x0b\x32\x1b.google.spanner.v1.Mutation\x12\x1b\n\x13return_commit_stats\x18\x05 \x01(\x08\x12\x38\n\x10max_commit_delay\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12:\n\x0frequest_options\x18\x06 \x01(\x0b\x32!.google.spanner.v1.RequestOptionsB\r\n\x0btransaction\"g\n\x0fRollbackRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12\x1b\n\x0etransaction_id\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\"\xce\x02\n\x11\x42\x61tchWriteRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12:\n\x0frequest_options\x18\x03 \x01(\x0b\x32!.google.spanner.v1.RequestOptions\x12P\n\x0fmutation_groups\x18\x04 \x03(\x0b\x32\x32.google.spanner.v1.BatchWriteRequest.MutationGroupB\x03\xe0\x41\x02\x12,\n\x1f\x65xclude_txn_from_change_streams\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x44\n\rMutationGroup\x12\x33\n\tmutations\x18\x01 \x03(\x0b\x32\x1b.google.spanner.v1.MutationB\x03\xe0\x41\x02\"\x7f\n\x12\x42\x61tchWriteResponse\x12\x0f\n\x07indexes\x18\x01 \x03(\x05\x12\"\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\x12\x34\n\x10\x63ommit_timestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\x8b\x18\n\x07Spanner\x12\xa6\x01\n\rCreateSession\x12\'.google.spanner.v1.CreateSessionRequest\x1a\x1a.google.spanner.v1.Session\"P\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02?\":/v1/{database=projects/*/instances/*/databases/*}/sessions:\x01*\x12\xe0\x01\n\x13\x42\x61tchCreateSessions\x12-.google.spanner.v1.BatchCreateSessionsRequest\x1a..google.spanner.v1.BatchCreateSessionsResponse\"j\xda\x41\x16\x64\x61tabase,session_count\x82\xd3\xe4\x93\x02K\"F/v1/{database=projects/*/instances/*/databases/*}/sessions:batchCreate:\x01*\x12\x97\x01\n\nGetSession\x12$.google.spanner.v1.GetSessionRequest\x1a\x1a.google.spanner.v1.Session\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/instances/*/databases/*/sessions/*}\x12\xae\x01\n\x0cListSessions\x12&.google.spanner.v1.ListSessionsRequest\x1a\'.google.spanner.v1.ListSessionsResponse\"M\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02<\x12:/v1/{database=projects/*/instances/*/databases/*}/sessions\x12\x99\x01\n\rDeleteSession\x12\'.google.spanner.v1.DeleteSessionRequest\x1a\x16.google.protobuf.Empty\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/instances/*/databases/*/sessions/*}\x12\xa3\x01\n\nExecuteSql\x12$.google.spanner.v1.ExecuteSqlRequest\x1a\x1c.google.spanner.v1.ResultSet\"Q\x82\xd3\xe4\x93\x02K\"F/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeSql:\x01*\x12\xbe\x01\n\x13\x45xecuteStreamingSql\x12$.google.spanner.v1.ExecuteSqlRequest\x1a#.google.spanner.v1.PartialResultSet\"Z\x82\xd3\xe4\x93\x02T\"O/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeStreamingSql:\x01*0\x01\x12\xc0\x01\n\x0f\x45xecuteBatchDml\x12).google.spanner.v1.ExecuteBatchDmlRequest\x1a*.google.spanner.v1.ExecuteBatchDmlResponse\"V\x82\xd3\xe4\x93\x02P\"K/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeBatchDml:\x01*\x12\x91\x01\n\x04Read\x12\x1e.google.spanner.v1.ReadRequest\x1a\x1c.google.spanner.v1.ResultSet\"K\x82\xd3\xe4\x93\x02\x45\"@/v1/{session=projects/*/instances/*/databases/*/sessions/*}:read:\x01*\x12\xac\x01\n\rStreamingRead\x12\x1e.google.spanner.v1.ReadRequest\x1a#.google.spanner.v1.PartialResultSet\"T\x82\xd3\xe4\x93\x02N\"I/v1/{session=projects/*/instances/*/databases/*/sessions/*}:streamingRead:\x01*0\x01\x12\xc9\x01\n\x10\x42\x65ginTransaction\x12*.google.spanner.v1.BeginTransactionRequest\x1a\x1e.google.spanner.v1.Transaction\"i\xda\x41\x0fsession,options\x82\xd3\xe4\x93\x02Q\"L/v1/{session=projects/*/instances/*/databases/*/sessions/*}:beginTransaction:\x01*\x12\xeb\x01\n\x06\x43ommit\x12 .google.spanner.v1.CommitRequest\x1a!.google.spanner.v1.CommitResponse\"\x9b\x01\xda\x41 session,transaction_id,mutations\xda\x41(session,single_use_transaction,mutations\x82\xd3\xe4\x93\x02G\"B/v1/{session=projects/*/instances/*/databases/*/sessions/*}:commit:\x01*\x12\xb0\x01\n\x08Rollback\x12\".google.spanner.v1.RollbackRequest\x1a\x16.google.protobuf.Empty\"h\xda\x41\x16session,transaction_id\x82\xd3\xe4\x93\x02I\"D/v1/{session=projects/*/instances/*/databases/*/sessions/*}:rollback:\x01*\x12\xb7\x01\n\x0ePartitionQuery\x12(.google.spanner.v1.PartitionQueryRequest\x1a$.google.spanner.v1.PartitionResponse\"U\x82\xd3\xe4\x93\x02O\"J/v1/{session=projects/*/instances/*/databases/*/sessions/*}:partitionQuery:\x01*\x12\xb4\x01\n\rPartitionRead\x12\'.google.spanner.v1.PartitionReadRequest\x1a$.google.spanner.v1.PartitionResponse\"T\x82\xd3\xe4\x93\x02N\"I/v1/{session=projects/*/instances/*/databases/*/sessions/*}:partitionRead:\x01*\x12\xc8\x01\n\nBatchWrite\x12$.google.spanner.v1.BatchWriteRequest\x1a%.google.spanner.v1.BatchWriteResponse\"k\xda\x41\x17session,mutation_groups\x82\xd3\xe4\x93\x02K\"F/v1/{session=projects/*/instances/*/databases/*/sessions/*}:batchWrite:\x01*0\x01\x1aw\xca\x41\x16spanner.googleapis.com\xd2\x41[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/spanner.dataB\x91\x02\n\x15\x63om.google.spanner.v1B\x0cSpannerProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1\xea\x41_\n\x1fspanner.googleapis.com/Database\x12<projects/{project}/instances/{instance}/databases/{database}P\x00\x62\x06proto3"
|
|
24
|
+
descriptor_data = "\n\x1fgoogle/spanner/v1/spanner.proto\x12\x11google.spanner.v1\x1a\'google/spanner/v1/commit_response.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/spanner/v1/keys.proto\x1a google/spanner/v1/mutation.proto\x1a\"google/spanner/v1/result_set.proto\x1a#google/spanner/v1/transaction.proto\x1a\x1cgoogle/spanner/v1/type.proto\"\x83\x01\n\x14\x43reateSessionRequest\x12\x39\n\x08\x64\x61tabase\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12\x30\n\x07session\x18\x02 \x01(\x0b\x32\x1a.google.spanner.v1.SessionB\x03\xe0\x41\x02\"\xa9\x01\n\x1a\x42\x61tchCreateSessionsRequest\x12\x39\n\x08\x64\x61tabase\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12\x34\n\x10session_template\x18\x02 \x01(\x0b\x32\x1a.google.spanner.v1.Session\x12\x1a\n\rsession_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"J\n\x1b\x42\x61tchCreateSessionsResponse\x12+\n\x07session\x18\x01 \x03(\x0b\x32\x1a.google.spanner.v1.Session\"\xa3\x03\n\x07Session\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x36\n\x06labels\x18\x02 \x03(\x0b\x32&.google.spanner.v1.Session.LabelsEntry\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x19\x61pproximate_last_use_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x14\n\x0c\x63reator_role\x18\x05 \x01(\t\x12\x18\n\x0bmultiplexed\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:t\xea\x41q\n\x1espanner.googleapis.com/Session\x12Oprojects/{project}/instances/{instance}/databases/{database}/sessions/{session}\"I\n\x11GetSessionRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\"\x87\x01\n\x13ListSessionsRequest\x12\x39\n\x08\x64\x61tabase\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"]\n\x14ListSessionsResponse\x12,\n\x08sessions\x18\x01 \x03(\x0b\x32\x1a.google.spanner.v1.Session\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"L\n\x14\x44\x65leteSessionRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\"\xdc\x01\n\x0eRequestOptions\x12<\n\x08priority\x18\x01 \x01(\x0e\x32*.google.spanner.v1.RequestOptions.Priority\x12\x13\n\x0brequest_tag\x18\x02 \x01(\t\x12\x17\n\x0ftransaction_tag\x18\x03 \x01(\t\"^\n\x08Priority\x12\x18\n\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cPRIORITY_LOW\x10\x01\x12\x13\n\x0fPRIORITY_MEDIUM\x10\x02\x12\x11\n\rPRIORITY_HIGH\x10\x03\"\xea\x04\n\x13\x44irectedReadOptions\x12R\n\x10include_replicas\x18\x01 \x01(\x0b\x32\x36.google.spanner.v1.DirectedReadOptions.IncludeReplicasH\x00\x12R\n\x10\x65xclude_replicas\x18\x02 \x01(\x0b\x32\x36.google.spanner.v1.DirectedReadOptions.ExcludeReplicasH\x00\x1a\xad\x01\n\x10ReplicaSelection\x12\x10\n\x08location\x18\x01 \x01(\t\x12J\n\x04type\x18\x02 \x01(\x0e\x32<.google.spanner.v1.DirectedReadOptions.ReplicaSelection.Type\";\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nREAD_WRITE\x10\x01\x12\r\n\tREAD_ONLY\x10\x02\x1a\x86\x01\n\x0fIncludeReplicas\x12S\n\x12replica_selections\x18\x01 \x03(\x0b\x32\x37.google.spanner.v1.DirectedReadOptions.ReplicaSelection\x12\x1e\n\x16\x61uto_failover_disabled\x18\x02 \x01(\x08\x1a\x66\n\x0f\x45xcludeReplicas\x12S\n\x12replica_selections\x18\x01 \x03(\x0b\x32\x37.google.spanner.v1.DirectedReadOptions.ReplicaSelectionB\n\n\x08replicas\"\xc7\x06\n\x11\x45xecuteSqlRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12;\n\x0btransaction\x18\x02 \x01(\x0b\x32&.google.spanner.v1.TransactionSelector\x12\x10\n\x03sql\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x06params\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12I\n\x0bparam_types\x18\x05 \x03(\x0b\x32\x34.google.spanner.v1.ExecuteSqlRequest.ParamTypesEntry\x12\x14\n\x0cresume_token\x18\x06 \x01(\x0c\x12\x42\n\nquery_mode\x18\x07 \x01(\x0e\x32..google.spanner.v1.ExecuteSqlRequest.QueryMode\x12\x17\n\x0fpartition_token\x18\x08 \x01(\x0c\x12\r\n\x05seqno\x18\t \x01(\x03\x12H\n\rquery_options\x18\n \x01(\x0b\x32\x31.google.spanner.v1.ExecuteSqlRequest.QueryOptions\x12:\n\x0frequest_options\x18\x0b \x01(\x0b\x32!.google.spanner.v1.RequestOptions\x12\x45\n\x15\x64irected_read_options\x18\x0f \x01(\x0b\x32&.google.spanner.v1.DirectedReadOptions\x12\x1a\n\x12\x64\x61ta_boost_enabled\x18\x10 \x01(\x08\x1aO\n\x0cQueryOptions\x12\x19\n\x11optimizer_version\x18\x01 \x01(\t\x12$\n\x1coptimizer_statistics_package\x18\x02 \x01(\t\x1aJ\n\x0fParamTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.google.spanner.v1.Type:\x02\x38\x01\".\n\tQueryMode\x12\n\n\x06NORMAL\x10\x00\x12\x08\n\x04PLAN\x10\x01\x12\x0b\n\x07PROFILE\x10\x02\"\xa0\x04\n\x16\x45xecuteBatchDmlRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12@\n\x0btransaction\x18\x02 \x01(\x0b\x32&.google.spanner.v1.TransactionSelectorB\x03\xe0\x41\x02\x12L\n\nstatements\x18\x03 \x03(\x0b\x32\x33.google.spanner.v1.ExecuteBatchDmlRequest.StatementB\x03\xe0\x41\x02\x12\x12\n\x05seqno\x18\x04 \x01(\x03\x42\x03\xe0\x41\x02\x12:\n\x0frequest_options\x18\x05 \x01(\x0b\x32!.google.spanner.v1.RequestOptions\x1a\xec\x01\n\tStatement\x12\x10\n\x03sql\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x06params\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12X\n\x0bparam_types\x18\x03 \x03(\x0b\x32\x43.google.spanner.v1.ExecuteBatchDmlRequest.Statement.ParamTypesEntry\x1aJ\n\x0fParamTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.google.spanner.v1.Type:\x02\x38\x01\"p\n\x17\x45xecuteBatchDmlResponse\x12\x31\n\x0bresult_sets\x18\x01 \x03(\x0b\x32\x1c.google.spanner.v1.ResultSet\x12\"\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"H\n\x10PartitionOptions\x12\x1c\n\x14partition_size_bytes\x18\x01 \x01(\x03\x12\x16\n\x0emax_partitions\x18\x02 \x01(\x03\"\xa3\x03\n\x15PartitionQueryRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12;\n\x0btransaction\x18\x02 \x01(\x0b\x32&.google.spanner.v1.TransactionSelector\x12\x10\n\x03sql\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x06params\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12M\n\x0bparam_types\x18\x05 \x03(\x0b\x32\x38.google.spanner.v1.PartitionQueryRequest.ParamTypesEntry\x12>\n\x11partition_options\x18\x06 \x01(\x0b\x32#.google.spanner.v1.PartitionOptions\x1aJ\n\x0fParamTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.google.spanner.v1.Type:\x02\x38\x01\"\xb1\x02\n\x14PartitionReadRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12;\n\x0btransaction\x18\x02 \x01(\x0b\x32&.google.spanner.v1.TransactionSelector\x12\x12\n\x05table\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\r\n\x05index\x18\x04 \x01(\t\x12\x0f\n\x07\x63olumns\x18\x05 \x03(\t\x12/\n\x07key_set\x18\x06 \x01(\x0b\x32\x19.google.spanner.v1.KeySetB\x03\xe0\x41\x02\x12>\n\x11partition_options\x18\t \x01(\x0b\x32#.google.spanner.v1.PartitionOptions\"$\n\tPartition\x12\x17\n\x0fpartition_token\x18\x01 \x01(\x0c\"z\n\x11PartitionResponse\x12\x30\n\npartitions\x18\x01 \x03(\x0b\x32\x1c.google.spanner.v1.Partition\x12\x33\n\x0btransaction\x18\x02 \x01(\x0b\x32\x1e.google.spanner.v1.Transaction\"\xf6\x05\n\x0bReadRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12;\n\x0btransaction\x18\x02 \x01(\x0b\x32&.google.spanner.v1.TransactionSelector\x12\x12\n\x05table\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\r\n\x05index\x18\x04 \x01(\t\x12\x14\n\x07\x63olumns\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12/\n\x07key_set\x18\x06 \x01(\x0b\x32\x19.google.spanner.v1.KeySetB\x03\xe0\x41\x02\x12\r\n\x05limit\x18\x08 \x01(\x03\x12\x14\n\x0cresume_token\x18\t \x01(\x0c\x12\x17\n\x0fpartition_token\x18\n \x01(\x0c\x12:\n\x0frequest_options\x18\x0b \x01(\x0b\x32!.google.spanner.v1.RequestOptions\x12\x45\n\x15\x64irected_read_options\x18\x0e \x01(\x0b\x32&.google.spanner.v1.DirectedReadOptions\x12\x1a\n\x12\x64\x61ta_boost_enabled\x18\x0f \x01(\x08\x12=\n\x08order_by\x18\x10 \x01(\x0e\x32&.google.spanner.v1.ReadRequest.OrderByB\x03\xe0\x41\x01\x12?\n\tlock_hint\x18\x11 \x01(\x0e\x32\'.google.spanner.v1.ReadRequest.LockHintB\x03\xe0\x41\x01\"T\n\x07OrderBy\x12\x18\n\x14ORDER_BY_UNSPECIFIED\x10\x00\x12\x18\n\x14ORDER_BY_PRIMARY_KEY\x10\x01\x12\x15\n\x11ORDER_BY_NO_ORDER\x10\x02\"T\n\x08LockHint\x12\x19\n\x15LOCK_HINT_UNSPECIFIED\x10\x00\x12\x14\n\x10LOCK_HINT_SHARED\x10\x01\x12\x17\n\x13LOCK_HINT_EXCLUSIVE\x10\x02\"\xcb\x01\n\x17\x42\x65ginTransactionRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12;\n\x07options\x18\x02 \x01(\x0b\x32%.google.spanner.v1.TransactionOptionsB\x03\xe0\x41\x02\x12:\n\x0frequest_options\x18\x03 \x01(\x0b\x32!.google.spanner.v1.RequestOptions\"\xfd\x02\n\rCommitRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12\x18\n\x0etransaction_id\x18\x02 \x01(\x0cH\x00\x12G\n\x16single_use_transaction\x18\x03 \x01(\x0b\x32%.google.spanner.v1.TransactionOptionsH\x00\x12.\n\tmutations\x18\x04 \x03(\x0b\x32\x1b.google.spanner.v1.Mutation\x12\x1b\n\x13return_commit_stats\x18\x05 \x01(\x08\x12\x38\n\x10max_commit_delay\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12:\n\x0frequest_options\x18\x06 \x01(\x0b\x32!.google.spanner.v1.RequestOptionsB\r\n\x0btransaction\"g\n\x0fRollbackRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12\x1b\n\x0etransaction_id\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\"\xce\x02\n\x11\x42\x61tchWriteRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12:\n\x0frequest_options\x18\x03 \x01(\x0b\x32!.google.spanner.v1.RequestOptions\x12P\n\x0fmutation_groups\x18\x04 \x03(\x0b\x32\x32.google.spanner.v1.BatchWriteRequest.MutationGroupB\x03\xe0\x41\x02\x12,\n\x1f\x65xclude_txn_from_change_streams\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x44\n\rMutationGroup\x12\x33\n\tmutations\x18\x01 \x03(\x0b\x32\x1b.google.spanner.v1.MutationB\x03\xe0\x41\x02\"\x7f\n\x12\x42\x61tchWriteResponse\x12\x0f\n\x07indexes\x18\x01 \x03(\x05\x12\"\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\x12\x34\n\x10\x63ommit_timestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\x8b\x18\n\x07Spanner\x12\xa6\x01\n\rCreateSession\x12\'.google.spanner.v1.CreateSessionRequest\x1a\x1a.google.spanner.v1.Session\"P\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02?\":/v1/{database=projects/*/instances/*/databases/*}/sessions:\x01*\x12\xe0\x01\n\x13\x42\x61tchCreateSessions\x12-.google.spanner.v1.BatchCreateSessionsRequest\x1a..google.spanner.v1.BatchCreateSessionsResponse\"j\xda\x41\x16\x64\x61tabase,session_count\x82\xd3\xe4\x93\x02K\"F/v1/{database=projects/*/instances/*/databases/*}/sessions:batchCreate:\x01*\x12\x97\x01\n\nGetSession\x12$.google.spanner.v1.GetSessionRequest\x1a\x1a.google.spanner.v1.Session\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/instances/*/databases/*/sessions/*}\x12\xae\x01\n\x0cListSessions\x12&.google.spanner.v1.ListSessionsRequest\x1a\'.google.spanner.v1.ListSessionsResponse\"M\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02<\x12:/v1/{database=projects/*/instances/*/databases/*}/sessions\x12\x99\x01\n\rDeleteSession\x12\'.google.spanner.v1.DeleteSessionRequest\x1a\x16.google.protobuf.Empty\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/instances/*/databases/*/sessions/*}\x12\xa3\x01\n\nExecuteSql\x12$.google.spanner.v1.ExecuteSqlRequest\x1a\x1c.google.spanner.v1.ResultSet\"Q\x82\xd3\xe4\x93\x02K\"F/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeSql:\x01*\x12\xbe\x01\n\x13\x45xecuteStreamingSql\x12$.google.spanner.v1.ExecuteSqlRequest\x1a#.google.spanner.v1.PartialResultSet\"Z\x82\xd3\xe4\x93\x02T\"O/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeStreamingSql:\x01*0\x01\x12\xc0\x01\n\x0f\x45xecuteBatchDml\x12).google.spanner.v1.ExecuteBatchDmlRequest\x1a*.google.spanner.v1.ExecuteBatchDmlResponse\"V\x82\xd3\xe4\x93\x02P\"K/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeBatchDml:\x01*\x12\x91\x01\n\x04Read\x12\x1e.google.spanner.v1.ReadRequest\x1a\x1c.google.spanner.v1.ResultSet\"K\x82\xd3\xe4\x93\x02\x45\"@/v1/{session=projects/*/instances/*/databases/*/sessions/*}:read:\x01*\x12\xac\x01\n\rStreamingRead\x12\x1e.google.spanner.v1.ReadRequest\x1a#.google.spanner.v1.PartialResultSet\"T\x82\xd3\xe4\x93\x02N\"I/v1/{session=projects/*/instances/*/databases/*/sessions/*}:streamingRead:\x01*0\x01\x12\xc9\x01\n\x10\x42\x65ginTransaction\x12*.google.spanner.v1.BeginTransactionRequest\x1a\x1e.google.spanner.v1.Transaction\"i\xda\x41\x0fsession,options\x82\xd3\xe4\x93\x02Q\"L/v1/{session=projects/*/instances/*/databases/*/sessions/*}:beginTransaction:\x01*\x12\xeb\x01\n\x06\x43ommit\x12 .google.spanner.v1.CommitRequest\x1a!.google.spanner.v1.CommitResponse\"\x9b\x01\xda\x41 session,transaction_id,mutations\xda\x41(session,single_use_transaction,mutations\x82\xd3\xe4\x93\x02G\"B/v1/{session=projects/*/instances/*/databases/*/sessions/*}:commit:\x01*\x12\xb0\x01\n\x08Rollback\x12\".google.spanner.v1.RollbackRequest\x1a\x16.google.protobuf.Empty\"h\xda\x41\x16session,transaction_id\x82\xd3\xe4\x93\x02I\"D/v1/{session=projects/*/instances/*/databases/*/sessions/*}:rollback:\x01*\x12\xb7\x01\n\x0ePartitionQuery\x12(.google.spanner.v1.PartitionQueryRequest\x1a$.google.spanner.v1.PartitionResponse\"U\x82\xd3\xe4\x93\x02O\"J/v1/{session=projects/*/instances/*/databases/*/sessions/*}:partitionQuery:\x01*\x12\xb4\x01\n\rPartitionRead\x12\'.google.spanner.v1.PartitionReadRequest\x1a$.google.spanner.v1.PartitionResponse\"T\x82\xd3\xe4\x93\x02N\"I/v1/{session=projects/*/instances/*/databases/*/sessions/*}:partitionRead:\x01*\x12\xc8\x01\n\nBatchWrite\x12$.google.spanner.v1.BatchWriteRequest\x1a%.google.spanner.v1.BatchWriteResponse\"k\xda\x41\x17session,mutation_groups\x82\xd3\xe4\x93\x02K\"F/v1/{session=projects/*/instances/*/databases/*/sessions/*}:batchWrite:\x01*0\x01\x1aw\xca\x41\x16spanner.googleapis.com\xd2\x41[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/spanner.dataB\x91\x02\n\x15\x63om.google.spanner.v1B\x0cSpannerProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1\xea\x41_\n\x1fspanner.googleapis.com/Database\x12<projects/{project}/instances/{instance}/databases/{database}P\x00\x62\x06proto3"
|
|
25
25
|
|
|
26
26
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
27
27
|
|
|
@@ -87,6 +87,8 @@ module Google
|
|
|
87
87
|
Partition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Partition").msgclass
|
|
88
88
|
PartitionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.PartitionResponse").msgclass
|
|
89
89
|
ReadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ReadRequest").msgclass
|
|
90
|
+
ReadRequest::OrderBy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ReadRequest.OrderBy").enummodule
|
|
91
|
+
ReadRequest::LockHint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ReadRequest.LockHint").enummodule
|
|
90
92
|
BeginTransactionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.BeginTransactionRequest").msgclass
|
|
91
93
|
CommitRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitRequest").msgclass
|
|
92
94
|
RollbackRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.RollbackRequest").msgclass
|
|
@@ -870,9 +870,87 @@ module Google
|
|
|
870
870
|
#
|
|
871
871
|
# If the field is set to `true` but the request does not set
|
|
872
872
|
# `partition_token`, the API returns an `INVALID_ARGUMENT` error.
|
|
873
|
+
# @!attribute [rw] order_by
|
|
874
|
+
# @return [::Google::Cloud::Spanner::V1::ReadRequest::OrderBy]
|
|
875
|
+
# Optional. Order for the returned rows.
|
|
876
|
+
#
|
|
877
|
+
# By default, Spanner will return result rows in primary key order except for
|
|
878
|
+
# PartitionRead requests. For applications that do not require rows to be
|
|
879
|
+
# returned in primary key (`ORDER_BY_PRIMARY_KEY`) order, setting
|
|
880
|
+
# `ORDER_BY_NO_ORDER` option allows Spanner to optimize row retrieval,
|
|
881
|
+
# resulting in lower latencies in certain cases (e.g. bulk point lookups).
|
|
882
|
+
# @!attribute [rw] lock_hint
|
|
883
|
+
# @return [::Google::Cloud::Spanner::V1::ReadRequest::LockHint]
|
|
884
|
+
# Optional. Lock Hint for the request, it can only be used with read-write
|
|
885
|
+
# transactions.
|
|
873
886
|
class ReadRequest
|
|
874
887
|
include ::Google::Protobuf::MessageExts
|
|
875
888
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
889
|
+
|
|
890
|
+
# An option to control the order in which rows are returned from a read.
|
|
891
|
+
module OrderBy
|
|
892
|
+
# Default value.
|
|
893
|
+
#
|
|
894
|
+
# ORDER_BY_UNSPECIFIED is equivalent to ORDER_BY_PRIMARY_KEY.
|
|
895
|
+
ORDER_BY_UNSPECIFIED = 0
|
|
896
|
+
|
|
897
|
+
# Read rows are returned in primary key order.
|
|
898
|
+
#
|
|
899
|
+
# In the event that this option is used in conjunction with the
|
|
900
|
+
# `partition_token` field, the API will return an `INVALID_ARGUMENT` error.
|
|
901
|
+
ORDER_BY_PRIMARY_KEY = 1
|
|
902
|
+
|
|
903
|
+
# Read rows are returned in any order.
|
|
904
|
+
ORDER_BY_NO_ORDER = 2
|
|
905
|
+
end
|
|
906
|
+
|
|
907
|
+
# A lock hint mechanism for reads done within a transaction.
|
|
908
|
+
module LockHint
|
|
909
|
+
# Default value.
|
|
910
|
+
#
|
|
911
|
+
# LOCK_HINT_UNSPECIFIED is equivalent to LOCK_HINT_SHARED.
|
|
912
|
+
LOCK_HINT_UNSPECIFIED = 0
|
|
913
|
+
|
|
914
|
+
# Acquire shared locks.
|
|
915
|
+
#
|
|
916
|
+
# By default when you perform a read as part of a read-write transaction,
|
|
917
|
+
# Spanner acquires shared read locks, which allows other reads to still
|
|
918
|
+
# access the data until your transaction is ready to commit. When your
|
|
919
|
+
# transaction is committing and writes are being applied, the transaction
|
|
920
|
+
# attempts to upgrade to an exclusive lock for any data you are writing.
|
|
921
|
+
# For more information about locks, see [Lock
|
|
922
|
+
# modes](https://cloud.google.com/spanner/docs/introspection/lock-statistics#explain-lock-modes).
|
|
923
|
+
LOCK_HINT_SHARED = 1
|
|
924
|
+
|
|
925
|
+
# Acquire exclusive locks.
|
|
926
|
+
#
|
|
927
|
+
# Requesting exclusive locks is beneficial if you observe high write
|
|
928
|
+
# contention, which means you notice that multiple transactions are
|
|
929
|
+
# concurrently trying to read and write to the same data, resulting in a
|
|
930
|
+
# large number of aborts. This problem occurs when two transactions
|
|
931
|
+
# initially acquire shared locks and then both try to upgrade to exclusive
|
|
932
|
+
# locks at the same time. In this situation both transactions are waiting
|
|
933
|
+
# for the other to give up their lock, resulting in a deadlocked situation.
|
|
934
|
+
# Spanner is able to detect this occurring and force one of the
|
|
935
|
+
# transactions to abort. However, this is a slow and expensive operation
|
|
936
|
+
# and results in lower performance. In this case it makes sense to acquire
|
|
937
|
+
# exclusive locks at the start of the transaction because then when
|
|
938
|
+
# multiple transactions try to act on the same data, they automatically get
|
|
939
|
+
# serialized. Each transaction waits its turn to acquire the lock and
|
|
940
|
+
# avoids getting into deadlock situations.
|
|
941
|
+
#
|
|
942
|
+
# Because the exclusive lock hint is just a hint, it should not be
|
|
943
|
+
# considered equivalent to a mutex. In other words, you should not use
|
|
944
|
+
# Spanner exclusive locks as a mutual exclusion mechanism for the execution
|
|
945
|
+
# of code outside of Spanner.
|
|
946
|
+
#
|
|
947
|
+
# **Note:** Request exclusive locks judiciously because they block others
|
|
948
|
+
# from reading that data for the entire transaction, rather than just when
|
|
949
|
+
# the writes are being performed. Unless you observe high write contention,
|
|
950
|
+
# you should use the default of shared read locks so you don't prematurely
|
|
951
|
+
# block other clients from reading the data that you're writing to.
|
|
952
|
+
LOCK_HINT_EXCLUSIVE = 2
|
|
953
|
+
end
|
|
876
954
|
end
|
|
877
955
|
|
|
878
956
|
# The request for
|
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.
|
|
4
|
+
version: 0.27.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: 2024-
|
|
11
|
+
date: 2024-05-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: gapic-common
|