google-cloud-spanner-v1 0.4.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/LICENSE.md +188 -190
- data/README.md +3 -3
- data/lib/google/cloud/spanner/v1/spanner/client.rb +58 -79
- data/lib/google/cloud/spanner/v1/version.rb +1 -1
- data/lib/google/spanner/v1/commit_response_pb.rb +30 -0
- data/lib/google/spanner/v1/spanner_pb.rb +20 -10
- data/lib/google/spanner/v1/type_pb.rb +1 -0
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/spanner/v1/commit_response.rb +55 -0
- data/proto_docs/google/spanner/v1/spanner.rb +115 -34
- data/proto_docs/google/spanner/v1/transaction.rb +7 -7
- data/proto_docs/google/spanner/v1/type.rb +9 -0
- metadata +18 -10
@@ -63,117 +63,78 @@ 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
|
70
70
|
|
71
71
|
default_config.rpcs.create_session.timeout = 30.0
|
72
72
|
default_config.rpcs.create_session.retry_policy = {
|
73
|
-
initial_delay: 0.25,
|
74
|
-
max_delay: 32.0,
|
75
|
-
multiplier: 1.3,
|
76
|
-
retry_codes: [14]
|
73
|
+
initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
|
77
74
|
}
|
78
75
|
|
79
76
|
default_config.rpcs.batch_create_sessions.timeout = 60.0
|
80
77
|
default_config.rpcs.batch_create_sessions.retry_policy = {
|
81
|
-
initial_delay: 0.25,
|
82
|
-
max_delay: 32.0,
|
83
|
-
multiplier: 1.3,
|
84
|
-
retry_codes: [14]
|
78
|
+
initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
|
85
79
|
}
|
86
80
|
|
87
81
|
default_config.rpcs.get_session.timeout = 30.0
|
88
82
|
default_config.rpcs.get_session.retry_policy = {
|
89
|
-
initial_delay: 0.25,
|
90
|
-
max_delay: 32.0,
|
91
|
-
multiplier: 1.3,
|
92
|
-
retry_codes: [14]
|
83
|
+
initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
|
93
84
|
}
|
94
85
|
|
95
86
|
default_config.rpcs.list_sessions.timeout = 3600.0
|
96
87
|
default_config.rpcs.list_sessions.retry_policy = {
|
97
|
-
initial_delay: 0.25,
|
98
|
-
max_delay: 32.0,
|
99
|
-
multiplier: 1.3,
|
100
|
-
retry_codes: [14]
|
88
|
+
initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
|
101
89
|
}
|
102
90
|
|
103
91
|
default_config.rpcs.delete_session.timeout = 30.0
|
104
92
|
default_config.rpcs.delete_session.retry_policy = {
|
105
|
-
initial_delay: 0.25,
|
106
|
-
max_delay: 32.0,
|
107
|
-
multiplier: 1.3,
|
108
|
-
retry_codes: [14]
|
93
|
+
initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
|
109
94
|
}
|
110
95
|
|
111
96
|
default_config.rpcs.execute_sql.timeout = 30.0
|
112
97
|
default_config.rpcs.execute_sql.retry_policy = {
|
113
|
-
initial_delay: 0.25,
|
114
|
-
max_delay: 32.0,
|
115
|
-
multiplier: 1.3,
|
116
|
-
retry_codes: [14]
|
98
|
+
initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
|
117
99
|
}
|
118
100
|
|
119
101
|
default_config.rpcs.execute_streaming_sql.timeout = 3600.0
|
120
102
|
|
121
103
|
default_config.rpcs.execute_batch_dml.timeout = 30.0
|
122
104
|
default_config.rpcs.execute_batch_dml.retry_policy = {
|
123
|
-
initial_delay: 0.25,
|
124
|
-
max_delay: 32.0,
|
125
|
-
multiplier: 1.3,
|
126
|
-
retry_codes: [14]
|
105
|
+
initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
|
127
106
|
}
|
128
107
|
|
129
108
|
default_config.rpcs.read.timeout = 30.0
|
130
109
|
default_config.rpcs.read.retry_policy = {
|
131
|
-
initial_delay: 0.25,
|
132
|
-
max_delay: 32.0,
|
133
|
-
multiplier: 1.3,
|
134
|
-
retry_codes: [14]
|
110
|
+
initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
|
135
111
|
}
|
136
112
|
|
137
113
|
default_config.rpcs.streaming_read.timeout = 3600.0
|
138
114
|
|
139
115
|
default_config.rpcs.begin_transaction.timeout = 30.0
|
140
116
|
default_config.rpcs.begin_transaction.retry_policy = {
|
141
|
-
initial_delay: 0.25,
|
142
|
-
max_delay: 32.0,
|
143
|
-
multiplier: 1.3,
|
144
|
-
retry_codes: [14]
|
117
|
+
initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
|
145
118
|
}
|
146
119
|
|
147
120
|
default_config.rpcs.commit.timeout = 3600.0
|
148
121
|
default_config.rpcs.commit.retry_policy = {
|
149
|
-
initial_delay: 0.25,
|
150
|
-
max_delay: 32.0,
|
151
|
-
multiplier: 1.3,
|
152
|
-
retry_codes: [14]
|
122
|
+
initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
|
153
123
|
}
|
154
124
|
|
155
125
|
default_config.rpcs.rollback.timeout = 30.0
|
156
126
|
default_config.rpcs.rollback.retry_policy = {
|
157
|
-
initial_delay: 0.25,
|
158
|
-
max_delay: 32.0,
|
159
|
-
multiplier: 1.3,
|
160
|
-
retry_codes: [14]
|
127
|
+
initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
|
161
128
|
}
|
162
129
|
|
163
130
|
default_config.rpcs.partition_query.timeout = 30.0
|
164
131
|
default_config.rpcs.partition_query.retry_policy = {
|
165
|
-
initial_delay: 0.25,
|
166
|
-
max_delay: 32.0,
|
167
|
-
multiplier: 1.3,
|
168
|
-
retry_codes: [14]
|
132
|
+
initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
|
169
133
|
}
|
170
134
|
|
171
135
|
default_config.rpcs.partition_read.timeout = 30.0
|
172
136
|
default_config.rpcs.partition_read.retry_policy = {
|
173
|
-
initial_delay: 0.25,
|
174
|
-
max_delay: 32.0,
|
175
|
-
multiplier: 1.3,
|
176
|
-
retry_codes: [14]
|
137
|
+
initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
|
177
138
|
}
|
178
139
|
|
179
140
|
default_config
|
@@ -242,9 +203,9 @@ module Google
|
|
242
203
|
enable_self_signed_jwt = @config.scope == Client.configure.scope &&
|
243
204
|
@config.endpoint == Client.configure.endpoint &&
|
244
205
|
!@config.endpoint.split(".").first.include?("-")
|
245
|
-
credentials ||= Credentials.default scope:
|
206
|
+
credentials ||= Credentials.default scope: @config.scope,
|
246
207
|
enable_self_signed_jwt: enable_self_signed_jwt
|
247
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
208
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
248
209
|
credentials = Credentials.new credentials, scope: @config.scope
|
249
210
|
end
|
250
211
|
@quota_project_id = @config.quota_project
|
@@ -668,7 +629,7 @@ module Google
|
|
668
629
|
# @param options [::Gapic::CallOptions, ::Hash]
|
669
630
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
670
631
|
#
|
671
|
-
# @overload execute_sql(session: nil, transaction: nil, sql: nil, params: nil, param_types: nil, resume_token: nil, query_mode: nil, partition_token: nil, seqno: nil, query_options: nil)
|
632
|
+
# @overload execute_sql(session: nil, transaction: nil, sql: nil, params: nil, param_types: nil, resume_token: nil, query_mode: nil, partition_token: nil, seqno: nil, query_options: nil, request_options: nil)
|
672
633
|
# Pass arguments to `execute_sql` via keyword arguments. Note that at
|
673
634
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
674
635
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -740,6 +701,8 @@ module Google
|
|
740
701
|
# Required for DML statements. Ignored for queries.
|
741
702
|
# @param query_options [::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryOptions, ::Hash]
|
742
703
|
# Query optimizer configuration to use for the given query.
|
704
|
+
# @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash]
|
705
|
+
# Common options for this request.
|
743
706
|
#
|
744
707
|
# @yield [response, operation] Access the result along with the RPC operation
|
745
708
|
# @yieldparam response [::Google::Cloud::Spanner::V1::ResultSet]
|
@@ -803,7 +766,7 @@ module Google
|
|
803
766
|
# @param options [::Gapic::CallOptions, ::Hash]
|
804
767
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
805
768
|
#
|
806
|
-
# @overload execute_streaming_sql(session: nil, transaction: nil, sql: nil, params: nil, param_types: nil, resume_token: nil, query_mode: nil, partition_token: nil, seqno: nil, query_options: nil)
|
769
|
+
# @overload execute_streaming_sql(session: nil, transaction: nil, sql: nil, params: nil, param_types: nil, resume_token: nil, query_mode: nil, partition_token: nil, seqno: nil, query_options: nil, request_options: nil)
|
807
770
|
# Pass arguments to `execute_streaming_sql` via keyword arguments. Note that at
|
808
771
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
809
772
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -875,6 +838,8 @@ module Google
|
|
875
838
|
# Required for DML statements. Ignored for queries.
|
876
839
|
# @param query_options [::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryOptions, ::Hash]
|
877
840
|
# Query optimizer configuration to use for the given query.
|
841
|
+
# @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash]
|
842
|
+
# Common options for this request.
|
878
843
|
#
|
879
844
|
# @yield [response, operation] Access the result along with the RPC operation
|
880
845
|
# @yieldparam response [::Enumerable<::Google::Cloud::Spanner::V1::PartialResultSet>]
|
@@ -944,7 +909,7 @@ module Google
|
|
944
909
|
# @param options [::Gapic::CallOptions, ::Hash]
|
945
910
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
946
911
|
#
|
947
|
-
# @overload execute_batch_dml(session: nil, transaction: nil, statements: nil, seqno: nil)
|
912
|
+
# @overload execute_batch_dml(session: nil, transaction: nil, statements: nil, seqno: nil, request_options: nil)
|
948
913
|
# Pass arguments to `execute_batch_dml` via keyword arguments. Note that at
|
949
914
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
950
915
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -973,6 +938,8 @@ module Google
|
|
973
938
|
# transaction. If a request arrives for the first time with an out-of-order
|
974
939
|
# sequence number, the transaction may be aborted. Replays of previously
|
975
940
|
# handled requests will yield the same response as the first execution.
|
941
|
+
# @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash]
|
942
|
+
# Common options for this request.
|
976
943
|
#
|
977
944
|
# @yield [response, operation] Access the result along with the RPC operation
|
978
945
|
# @yieldparam response [::Google::Cloud::Spanner::V1::ExecuteBatchDmlResponse]
|
@@ -1044,7 +1011,7 @@ module Google
|
|
1044
1011
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1045
1012
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1046
1013
|
#
|
1047
|
-
# @overload read(session: nil, transaction: nil, table: nil, index: nil, columns: nil, key_set: nil, limit: nil, resume_token: nil, partition_token: nil)
|
1014
|
+
# @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)
|
1048
1015
|
# Pass arguments to `read` via keyword arguments. Note that at
|
1049
1016
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1050
1017
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1092,6 +1059,8 @@ module Google
|
|
1092
1059
|
# previously created using PartitionRead(). There must be an exact
|
1093
1060
|
# match for the values of fields common to this message and the
|
1094
1061
|
# PartitionReadRequest message used to create this partition_token.
|
1062
|
+
# @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash]
|
1063
|
+
# Common options for this request.
|
1095
1064
|
#
|
1096
1065
|
# @yield [response, operation] Access the result along with the RPC operation
|
1097
1066
|
# @yieldparam response [::Google::Cloud::Spanner::V1::ResultSet]
|
@@ -1155,7 +1124,7 @@ module Google
|
|
1155
1124
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1156
1125
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1157
1126
|
#
|
1158
|
-
# @overload streaming_read(session: nil, transaction: nil, table: nil, index: nil, columns: nil, key_set: nil, limit: nil, resume_token: nil, partition_token: nil)
|
1127
|
+
# @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)
|
1159
1128
|
# Pass arguments to `streaming_read` via keyword arguments. Note that at
|
1160
1129
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1161
1130
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1203,6 +1172,8 @@ module Google
|
|
1203
1172
|
# previously created using PartitionRead(). There must be an exact
|
1204
1173
|
# match for the values of fields common to this message and the
|
1205
1174
|
# PartitionReadRequest message used to create this partition_token.
|
1175
|
+
# @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash]
|
1176
|
+
# Common options for this request.
|
1206
1177
|
#
|
1207
1178
|
# @yield [response, operation] Access the result along with the RPC operation
|
1208
1179
|
# @yieldparam response [::Enumerable<::Google::Cloud::Spanner::V1::PartialResultSet>]
|
@@ -1265,7 +1236,7 @@ module Google
|
|
1265
1236
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1266
1237
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1267
1238
|
#
|
1268
|
-
# @overload begin_transaction(session: nil, options: nil)
|
1239
|
+
# @overload begin_transaction(session: nil, options: nil, request_options: nil)
|
1269
1240
|
# Pass arguments to `begin_transaction` via keyword arguments. Note that at
|
1270
1241
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1271
1242
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1274,6 +1245,12 @@ module Google
|
|
1274
1245
|
# Required. The session in which the transaction runs.
|
1275
1246
|
# @param options [::Google::Cloud::Spanner::V1::TransactionOptions, ::Hash]
|
1276
1247
|
# Required. Options for the new transaction.
|
1248
|
+
# @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash]
|
1249
|
+
# Common options for this request.
|
1250
|
+
# Priority is ignored for this request. Setting the priority in this
|
1251
|
+
# request_options struct will not do anything. To set the priority for a
|
1252
|
+
# transaction, set it on the reads and writes that are part of this
|
1253
|
+
# transaction instead.
|
1277
1254
|
#
|
1278
1255
|
# @yield [response, operation] Access the result along with the RPC operation
|
1279
1256
|
# @yieldparam response [::Google::Cloud::Spanner::V1::Transaction]
|
@@ -1346,7 +1323,7 @@ module Google
|
|
1346
1323
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1347
1324
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1348
1325
|
#
|
1349
|
-
# @overload commit(session: nil, transaction_id: nil, single_use_transaction: nil, mutations: nil, return_commit_stats: nil)
|
1326
|
+
# @overload commit(session: nil, transaction_id: nil, single_use_transaction: nil, mutations: nil, return_commit_stats: nil, request_options: nil)
|
1350
1327
|
# Pass arguments to `commit` via keyword arguments. Note that at
|
1351
1328
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1352
1329
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1373,6 +1350,8 @@ module Google
|
|
1373
1350
|
# If `true`, then statistics related to the transaction will be included in
|
1374
1351
|
# the {::Google::Cloud::Spanner::V1::CommitResponse#commit_stats CommitResponse}. Default value is
|
1375
1352
|
# `false`.
|
1353
|
+
# @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash]
|
1354
|
+
# Common options for this request.
|
1376
1355
|
#
|
1377
1356
|
# @yield [response, operation] Access the result along with the RPC operation
|
1378
1357
|
# @yieldparam response [::Google::Cloud::Spanner::V1::CommitResponse]
|
@@ -1800,7 +1779,7 @@ module Google
|
|
1800
1779
|
config_attr :scope, nil, ::String, ::Array, nil
|
1801
1780
|
config_attr :lib_name, nil, ::String, nil
|
1802
1781
|
config_attr :lib_version, nil, ::String, nil
|
1803
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
1782
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
1804
1783
|
config_attr :interceptors, nil, ::Array, nil
|
1805
1784
|
config_attr :timeout, nil, ::Numeric, nil
|
1806
1785
|
config_attr :metadata, nil, ::Hash, nil
|
@@ -1821,7 +1800,7 @@ module Google
|
|
1821
1800
|
def rpcs
|
1822
1801
|
@rpcs ||= begin
|
1823
1802
|
parent_rpcs = nil
|
1824
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config
|
1803
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1825
1804
|
Rpcs.new parent_rpcs
|
1826
1805
|
end
|
1827
1806
|
end
|
@@ -1922,35 +1901,35 @@ module Google
|
|
1922
1901
|
|
1923
1902
|
# @private
|
1924
1903
|
def initialize parent_rpcs = nil
|
1925
|
-
create_session_config = parent_rpcs
|
1904
|
+
create_session_config = parent_rpcs.create_session if parent_rpcs.respond_to? :create_session
|
1926
1905
|
@create_session = ::Gapic::Config::Method.new create_session_config
|
1927
|
-
batch_create_sessions_config = parent_rpcs
|
1906
|
+
batch_create_sessions_config = parent_rpcs.batch_create_sessions if parent_rpcs.respond_to? :batch_create_sessions
|
1928
1907
|
@batch_create_sessions = ::Gapic::Config::Method.new batch_create_sessions_config
|
1929
|
-
get_session_config = parent_rpcs
|
1908
|
+
get_session_config = parent_rpcs.get_session if parent_rpcs.respond_to? :get_session
|
1930
1909
|
@get_session = ::Gapic::Config::Method.new get_session_config
|
1931
|
-
list_sessions_config = parent_rpcs
|
1910
|
+
list_sessions_config = parent_rpcs.list_sessions if parent_rpcs.respond_to? :list_sessions
|
1932
1911
|
@list_sessions = ::Gapic::Config::Method.new list_sessions_config
|
1933
|
-
delete_session_config = parent_rpcs
|
1912
|
+
delete_session_config = parent_rpcs.delete_session if parent_rpcs.respond_to? :delete_session
|
1934
1913
|
@delete_session = ::Gapic::Config::Method.new delete_session_config
|
1935
|
-
execute_sql_config = parent_rpcs
|
1914
|
+
execute_sql_config = parent_rpcs.execute_sql if parent_rpcs.respond_to? :execute_sql
|
1936
1915
|
@execute_sql = ::Gapic::Config::Method.new execute_sql_config
|
1937
|
-
execute_streaming_sql_config = parent_rpcs
|
1916
|
+
execute_streaming_sql_config = parent_rpcs.execute_streaming_sql if parent_rpcs.respond_to? :execute_streaming_sql
|
1938
1917
|
@execute_streaming_sql = ::Gapic::Config::Method.new execute_streaming_sql_config
|
1939
|
-
execute_batch_dml_config = parent_rpcs
|
1918
|
+
execute_batch_dml_config = parent_rpcs.execute_batch_dml if parent_rpcs.respond_to? :execute_batch_dml
|
1940
1919
|
@execute_batch_dml = ::Gapic::Config::Method.new execute_batch_dml_config
|
1941
|
-
read_config = parent_rpcs
|
1920
|
+
read_config = parent_rpcs.read if parent_rpcs.respond_to? :read
|
1942
1921
|
@read = ::Gapic::Config::Method.new read_config
|
1943
|
-
streaming_read_config = parent_rpcs
|
1922
|
+
streaming_read_config = parent_rpcs.streaming_read if parent_rpcs.respond_to? :streaming_read
|
1944
1923
|
@streaming_read = ::Gapic::Config::Method.new streaming_read_config
|
1945
|
-
begin_transaction_config = parent_rpcs
|
1924
|
+
begin_transaction_config = parent_rpcs.begin_transaction if parent_rpcs.respond_to? :begin_transaction
|
1946
1925
|
@begin_transaction = ::Gapic::Config::Method.new begin_transaction_config
|
1947
|
-
commit_config = parent_rpcs
|
1926
|
+
commit_config = parent_rpcs.commit if parent_rpcs.respond_to? :commit
|
1948
1927
|
@commit = ::Gapic::Config::Method.new commit_config
|
1949
|
-
rollback_config = parent_rpcs
|
1928
|
+
rollback_config = parent_rpcs.rollback if parent_rpcs.respond_to? :rollback
|
1950
1929
|
@rollback = ::Gapic::Config::Method.new rollback_config
|
1951
|
-
partition_query_config = parent_rpcs
|
1930
|
+
partition_query_config = parent_rpcs.partition_query if parent_rpcs.respond_to? :partition_query
|
1952
1931
|
@partition_query = ::Gapic::Config::Method.new partition_query_config
|
1953
|
-
partition_read_config = parent_rpcs
|
1932
|
+
partition_read_config = parent_rpcs.partition_read if parent_rpcs.respond_to? :partition_read
|
1954
1933
|
@partition_read = ::Gapic::Config::Method.new partition_read_config
|
1955
1934
|
|
1956
1935
|
yield self if block_given?
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/spanner/v1/commit_response.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/protobuf/duration_pb'
|
7
|
+
require 'google/protobuf/timestamp_pb'
|
8
|
+
require 'google/api/annotations_pb'
|
9
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
10
|
+
add_file("google/spanner/v1/commit_response.proto", :syntax => :proto3) do
|
11
|
+
add_message "google.spanner.v1.CommitResponse" do
|
12
|
+
optional :commit_timestamp, :message, 1, "google.protobuf.Timestamp"
|
13
|
+
optional :commit_stats, :message, 2, "google.spanner.v1.CommitResponse.CommitStats"
|
14
|
+
end
|
15
|
+
add_message "google.spanner.v1.CommitResponse.CommitStats" do
|
16
|
+
optional :mutation_count, :int64, 1
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Spanner
|
24
|
+
module V1
|
25
|
+
CommitResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitResponse").msgclass
|
26
|
+
CommitResponse::CommitStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitResponse.CommitStats").msgclass
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -3,11 +3,11 @@
|
|
3
3
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
|
+
require 'google/spanner/v1/commit_response_pb'
|
6
7
|
require 'google/api/annotations_pb'
|
7
8
|
require 'google/api/client_pb'
|
8
9
|
require 'google/api/field_behavior_pb'
|
9
10
|
require 'google/api/resource_pb'
|
10
|
-
require 'google/protobuf/duration_pb'
|
11
11
|
require 'google/protobuf/empty_pb'
|
12
12
|
require 'google/protobuf/struct_pb'
|
13
13
|
require 'google/protobuf/timestamp_pb'
|
@@ -53,6 +53,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
53
53
|
add_message "google.spanner.v1.DeleteSessionRequest" do
|
54
54
|
optional :name, :string, 1
|
55
55
|
end
|
56
|
+
add_message "google.spanner.v1.RequestOptions" do
|
57
|
+
optional :priority, :enum, 1, "google.spanner.v1.RequestOptions.Priority"
|
58
|
+
optional :request_tag, :string, 2
|
59
|
+
optional :transaction_tag, :string, 3
|
60
|
+
end
|
61
|
+
add_enum "google.spanner.v1.RequestOptions.Priority" do
|
62
|
+
value :PRIORITY_UNSPECIFIED, 0
|
63
|
+
value :PRIORITY_LOW, 1
|
64
|
+
value :PRIORITY_MEDIUM, 2
|
65
|
+
value :PRIORITY_HIGH, 3
|
66
|
+
end
|
56
67
|
add_message "google.spanner.v1.ExecuteSqlRequest" do
|
57
68
|
optional :session, :string, 1
|
58
69
|
optional :transaction, :message, 2, "google.spanner.v1.TransactionSelector"
|
@@ -64,9 +75,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
64
75
|
optional :partition_token, :bytes, 8
|
65
76
|
optional :seqno, :int64, 9
|
66
77
|
optional :query_options, :message, 10, "google.spanner.v1.ExecuteSqlRequest.QueryOptions"
|
78
|
+
optional :request_options, :message, 11, "google.spanner.v1.RequestOptions"
|
67
79
|
end
|
68
80
|
add_message "google.spanner.v1.ExecuteSqlRequest.QueryOptions" do
|
69
81
|
optional :optimizer_version, :string, 1
|
82
|
+
optional :optimizer_statistics_package, :string, 2
|
70
83
|
end
|
71
84
|
add_enum "google.spanner.v1.ExecuteSqlRequest.QueryMode" do
|
72
85
|
value :NORMAL, 0
|
@@ -78,6 +91,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
78
91
|
optional :transaction, :message, 2, "google.spanner.v1.TransactionSelector"
|
79
92
|
repeated :statements, :message, 3, "google.spanner.v1.ExecuteBatchDmlRequest.Statement"
|
80
93
|
optional :seqno, :int64, 4
|
94
|
+
optional :request_options, :message, 5, "google.spanner.v1.RequestOptions"
|
81
95
|
end
|
82
96
|
add_message "google.spanner.v1.ExecuteBatchDmlRequest.Statement" do
|
83
97
|
optional :sql, :string, 1
|
@@ -126,27 +140,23 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
126
140
|
optional :limit, :int64, 8
|
127
141
|
optional :resume_token, :bytes, 9
|
128
142
|
optional :partition_token, :bytes, 10
|
143
|
+
optional :request_options, :message, 11, "google.spanner.v1.RequestOptions"
|
129
144
|
end
|
130
145
|
add_message "google.spanner.v1.BeginTransactionRequest" do
|
131
146
|
optional :session, :string, 1
|
132
147
|
optional :options, :message, 2, "google.spanner.v1.TransactionOptions"
|
148
|
+
optional :request_options, :message, 3, "google.spanner.v1.RequestOptions"
|
133
149
|
end
|
134
150
|
add_message "google.spanner.v1.CommitRequest" do
|
135
151
|
optional :session, :string, 1
|
136
152
|
repeated :mutations, :message, 4, "google.spanner.v1.Mutation"
|
137
153
|
optional :return_commit_stats, :bool, 5
|
154
|
+
optional :request_options, :message, 6, "google.spanner.v1.RequestOptions"
|
138
155
|
oneof :transaction do
|
139
156
|
optional :transaction_id, :bytes, 2
|
140
157
|
optional :single_use_transaction, :message, 3, "google.spanner.v1.TransactionOptions"
|
141
158
|
end
|
142
159
|
end
|
143
|
-
add_message "google.spanner.v1.CommitResponse" do
|
144
|
-
optional :commit_timestamp, :message, 1, "google.protobuf.Timestamp"
|
145
|
-
optional :commit_stats, :message, 2, "google.spanner.v1.CommitResponse.CommitStats"
|
146
|
-
end
|
147
|
-
add_message "google.spanner.v1.CommitResponse.CommitStats" do
|
148
|
-
optional :mutation_count, :int64, 1
|
149
|
-
end
|
150
160
|
add_message "google.spanner.v1.RollbackRequest" do
|
151
161
|
optional :session, :string, 1
|
152
162
|
optional :transaction_id, :bytes, 2
|
@@ -166,6 +176,8 @@ module Google
|
|
166
176
|
ListSessionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ListSessionsRequest").msgclass
|
167
177
|
ListSessionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ListSessionsResponse").msgclass
|
168
178
|
DeleteSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.DeleteSessionRequest").msgclass
|
179
|
+
RequestOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.RequestOptions").msgclass
|
180
|
+
RequestOptions::Priority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.RequestOptions.Priority").enummodule
|
169
181
|
ExecuteSqlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ExecuteSqlRequest").msgclass
|
170
182
|
ExecuteSqlRequest::QueryOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ExecuteSqlRequest.QueryOptions").msgclass
|
171
183
|
ExecuteSqlRequest::QueryMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ExecuteSqlRequest.QueryMode").enummodule
|
@@ -180,8 +192,6 @@ module Google
|
|
180
192
|
ReadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ReadRequest").msgclass
|
181
193
|
BeginTransactionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.BeginTransactionRequest").msgclass
|
182
194
|
CommitRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitRequest").msgclass
|
183
|
-
CommitResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitResponse").msgclass
|
184
|
-
CommitResponse::CommitStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitResponse.CommitStats").msgclass
|
185
195
|
RollbackRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.RollbackRequest").msgclass
|
186
196
|
end
|
187
197
|
end
|