google-cloud-spanner-v1 0.2.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.md +188 -190
- data/README.md +66 -2
- data/lib/google/cloud/spanner/v1.rb +3 -0
- data/lib/google/cloud/spanner/v1/spanner/client.rb +83 -65
- data/lib/google/cloud/spanner/v1/version.rb +1 -1
- data/lib/google/spanner/v1/spanner_pb.rb +8 -0
- data/lib/google/spanner/v1/spanner_services_pb.rb +21 -15
- data/proto_docs/google/api/field_behavior.rb +6 -0
- data/proto_docs/google/api/resource.rb +50 -14
- data/proto_docs/google/protobuf/any.rb +5 -2
- data/proto_docs/google/protobuf/timestamp.rb +10 -1
- data/proto_docs/google/spanner/v1/spanner.rb +69 -12
- data/proto_docs/google/spanner/v1/transaction.rb +12 -11
- data/proto_docs/google/spanner/v1/type.rb +1 -1
- metadata +9 -7
@@ -63,7 +63,7 @@ module Google
|
|
63
63
|
parent_config = while namespace.any?
|
64
64
|
parent_name = namespace.join "::"
|
65
65
|
parent_const = const_get parent_name
|
66
|
-
break parent_const.configure if parent_const
|
66
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
67
67
|
namespace.pop
|
68
68
|
end
|
69
69
|
default_config = Client::Configuration.new parent_config
|
@@ -71,49 +71,49 @@ module Google
|
|
71
71
|
default_config.rpcs.create_session.timeout = 30.0
|
72
72
|
default_config.rpcs.create_session.retry_policy = {
|
73
73
|
initial_delay: 0.25,
|
74
|
-
|
75
|
-
|
76
|
-
|
74
|
+
max_delay: 32.0,
|
75
|
+
multiplier: 1.3,
|
76
|
+
retry_codes: [14]
|
77
77
|
}
|
78
78
|
|
79
79
|
default_config.rpcs.batch_create_sessions.timeout = 60.0
|
80
80
|
default_config.rpcs.batch_create_sessions.retry_policy = {
|
81
81
|
initial_delay: 0.25,
|
82
|
-
|
83
|
-
|
84
|
-
|
82
|
+
max_delay: 32.0,
|
83
|
+
multiplier: 1.3,
|
84
|
+
retry_codes: [14]
|
85
85
|
}
|
86
86
|
|
87
87
|
default_config.rpcs.get_session.timeout = 30.0
|
88
88
|
default_config.rpcs.get_session.retry_policy = {
|
89
89
|
initial_delay: 0.25,
|
90
|
-
|
91
|
-
|
92
|
-
|
90
|
+
max_delay: 32.0,
|
91
|
+
multiplier: 1.3,
|
92
|
+
retry_codes: [14]
|
93
93
|
}
|
94
94
|
|
95
95
|
default_config.rpcs.list_sessions.timeout = 3600.0
|
96
96
|
default_config.rpcs.list_sessions.retry_policy = {
|
97
97
|
initial_delay: 0.25,
|
98
|
-
|
99
|
-
|
100
|
-
|
98
|
+
max_delay: 32.0,
|
99
|
+
multiplier: 1.3,
|
100
|
+
retry_codes: [14]
|
101
101
|
}
|
102
102
|
|
103
103
|
default_config.rpcs.delete_session.timeout = 30.0
|
104
104
|
default_config.rpcs.delete_session.retry_policy = {
|
105
105
|
initial_delay: 0.25,
|
106
|
-
|
107
|
-
|
108
|
-
|
106
|
+
max_delay: 32.0,
|
107
|
+
multiplier: 1.3,
|
108
|
+
retry_codes: [14]
|
109
109
|
}
|
110
110
|
|
111
111
|
default_config.rpcs.execute_sql.timeout = 30.0
|
112
112
|
default_config.rpcs.execute_sql.retry_policy = {
|
113
113
|
initial_delay: 0.25,
|
114
|
-
|
115
|
-
|
116
|
-
|
114
|
+
max_delay: 32.0,
|
115
|
+
multiplier: 1.3,
|
116
|
+
retry_codes: [14]
|
117
117
|
}
|
118
118
|
|
119
119
|
default_config.rpcs.execute_streaming_sql.timeout = 3600.0
|
@@ -121,17 +121,17 @@ module Google
|
|
121
121
|
default_config.rpcs.execute_batch_dml.timeout = 30.0
|
122
122
|
default_config.rpcs.execute_batch_dml.retry_policy = {
|
123
123
|
initial_delay: 0.25,
|
124
|
-
|
125
|
-
|
126
|
-
|
124
|
+
max_delay: 32.0,
|
125
|
+
multiplier: 1.3,
|
126
|
+
retry_codes: [14]
|
127
127
|
}
|
128
128
|
|
129
129
|
default_config.rpcs.read.timeout = 30.0
|
130
130
|
default_config.rpcs.read.retry_policy = {
|
131
131
|
initial_delay: 0.25,
|
132
|
-
|
133
|
-
|
134
|
-
|
132
|
+
max_delay: 32.0,
|
133
|
+
multiplier: 1.3,
|
134
|
+
retry_codes: [14]
|
135
135
|
}
|
136
136
|
|
137
137
|
default_config.rpcs.streaming_read.timeout = 3600.0
|
@@ -139,41 +139,41 @@ module Google
|
|
139
139
|
default_config.rpcs.begin_transaction.timeout = 30.0
|
140
140
|
default_config.rpcs.begin_transaction.retry_policy = {
|
141
141
|
initial_delay: 0.25,
|
142
|
-
|
143
|
-
|
144
|
-
|
142
|
+
max_delay: 32.0,
|
143
|
+
multiplier: 1.3,
|
144
|
+
retry_codes: [14]
|
145
145
|
}
|
146
146
|
|
147
147
|
default_config.rpcs.commit.timeout = 3600.0
|
148
148
|
default_config.rpcs.commit.retry_policy = {
|
149
149
|
initial_delay: 0.25,
|
150
|
-
|
151
|
-
|
152
|
-
|
150
|
+
max_delay: 32.0,
|
151
|
+
multiplier: 1.3,
|
152
|
+
retry_codes: [14]
|
153
153
|
}
|
154
154
|
|
155
155
|
default_config.rpcs.rollback.timeout = 30.0
|
156
156
|
default_config.rpcs.rollback.retry_policy = {
|
157
157
|
initial_delay: 0.25,
|
158
|
-
|
159
|
-
|
160
|
-
|
158
|
+
max_delay: 32.0,
|
159
|
+
multiplier: 1.3,
|
160
|
+
retry_codes: [14]
|
161
161
|
}
|
162
162
|
|
163
163
|
default_config.rpcs.partition_query.timeout = 30.0
|
164
164
|
default_config.rpcs.partition_query.retry_policy = {
|
165
165
|
initial_delay: 0.25,
|
166
|
-
|
167
|
-
|
168
|
-
|
166
|
+
max_delay: 32.0,
|
167
|
+
multiplier: 1.3,
|
168
|
+
retry_codes: [14]
|
169
169
|
}
|
170
170
|
|
171
171
|
default_config.rpcs.partition_read.timeout = 30.0
|
172
172
|
default_config.rpcs.partition_read.retry_policy = {
|
173
173
|
initial_delay: 0.25,
|
174
|
-
|
175
|
-
|
176
|
-
|
174
|
+
max_delay: 32.0,
|
175
|
+
multiplier: 1.3,
|
176
|
+
retry_codes: [14]
|
177
177
|
}
|
178
178
|
|
179
179
|
default_config
|
@@ -237,7 +237,13 @@ module Google
|
|
237
237
|
|
238
238
|
# Create credentials
|
239
239
|
credentials = @config.credentials
|
240
|
-
|
240
|
+
# Use self-signed JWT if the scope and endpoint are unchanged from default,
|
241
|
+
# 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 &&
|
244
|
+
!@config.endpoint.split(".").first.include?("-")
|
245
|
+
credentials ||= Credentials.default scope: @config.scope,
|
246
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
241
247
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
242
248
|
credentials = Credentials.new credentials, scope: @config.scope
|
243
249
|
end
|
@@ -686,8 +692,9 @@ module Google
|
|
686
692
|
# Parameter names and values that bind to placeholders in the SQL string.
|
687
693
|
#
|
688
694
|
# A parameter placeholder consists of the `@` character followed by the
|
689
|
-
# parameter name (for example, `@firstName`). Parameter names
|
690
|
-
#
|
695
|
+
# parameter name (for example, `@firstName`). Parameter names must conform
|
696
|
+
# to the naming requirements of identifiers as specified at
|
697
|
+
# https://cloud.google.com/spanner/docs/lexical#identifiers.
|
691
698
|
#
|
692
699
|
# Parameters can appear anywhere that a literal value is expected. The same
|
693
700
|
# parameter name can be used more than once, for example:
|
@@ -820,8 +827,9 @@ module Google
|
|
820
827
|
# Parameter names and values that bind to placeholders in the SQL string.
|
821
828
|
#
|
822
829
|
# A parameter placeholder consists of the `@` character followed by the
|
823
|
-
# parameter name (for example, `@firstName`). Parameter names
|
824
|
-
#
|
830
|
+
# parameter name (for example, `@firstName`). Parameter names must conform
|
831
|
+
# to the naming requirements of identifiers as specified at
|
832
|
+
# https://cloud.google.com/spanner/docs/lexical#identifiers.
|
825
833
|
#
|
826
834
|
# Parameters can appear anywhere that a literal value is expected. The same
|
827
835
|
# parameter name can be used more than once, for example:
|
@@ -1322,6 +1330,12 @@ module Google
|
|
1322
1330
|
# reasons. If `Commit` returns `ABORTED`, the caller should re-attempt
|
1323
1331
|
# the transaction from the beginning, re-using the same session.
|
1324
1332
|
#
|
1333
|
+
# On very rare occasions, `Commit` might return `UNKNOWN`. This can happen,
|
1334
|
+
# for example, if the client job experiences a 1+ hour networking failure.
|
1335
|
+
# At that point, Cloud Spanner has lost track of the transaction outcome and
|
1336
|
+
# we recommend that you perform another read from the database to see the
|
1337
|
+
# state of things as they are now.
|
1338
|
+
#
|
1325
1339
|
# @overload commit(request, options = nil)
|
1326
1340
|
# Pass arguments to `commit` via a request object, either of type
|
1327
1341
|
# {::Google::Cloud::Spanner::V1::CommitRequest} or an equivalent Hash.
|
@@ -1332,7 +1346,7 @@ module Google
|
|
1332
1346
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1333
1347
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1334
1348
|
#
|
1335
|
-
# @overload commit(session: nil, transaction_id: nil, single_use_transaction: nil, mutations: nil)
|
1349
|
+
# @overload commit(session: nil, transaction_id: nil, single_use_transaction: nil, mutations: nil, return_commit_stats: nil)
|
1336
1350
|
# Pass arguments to `commit` via keyword arguments. Note that at
|
1337
1351
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1338
1352
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1355,6 +1369,10 @@ module Google
|
|
1355
1369
|
# The mutations to be executed when this transaction commits. All
|
1356
1370
|
# mutations are applied atomically, in the order they appear in
|
1357
1371
|
# this list.
|
1372
|
+
# @param return_commit_stats [::Boolean]
|
1373
|
+
# If `true`, then statistics related to the transaction will be included in
|
1374
|
+
# the {::Google::Cloud::Spanner::V1::CommitResponse#commit_stats CommitResponse}. Default value is
|
1375
|
+
# `false`.
|
1358
1376
|
#
|
1359
1377
|
# @yield [response, operation] Access the result along with the RPC operation
|
1360
1378
|
# @yieldparam response [::Google::Cloud::Spanner::V1::CommitResponse]
|
@@ -1775,14 +1793,14 @@ module Google
|
|
1775
1793
|
|
1776
1794
|
config_attr :endpoint, "spanner.googleapis.com", ::String
|
1777
1795
|
config_attr :credentials, nil do |value|
|
1778
|
-
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1796
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1779
1797
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
1780
1798
|
allowed.any? { |klass| klass === value }
|
1781
1799
|
end
|
1782
1800
|
config_attr :scope, nil, ::String, ::Array, nil
|
1783
1801
|
config_attr :lib_name, nil, ::String, nil
|
1784
1802
|
config_attr :lib_version, nil, ::String, nil
|
1785
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
1803
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
1786
1804
|
config_attr :interceptors, nil, ::Array, nil
|
1787
1805
|
config_attr :timeout, nil, ::Numeric, nil
|
1788
1806
|
config_attr :metadata, nil, ::Hash, nil
|
@@ -1803,7 +1821,7 @@ module Google
|
|
1803
1821
|
def rpcs
|
1804
1822
|
@rpcs ||= begin
|
1805
1823
|
parent_rpcs = nil
|
1806
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config
|
1824
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1807
1825
|
Rpcs.new parent_rpcs
|
1808
1826
|
end
|
1809
1827
|
end
|
@@ -1815,7 +1833,7 @@ module Google
|
|
1815
1833
|
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1816
1834
|
# the following configuration fields:
|
1817
1835
|
#
|
1818
|
-
# * `timeout` (*type:* `Numeric`) - The call timeout in
|
1836
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1819
1837
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
1820
1838
|
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
1821
1839
|
# include the following keys:
|
@@ -1904,35 +1922,35 @@ module Google
|
|
1904
1922
|
|
1905
1923
|
# @private
|
1906
1924
|
def initialize parent_rpcs = nil
|
1907
|
-
create_session_config = parent_rpcs
|
1925
|
+
create_session_config = parent_rpcs.create_session if parent_rpcs.respond_to? :create_session
|
1908
1926
|
@create_session = ::Gapic::Config::Method.new create_session_config
|
1909
|
-
batch_create_sessions_config = parent_rpcs
|
1927
|
+
batch_create_sessions_config = parent_rpcs.batch_create_sessions if parent_rpcs.respond_to? :batch_create_sessions
|
1910
1928
|
@batch_create_sessions = ::Gapic::Config::Method.new batch_create_sessions_config
|
1911
|
-
get_session_config = parent_rpcs
|
1929
|
+
get_session_config = parent_rpcs.get_session if parent_rpcs.respond_to? :get_session
|
1912
1930
|
@get_session = ::Gapic::Config::Method.new get_session_config
|
1913
|
-
list_sessions_config = parent_rpcs
|
1931
|
+
list_sessions_config = parent_rpcs.list_sessions if parent_rpcs.respond_to? :list_sessions
|
1914
1932
|
@list_sessions = ::Gapic::Config::Method.new list_sessions_config
|
1915
|
-
delete_session_config = parent_rpcs
|
1933
|
+
delete_session_config = parent_rpcs.delete_session if parent_rpcs.respond_to? :delete_session
|
1916
1934
|
@delete_session = ::Gapic::Config::Method.new delete_session_config
|
1917
|
-
execute_sql_config = parent_rpcs
|
1935
|
+
execute_sql_config = parent_rpcs.execute_sql if parent_rpcs.respond_to? :execute_sql
|
1918
1936
|
@execute_sql = ::Gapic::Config::Method.new execute_sql_config
|
1919
|
-
execute_streaming_sql_config = parent_rpcs
|
1937
|
+
execute_streaming_sql_config = parent_rpcs.execute_streaming_sql if parent_rpcs.respond_to? :execute_streaming_sql
|
1920
1938
|
@execute_streaming_sql = ::Gapic::Config::Method.new execute_streaming_sql_config
|
1921
|
-
execute_batch_dml_config = parent_rpcs
|
1939
|
+
execute_batch_dml_config = parent_rpcs.execute_batch_dml if parent_rpcs.respond_to? :execute_batch_dml
|
1922
1940
|
@execute_batch_dml = ::Gapic::Config::Method.new execute_batch_dml_config
|
1923
|
-
read_config = parent_rpcs
|
1941
|
+
read_config = parent_rpcs.read if parent_rpcs.respond_to? :read
|
1924
1942
|
@read = ::Gapic::Config::Method.new read_config
|
1925
|
-
streaming_read_config = parent_rpcs
|
1943
|
+
streaming_read_config = parent_rpcs.streaming_read if parent_rpcs.respond_to? :streaming_read
|
1926
1944
|
@streaming_read = ::Gapic::Config::Method.new streaming_read_config
|
1927
|
-
begin_transaction_config = parent_rpcs
|
1945
|
+
begin_transaction_config = parent_rpcs.begin_transaction if parent_rpcs.respond_to? :begin_transaction
|
1928
1946
|
@begin_transaction = ::Gapic::Config::Method.new begin_transaction_config
|
1929
|
-
commit_config = parent_rpcs
|
1947
|
+
commit_config = parent_rpcs.commit if parent_rpcs.respond_to? :commit
|
1930
1948
|
@commit = ::Gapic::Config::Method.new commit_config
|
1931
|
-
rollback_config = parent_rpcs
|
1949
|
+
rollback_config = parent_rpcs.rollback if parent_rpcs.respond_to? :rollback
|
1932
1950
|
@rollback = ::Gapic::Config::Method.new rollback_config
|
1933
|
-
partition_query_config = parent_rpcs
|
1951
|
+
partition_query_config = parent_rpcs.partition_query if parent_rpcs.respond_to? :partition_query
|
1934
1952
|
@partition_query = ::Gapic::Config::Method.new partition_query_config
|
1935
|
-
partition_read_config = parent_rpcs
|
1953
|
+
partition_read_config = parent_rpcs.partition_read if parent_rpcs.respond_to? :partition_read
|
1936
1954
|
@partition_read = ::Gapic::Config::Method.new partition_read_config
|
1937
1955
|
|
1938
1956
|
yield self if block_given?
|
@@ -7,6 +7,7 @@ require 'google/api/annotations_pb'
|
|
7
7
|
require 'google/api/client_pb'
|
8
8
|
require 'google/api/field_behavior_pb'
|
9
9
|
require 'google/api/resource_pb'
|
10
|
+
require 'google/protobuf/duration_pb'
|
10
11
|
require 'google/protobuf/empty_pb'
|
11
12
|
require 'google/protobuf/struct_pb'
|
12
13
|
require 'google/protobuf/timestamp_pb'
|
@@ -66,6 +67,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
66
67
|
end
|
67
68
|
add_message "google.spanner.v1.ExecuteSqlRequest.QueryOptions" do
|
68
69
|
optional :optimizer_version, :string, 1
|
70
|
+
optional :optimizer_statistics_package, :string, 2
|
69
71
|
end
|
70
72
|
add_enum "google.spanner.v1.ExecuteSqlRequest.QueryMode" do
|
71
73
|
value :NORMAL, 0
|
@@ -133,6 +135,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
133
135
|
add_message "google.spanner.v1.CommitRequest" do
|
134
136
|
optional :session, :string, 1
|
135
137
|
repeated :mutations, :message, 4, "google.spanner.v1.Mutation"
|
138
|
+
optional :return_commit_stats, :bool, 5
|
136
139
|
oneof :transaction do
|
137
140
|
optional :transaction_id, :bytes, 2
|
138
141
|
optional :single_use_transaction, :message, 3, "google.spanner.v1.TransactionOptions"
|
@@ -140,6 +143,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
140
143
|
end
|
141
144
|
add_message "google.spanner.v1.CommitResponse" do
|
142
145
|
optional :commit_timestamp, :message, 1, "google.protobuf.Timestamp"
|
146
|
+
optional :commit_stats, :message, 2, "google.spanner.v1.CommitResponse.CommitStats"
|
147
|
+
end
|
148
|
+
add_message "google.spanner.v1.CommitResponse.CommitStats" do
|
149
|
+
optional :mutation_count, :int64, 1
|
143
150
|
end
|
144
151
|
add_message "google.spanner.v1.RollbackRequest" do
|
145
152
|
optional :session, :string, 1
|
@@ -175,6 +182,7 @@ module Google
|
|
175
182
|
BeginTransactionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.BeginTransactionRequest").msgclass
|
176
183
|
CommitRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitRequest").msgclass
|
177
184
|
CommitResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitResponse").msgclass
|
185
|
+
CommitResponse::CommitStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitResponse.CommitStats").msgclass
|
178
186
|
RollbackRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.RollbackRequest").msgclass
|
179
187
|
end
|
180
188
|
end
|
@@ -55,22 +55,22 @@ module Google
|
|
55
55
|
#
|
56
56
|
# Idle sessions can be kept alive by sending a trivial SQL query
|
57
57
|
# periodically, e.g., `"SELECT 1"`.
|
58
|
-
rpc :CreateSession, Google::Cloud::Spanner::V1::CreateSessionRequest, Google::Cloud::Spanner::V1::Session
|
58
|
+
rpc :CreateSession, ::Google::Cloud::Spanner::V1::CreateSessionRequest, ::Google::Cloud::Spanner::V1::Session
|
59
59
|
# Creates multiple new sessions.
|
60
60
|
#
|
61
61
|
# This API can be used to initialize a session cache on the clients.
|
62
62
|
# See https://goo.gl/TgSFN2 for best practices on session cache management.
|
63
|
-
rpc :BatchCreateSessions, Google::Cloud::Spanner::V1::BatchCreateSessionsRequest, Google::Cloud::Spanner::V1::BatchCreateSessionsResponse
|
63
|
+
rpc :BatchCreateSessions, ::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest, ::Google::Cloud::Spanner::V1::BatchCreateSessionsResponse
|
64
64
|
# Gets a session. Returns `NOT_FOUND` if the session does not exist.
|
65
65
|
# This is mainly useful for determining whether a session is still
|
66
66
|
# alive.
|
67
|
-
rpc :GetSession, Google::Cloud::Spanner::V1::GetSessionRequest, Google::Cloud::Spanner::V1::Session
|
67
|
+
rpc :GetSession, ::Google::Cloud::Spanner::V1::GetSessionRequest, ::Google::Cloud::Spanner::V1::Session
|
68
68
|
# Lists all sessions in a given database.
|
69
|
-
rpc :ListSessions, Google::Cloud::Spanner::V1::ListSessionsRequest, Google::Cloud::Spanner::V1::ListSessionsResponse
|
69
|
+
rpc :ListSessions, ::Google::Cloud::Spanner::V1::ListSessionsRequest, ::Google::Cloud::Spanner::V1::ListSessionsResponse
|
70
70
|
# Ends a session, releasing server resources associated with it. This will
|
71
71
|
# asynchronously trigger cancellation of any operations that are running with
|
72
72
|
# this session.
|
73
|
-
rpc :DeleteSession, Google::Cloud::Spanner::V1::DeleteSessionRequest, Google::Protobuf::Empty
|
73
|
+
rpc :DeleteSession, ::Google::Cloud::Spanner::V1::DeleteSessionRequest, ::Google::Protobuf::Empty
|
74
74
|
# Executes an SQL statement, returning all results in a single reply. This
|
75
75
|
# method cannot be used to return a result set larger than 10 MiB;
|
76
76
|
# if the query yields more data than that, the query fails with
|
@@ -82,13 +82,13 @@ module Google
|
|
82
82
|
#
|
83
83
|
# Larger result sets can be fetched in streaming fashion by calling
|
84
84
|
# [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] instead.
|
85
|
-
rpc :ExecuteSql, Google::Cloud::Spanner::V1::ExecuteSqlRequest, Google::Cloud::Spanner::V1::ResultSet
|
85
|
+
rpc :ExecuteSql, ::Google::Cloud::Spanner::V1::ExecuteSqlRequest, ::Google::Cloud::Spanner::V1::ResultSet
|
86
86
|
# Like [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], except returns the result
|
87
87
|
# set as a stream. Unlike [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], there
|
88
88
|
# is no limit on the size of the returned result set. However, no
|
89
89
|
# individual row in the result set can exceed 100 MiB, and no
|
90
90
|
# column value can exceed 10 MiB.
|
91
|
-
rpc :ExecuteStreamingSql, Google::Cloud::Spanner::V1::ExecuteSqlRequest, stream(Google::Cloud::Spanner::V1::PartialResultSet)
|
91
|
+
rpc :ExecuteStreamingSql, ::Google::Cloud::Spanner::V1::ExecuteSqlRequest, stream(::Google::Cloud::Spanner::V1::PartialResultSet)
|
92
92
|
# Executes a batch of SQL DML statements. This method allows many statements
|
93
93
|
# to be run with lower latency than submitting them sequentially with
|
94
94
|
# [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql].
|
@@ -100,7 +100,7 @@ module Google
|
|
100
100
|
#
|
101
101
|
# Execution stops after the first failed statement; the remaining statements
|
102
102
|
# are not executed.
|
103
|
-
rpc :ExecuteBatchDml, Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest, Google::Cloud::Spanner::V1::ExecuteBatchDmlResponse
|
103
|
+
rpc :ExecuteBatchDml, ::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest, ::Google::Cloud::Spanner::V1::ExecuteBatchDmlResponse
|
104
104
|
# Reads rows from the database using key lookups and scans, as a
|
105
105
|
# simple key/value style alternative to
|
106
106
|
# [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. This method cannot be used to
|
@@ -114,18 +114,18 @@ module Google
|
|
114
114
|
#
|
115
115
|
# Larger result sets can be yielded in streaming fashion by calling
|
116
116
|
# [StreamingRead][google.spanner.v1.Spanner.StreamingRead] instead.
|
117
|
-
rpc :Read, Google::Cloud::Spanner::V1::ReadRequest, Google::Cloud::Spanner::V1::ResultSet
|
117
|
+
rpc :Read, ::Google::Cloud::Spanner::V1::ReadRequest, ::Google::Cloud::Spanner::V1::ResultSet
|
118
118
|
# Like [Read][google.spanner.v1.Spanner.Read], except returns the result set as a
|
119
119
|
# stream. Unlike [Read][google.spanner.v1.Spanner.Read], there is no limit on the
|
120
120
|
# size of the returned result set. However, no individual row in
|
121
121
|
# the result set can exceed 100 MiB, and no column value can exceed
|
122
122
|
# 10 MiB.
|
123
|
-
rpc :StreamingRead, Google::Cloud::Spanner::V1::ReadRequest, stream(Google::Cloud::Spanner::V1::PartialResultSet)
|
123
|
+
rpc :StreamingRead, ::Google::Cloud::Spanner::V1::ReadRequest, stream(::Google::Cloud::Spanner::V1::PartialResultSet)
|
124
124
|
# Begins a new transaction. This step can often be skipped:
|
125
125
|
# [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and
|
126
126
|
# [Commit][google.spanner.v1.Spanner.Commit] can begin a new transaction as a
|
127
127
|
# side-effect.
|
128
|
-
rpc :BeginTransaction, Google::Cloud::Spanner::V1::BeginTransactionRequest, Google::Cloud::Spanner::V1::Transaction
|
128
|
+
rpc :BeginTransaction, ::Google::Cloud::Spanner::V1::BeginTransactionRequest, ::Google::Cloud::Spanner::V1::Transaction
|
129
129
|
# Commits a transaction. The request includes the mutations to be
|
130
130
|
# applied to rows in the database.
|
131
131
|
#
|
@@ -134,7 +134,13 @@ module Google
|
|
134
134
|
# transactions. However, it can also happen for a variety of other
|
135
135
|
# reasons. If `Commit` returns `ABORTED`, the caller should re-attempt
|
136
136
|
# the transaction from the beginning, re-using the same session.
|
137
|
-
|
137
|
+
#
|
138
|
+
# On very rare occasions, `Commit` might return `UNKNOWN`. This can happen,
|
139
|
+
# for example, if the client job experiences a 1+ hour networking failure.
|
140
|
+
# At that point, Cloud Spanner has lost track of the transaction outcome and
|
141
|
+
# we recommend that you perform another read from the database to see the
|
142
|
+
# state of things as they are now.
|
143
|
+
rpc :Commit, ::Google::Cloud::Spanner::V1::CommitRequest, ::Google::Cloud::Spanner::V1::CommitResponse
|
138
144
|
# Rolls back a transaction, releasing any locks it holds. It is a good
|
139
145
|
# idea to call this for any transaction that includes one or more
|
140
146
|
# [Read][google.spanner.v1.Spanner.Read] or [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] requests and
|
@@ -143,7 +149,7 @@ module Google
|
|
143
149
|
# `Rollback` returns `OK` if it successfully aborts the transaction, the
|
144
150
|
# transaction was already aborted, or the transaction is not
|
145
151
|
# found. `Rollback` never returns `ABORTED`.
|
146
|
-
rpc :Rollback, Google::Cloud::Spanner::V1::RollbackRequest, Google::Protobuf::Empty
|
152
|
+
rpc :Rollback, ::Google::Cloud::Spanner::V1::RollbackRequest, ::Google::Protobuf::Empty
|
147
153
|
# Creates a set of partition tokens that can be used to execute a query
|
148
154
|
# operation in parallel. Each of the returned partition tokens can be used
|
149
155
|
# by [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] to specify a subset
|
@@ -155,7 +161,7 @@ module Google
|
|
155
161
|
# is deleted, is idle for too long, begins a new transaction, or becomes too
|
156
162
|
# old. When any of these happen, it is not possible to resume the query, and
|
157
163
|
# the whole operation must be restarted from the beginning.
|
158
|
-
rpc :PartitionQuery, Google::Cloud::Spanner::V1::PartitionQueryRequest, Google::Cloud::Spanner::V1::PartitionResponse
|
164
|
+
rpc :PartitionQuery, ::Google::Cloud::Spanner::V1::PartitionQueryRequest, ::Google::Cloud::Spanner::V1::PartitionResponse
|
159
165
|
# Creates a set of partition tokens that can be used to execute a read
|
160
166
|
# operation in parallel. Each of the returned partition tokens can be used
|
161
167
|
# by [StreamingRead][google.spanner.v1.Spanner.StreamingRead] to specify a subset of the read
|
@@ -169,7 +175,7 @@ module Google
|
|
169
175
|
# is deleted, is idle for too long, begins a new transaction, or becomes too
|
170
176
|
# old. When any of these happen, it is not possible to resume the read, and
|
171
177
|
# the whole operation must be restarted from the beginning.
|
172
|
-
rpc :PartitionRead, Google::Cloud::Spanner::V1::PartitionReadRequest, Google::Cloud::Spanner::V1::PartitionResponse
|
178
|
+
rpc :PartitionRead, ::Google::Cloud::Spanner::V1::PartitionReadRequest, ::Google::Cloud::Spanner::V1::PartitionResponse
|
173
179
|
end
|
174
180
|
|
175
181
|
Stub = Service.rpc_stub_class
|