google-cloud-spanner-v1 0.17.0 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/spanner/v1/spanner/client.rb +163 -115
- data/lib/google/cloud/spanner/v1/version.rb +1 -1
- data/lib/google/spanner/v1/spanner_pb.rb +7 -2
- data/lib/google/spanner/v1/spanner_services_pb.rb +37 -29
- data/lib/google/spanner/v1/type_pb.rb +1 -1
- data/proto_docs/google/spanner/v1/spanner.rb +206 -78
- data/proto_docs/google/spanner/v1/type.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3837e3b0b26efec345572794a82e2afb794bf1d2e2876bc28d2d184051e1f8fc
|
4
|
+
data.tar.gz: 842aaeece4ed25d1be3563fc1b2376af135ac8400b75546ccbaccd0e03b6e4dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e525ae7fe6aac14b8afc2becda27db06cf47f9c5acdda36700537d7277569246754ff655a4525bea7b237115e0032bcacbb0b7300b47230ed1c039a8cb184b5
|
7
|
+
data.tar.gz: 7cc979dc542be56af882a37e4ff7200d88170c16b360de1cddb504ca4768354ceefcc30d61b6981fea296a796e74e82ef2701750978d840331b82eaa3096a759
|
@@ -354,7 +354,8 @@ module Google
|
|
354
354
|
# The API may return fewer than the requested number of sessions. If a
|
355
355
|
# specific number of sessions are desired, the client can make additional
|
356
356
|
# calls to BatchCreateSessions (adjusting
|
357
|
-
# {::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest#session_count session_count}
|
357
|
+
# {::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest#session_count session_count}
|
358
|
+
# as necessary).
|
358
359
|
#
|
359
360
|
# @yield [response, operation] Access the result along with the RPC operation
|
360
361
|
# @yieldparam response [::Google::Cloud::Spanner::V1::BatchCreateSessionsResponse]
|
@@ -532,7 +533,8 @@ module Google
|
|
532
533
|
# to the server's maximum allowed page size.
|
533
534
|
# @param page_token [::String]
|
534
535
|
# If non-empty, `page_token` should contain a
|
535
|
-
# {::Google::Cloud::Spanner::V1::ListSessionsResponse#next_page_token next_page_token}
|
536
|
+
# {::Google::Cloud::Spanner::V1::ListSessionsResponse#next_page_token next_page_token}
|
537
|
+
# from a previous
|
536
538
|
# {::Google::Cloud::Spanner::V1::ListSessionsResponse ListSessionsResponse}.
|
537
539
|
# @param filter [::String]
|
538
540
|
# An expression for filtering the results of the request. Filter rules are
|
@@ -710,10 +712,12 @@ module Google
|
|
710
712
|
#
|
711
713
|
# Operations inside read-write transactions might return `ABORTED`. If
|
712
714
|
# this occurs, the application should restart the transaction from
|
713
|
-
# the beginning. See {::Google::Cloud::Spanner::V1::Transaction Transaction} for more
|
715
|
+
# the beginning. See {::Google::Cloud::Spanner::V1::Transaction Transaction} for more
|
716
|
+
# details.
|
714
717
|
#
|
715
718
|
# Larger result sets can be fetched in streaming fashion by calling
|
716
|
-
# {::Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql ExecuteStreamingSql}
|
719
|
+
# {::Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql ExecuteStreamingSql}
|
720
|
+
# instead.
|
717
721
|
#
|
718
722
|
# @overload execute_sql(request, options = nil)
|
719
723
|
# Pass arguments to `execute_sql` via a request object, either of type
|
@@ -725,7 +729,7 @@ module Google
|
|
725
729
|
# @param options [::Gapic::CallOptions, ::Hash]
|
726
730
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
727
731
|
#
|
728
|
-
# @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, data_boost_enabled: nil)
|
732
|
+
# @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, directed_read_options: nil, data_boost_enabled: nil)
|
729
733
|
# Pass arguments to `execute_sql` via keyword arguments. Note that at
|
730
734
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
731
735
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -762,7 +766,8 @@ module Google
|
|
762
766
|
# @param param_types [::Hash{::String => ::Google::Cloud::Spanner::V1::Type, ::Hash}]
|
763
767
|
# It is not always possible for Cloud Spanner to infer the right SQL type
|
764
768
|
# from a JSON value. For example, values of type `BYTES` and values
|
765
|
-
# of type `STRING` both appear in
|
769
|
+
# of type `STRING` both appear in
|
770
|
+
# {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#params params} as JSON strings.
|
766
771
|
#
|
767
772
|
# In these cases, `param_types` can be used to specify the exact
|
768
773
|
# SQL type for some or all of the SQL statement parameters. See the
|
@@ -771,14 +776,17 @@ module Google
|
|
771
776
|
# @param resume_token [::String]
|
772
777
|
# If this request is resuming a previously interrupted SQL statement
|
773
778
|
# execution, `resume_token` should be copied from the last
|
774
|
-
# {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the
|
775
|
-
# enables the new SQL statement execution to resume
|
776
|
-
# off. The rest of the request parameters must
|
777
|
-
# request that yielded this token.
|
779
|
+
# {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the
|
780
|
+
# interruption. Doing this enables the new SQL statement execution to resume
|
781
|
+
# where the last one left off. The rest of the request parameters must
|
782
|
+
# exactly match the request that yielded this token.
|
778
783
|
# @param query_mode [::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode]
|
779
784
|
# Used to control the amount of debugging information returned in
|
780
|
-
# {::Google::Cloud::Spanner::V1::ResultSetStats ResultSetStats}. If
|
781
|
-
#
|
785
|
+
# {::Google::Cloud::Spanner::V1::ResultSetStats ResultSetStats}. If
|
786
|
+
# {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#partition_token partition_token} is
|
787
|
+
# set, {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode query_mode} can only
|
788
|
+
# be set to
|
789
|
+
# {::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode::NORMAL QueryMode.NORMAL}.
|
782
790
|
# @param partition_token [::String]
|
783
791
|
# If present, results will be restricted to the specified partition
|
784
792
|
# previously created using PartitionQuery(). There must be an exact
|
@@ -799,12 +807,14 @@ module Google
|
|
799
807
|
# Query optimizer configuration to use for the given query.
|
800
808
|
# @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash]
|
801
809
|
# Common options for this request.
|
810
|
+
# @param directed_read_options [::Google::Cloud::Spanner::V1::DirectedReadOptions, ::Hash]
|
811
|
+
# Directed read options for this request.
|
802
812
|
# @param data_boost_enabled [::Boolean]
|
803
813
|
# If this is for a partitioned query and this field is set to `true`, the
|
804
|
-
# request
|
814
|
+
# request is executed with Spanner Data Boost independent compute resources.
|
805
815
|
#
|
806
816
|
# If the field is set to `true` but the request does not set
|
807
|
-
# `partition_token`, the API
|
817
|
+
# `partition_token`, the API returns an `INVALID_ARGUMENT` error.
|
808
818
|
#
|
809
819
|
# @yield [response, operation] Access the result along with the RPC operation
|
810
820
|
# @yieldparam response [::Google::Cloud::Spanner::V1::ResultSet]
|
@@ -871,11 +881,11 @@ module Google
|
|
871
881
|
end
|
872
882
|
|
873
883
|
##
|
874
|
-
# Like {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql}, except returns the
|
875
|
-
# set as a stream. Unlike
|
876
|
-
# is no limit on
|
877
|
-
#
|
878
|
-
# column value can exceed 10 MiB.
|
884
|
+
# Like {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql}, except returns the
|
885
|
+
# result set as a stream. Unlike
|
886
|
+
# {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql}, there is no limit on
|
887
|
+
# the size of the returned result set. However, no individual row in the
|
888
|
+
# result set can exceed 100 MiB, and no column value can exceed 10 MiB.
|
879
889
|
#
|
880
890
|
# @overload execute_streaming_sql(request, options = nil)
|
881
891
|
# Pass arguments to `execute_streaming_sql` via a request object, either of type
|
@@ -887,7 +897,7 @@ module Google
|
|
887
897
|
# @param options [::Gapic::CallOptions, ::Hash]
|
888
898
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
889
899
|
#
|
890
|
-
# @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, data_boost_enabled: nil)
|
900
|
+
# @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, directed_read_options: nil, data_boost_enabled: nil)
|
891
901
|
# Pass arguments to `execute_streaming_sql` via keyword arguments. Note that at
|
892
902
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
893
903
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -924,7 +934,8 @@ module Google
|
|
924
934
|
# @param param_types [::Hash{::String => ::Google::Cloud::Spanner::V1::Type, ::Hash}]
|
925
935
|
# It is not always possible for Cloud Spanner to infer the right SQL type
|
926
936
|
# from a JSON value. For example, values of type `BYTES` and values
|
927
|
-
# of type `STRING` both appear in
|
937
|
+
# of type `STRING` both appear in
|
938
|
+
# {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#params params} as JSON strings.
|
928
939
|
#
|
929
940
|
# In these cases, `param_types` can be used to specify the exact
|
930
941
|
# SQL type for some or all of the SQL statement parameters. See the
|
@@ -933,14 +944,17 @@ module Google
|
|
933
944
|
# @param resume_token [::String]
|
934
945
|
# If this request is resuming a previously interrupted SQL statement
|
935
946
|
# execution, `resume_token` should be copied from the last
|
936
|
-
# {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the
|
937
|
-
# enables the new SQL statement execution to resume
|
938
|
-
# off. The rest of the request parameters must
|
939
|
-
# request that yielded this token.
|
947
|
+
# {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the
|
948
|
+
# interruption. Doing this enables the new SQL statement execution to resume
|
949
|
+
# where the last one left off. The rest of the request parameters must
|
950
|
+
# exactly match the request that yielded this token.
|
940
951
|
# @param query_mode [::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode]
|
941
952
|
# Used to control the amount of debugging information returned in
|
942
|
-
# {::Google::Cloud::Spanner::V1::ResultSetStats ResultSetStats}. If
|
943
|
-
#
|
953
|
+
# {::Google::Cloud::Spanner::V1::ResultSetStats ResultSetStats}. If
|
954
|
+
# {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#partition_token partition_token} is
|
955
|
+
# set, {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode query_mode} can only
|
956
|
+
# be set to
|
957
|
+
# {::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode::NORMAL QueryMode.NORMAL}.
|
944
958
|
# @param partition_token [::String]
|
945
959
|
# If present, results will be restricted to the specified partition
|
946
960
|
# previously created using PartitionQuery(). There must be an exact
|
@@ -961,12 +975,14 @@ module Google
|
|
961
975
|
# Query optimizer configuration to use for the given query.
|
962
976
|
# @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash]
|
963
977
|
# Common options for this request.
|
978
|
+
# @param directed_read_options [::Google::Cloud::Spanner::V1::DirectedReadOptions, ::Hash]
|
979
|
+
# Directed read options for this request.
|
964
980
|
# @param data_boost_enabled [::Boolean]
|
965
981
|
# If this is for a partitioned query and this field is set to `true`, the
|
966
|
-
# request
|
982
|
+
# request is executed with Spanner Data Boost independent compute resources.
|
967
983
|
#
|
968
984
|
# If the field is set to `true` but the request does not set
|
969
|
-
# `partition_token`, the API
|
985
|
+
# `partition_token`, the API returns an `INVALID_ARGUMENT` error.
|
970
986
|
#
|
971
987
|
# @yield [response, operation] Access the result along with the RPC operation
|
972
988
|
# @yieldparam response [::Enumerable<::Google::Cloud::Spanner::V1::PartialResultSet>]
|
@@ -1041,9 +1057,10 @@ module Google
|
|
1041
1057
|
# {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql}.
|
1042
1058
|
#
|
1043
1059
|
# Statements are executed in sequential order. A request can succeed even if
|
1044
|
-
# a statement fails. The
|
1045
|
-
#
|
1046
|
-
#
|
1060
|
+
# a statement fails. The
|
1061
|
+
# {::Google::Cloud::Spanner::V1::ExecuteBatchDmlResponse#status ExecuteBatchDmlResponse.status}
|
1062
|
+
# field in the response provides information about the statement that failed.
|
1063
|
+
# Clients must inspect this field to determine whether an error occurred.
|
1047
1064
|
#
|
1048
1065
|
# Execution stops after the first failed statement; the remaining statements
|
1049
1066
|
# are not executed.
|
@@ -1072,16 +1089,16 @@ module Google
|
|
1072
1089
|
# caller must either supply an existing transaction ID or begin a new
|
1073
1090
|
# transaction.
|
1074
1091
|
# @param statements [::Array<::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest::Statement, ::Hash>]
|
1075
|
-
# Required. The list of statements to execute in this batch. Statements are
|
1076
|
-
# serially, such that the effects of statement `i` are visible to
|
1077
|
-
# `i+1`. Each statement must be a DML statement. Execution stops at
|
1078
|
-
# first failed statement; the remaining statements are not executed.
|
1092
|
+
# Required. The list of statements to execute in this batch. Statements are
|
1093
|
+
# executed serially, such that the effects of statement `i` are visible to
|
1094
|
+
# statement `i+1`. Each statement must be a DML statement. Execution stops at
|
1095
|
+
# the first failed statement; the remaining statements are not executed.
|
1079
1096
|
#
|
1080
1097
|
# Callers must provide at least one statement.
|
1081
1098
|
# @param seqno [::Integer]
|
1082
|
-
# Required. A per-transaction sequence number used to identify this request.
|
1083
|
-
# makes each request idempotent such that if the request is
|
1084
|
-
# times, at most one will succeed.
|
1099
|
+
# Required. A per-transaction sequence number used to identify this request.
|
1100
|
+
# This field makes each request idempotent such that if the request is
|
1101
|
+
# received multiple times, at most one will succeed.
|
1085
1102
|
#
|
1086
1103
|
# The sequence number must be monotonically increasing within the
|
1087
1104
|
# transaction. If a request arrives for the first time with an out-of-order
|
@@ -1157,14 +1174,15 @@ module Google
|
|
1157
1174
|
##
|
1158
1175
|
# Reads rows from the database using key lookups and scans, as a
|
1159
1176
|
# simple key/value style alternative to
|
1160
|
-
# {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql}. This method cannot be
|
1161
|
-
# return a result set larger than 10 MiB; if the read matches more
|
1177
|
+
# {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql}. This method cannot be
|
1178
|
+
# used to return a result set larger than 10 MiB; if the read matches more
|
1162
1179
|
# data than that, the read fails with a `FAILED_PRECONDITION`
|
1163
1180
|
# error.
|
1164
1181
|
#
|
1165
1182
|
# Reads inside read-write transactions might return `ABORTED`. If
|
1166
1183
|
# this occurs, the application should restart the transaction from
|
1167
|
-
# the beginning. See {::Google::Cloud::Spanner::V1::Transaction Transaction} for more
|
1184
|
+
# the beginning. See {::Google::Cloud::Spanner::V1::Transaction Transaction} for more
|
1185
|
+
# details.
|
1168
1186
|
#
|
1169
1187
|
# Larger result sets can be yielded in streaming fashion by calling
|
1170
1188
|
# {::Google::Cloud::Spanner::V1::Spanner::Client#streaming_read StreamingRead} instead.
|
@@ -1179,7 +1197,7 @@ module Google
|
|
1179
1197
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1180
1198
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1181
1199
|
#
|
1182
|
-
# @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, data_boost_enabled: nil)
|
1200
|
+
# @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)
|
1183
1201
|
# Pass arguments to `read` via keyword arguments. Note that at
|
1184
1202
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1185
1203
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1192,22 +1210,29 @@ module Google
|
|
1192
1210
|
# @param table [::String]
|
1193
1211
|
# Required. The name of the table in the database to be read.
|
1194
1212
|
# @param index [::String]
|
1195
|
-
# If non-empty, the name of an index on
|
1196
|
-
#
|
1197
|
-
#
|
1213
|
+
# If non-empty, the name of an index on
|
1214
|
+
# {::Google::Cloud::Spanner::V1::ReadRequest#table table}. This index is used instead of
|
1215
|
+
# the table primary key when interpreting
|
1216
|
+
# {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} and sorting result rows.
|
1217
|
+
# See {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} for further
|
1218
|
+
# information.
|
1198
1219
|
# @param columns [::Array<::String>]
|
1199
|
-
# Required. The columns of {::Google::Cloud::Spanner::V1::ReadRequest#table table} to be
|
1200
|
-
# this request.
|
1220
|
+
# Required. The columns of {::Google::Cloud::Spanner::V1::ReadRequest#table table} to be
|
1221
|
+
# returned for each row matching this request.
|
1201
1222
|
# @param key_set [::Google::Cloud::Spanner::V1::KeySet, ::Hash]
|
1202
1223
|
# Required. `key_set` identifies the rows to be yielded. `key_set` names the
|
1203
|
-
# primary keys of the rows in {::Google::Cloud::Spanner::V1::ReadRequest#table table} to
|
1204
|
-
#
|
1205
|
-
#
|
1206
|
-
#
|
1207
|
-
#
|
1208
|
-
#
|
1209
|
-
#
|
1210
|
-
# empty, rows
|
1224
|
+
# primary keys of the rows in {::Google::Cloud::Spanner::V1::ReadRequest#table table} to
|
1225
|
+
# be yielded, unless {::Google::Cloud::Spanner::V1::ReadRequest#index index} is present.
|
1226
|
+
# If {::Google::Cloud::Spanner::V1::ReadRequest#index index} is present, then
|
1227
|
+
# {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} instead names index keys
|
1228
|
+
# in {::Google::Cloud::Spanner::V1::ReadRequest#index index}.
|
1229
|
+
#
|
1230
|
+
# If the {::Google::Cloud::Spanner::V1::ReadRequest#partition_token partition_token}
|
1231
|
+
# field is empty, rows are yielded in table primary key order (if
|
1232
|
+
# {::Google::Cloud::Spanner::V1::ReadRequest#index index} is empty) or index key order
|
1233
|
+
# (if {::Google::Cloud::Spanner::V1::ReadRequest#index index} is non-empty). If the
|
1234
|
+
# {::Google::Cloud::Spanner::V1::ReadRequest#partition_token partition_token} field is
|
1235
|
+
# not empty, rows will be yielded in an unspecified order.
|
1211
1236
|
#
|
1212
1237
|
# It is not an error for the `key_set` to name rows that do not
|
1213
1238
|
# exist in the database. Read yields nothing for nonexistent rows.
|
@@ -1218,9 +1243,9 @@ module Google
|
|
1218
1243
|
# @param resume_token [::String]
|
1219
1244
|
# If this request is resuming a previously interrupted read,
|
1220
1245
|
# `resume_token` should be copied from the last
|
1221
|
-
# {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the
|
1222
|
-
# enables the new read to resume where the last read
|
1223
|
-
# rest of the request parameters must exactly match the request
|
1246
|
+
# {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the
|
1247
|
+
# interruption. Doing this enables the new read to resume where the last read
|
1248
|
+
# left off. The rest of the request parameters must exactly match the request
|
1224
1249
|
# that yielded this token.
|
1225
1250
|
# @param partition_token [::String]
|
1226
1251
|
# If present, results will be restricted to the specified partition
|
@@ -1229,12 +1254,14 @@ module Google
|
|
1229
1254
|
# PartitionReadRequest message used to create this partition_token.
|
1230
1255
|
# @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash]
|
1231
1256
|
# Common options for this request.
|
1257
|
+
# @param directed_read_options [::Google::Cloud::Spanner::V1::DirectedReadOptions, ::Hash]
|
1258
|
+
# Directed read options for this request.
|
1232
1259
|
# @param data_boost_enabled [::Boolean]
|
1233
1260
|
# If this is for a partitioned read and this field is set to `true`, the
|
1234
|
-
# request
|
1261
|
+
# request is executed with Spanner Data Boost independent compute resources.
|
1235
1262
|
#
|
1236
1263
|
# If the field is set to `true` but the request does not set
|
1237
|
-
# `partition_token`, the API
|
1264
|
+
# `partition_token`, the API returns an `INVALID_ARGUMENT` error.
|
1238
1265
|
#
|
1239
1266
|
# @yield [response, operation] Access the result along with the RPC operation
|
1240
1267
|
# @yieldparam response [::Google::Cloud::Spanner::V1::ResultSet]
|
@@ -1301,9 +1328,9 @@ module Google
|
|
1301
1328
|
end
|
1302
1329
|
|
1303
1330
|
##
|
1304
|
-
# Like {::Google::Cloud::Spanner::V1::Spanner::Client#read Read}, except returns the result set
|
1305
|
-
# stream. Unlike {::Google::Cloud::Spanner::V1::Spanner::Client#read Read}, there is no
|
1306
|
-
# size of the returned result set. However, no individual row in
|
1331
|
+
# Like {::Google::Cloud::Spanner::V1::Spanner::Client#read Read}, except returns the result set
|
1332
|
+
# as a stream. Unlike {::Google::Cloud::Spanner::V1::Spanner::Client#read Read}, there is no
|
1333
|
+
# limit on the size of the returned result set. However, no individual row in
|
1307
1334
|
# the result set can exceed 100 MiB, and no column value can exceed
|
1308
1335
|
# 10 MiB.
|
1309
1336
|
#
|
@@ -1317,7 +1344,7 @@ module Google
|
|
1317
1344
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1318
1345
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1319
1346
|
#
|
1320
|
-
# @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, data_boost_enabled: nil)
|
1347
|
+
# @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)
|
1321
1348
|
# Pass arguments to `streaming_read` via keyword arguments. Note that at
|
1322
1349
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1323
1350
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1330,22 +1357,29 @@ module Google
|
|
1330
1357
|
# @param table [::String]
|
1331
1358
|
# Required. The name of the table in the database to be read.
|
1332
1359
|
# @param index [::String]
|
1333
|
-
# If non-empty, the name of an index on
|
1334
|
-
#
|
1335
|
-
#
|
1360
|
+
# If non-empty, the name of an index on
|
1361
|
+
# {::Google::Cloud::Spanner::V1::ReadRequest#table table}. This index is used instead of
|
1362
|
+
# the table primary key when interpreting
|
1363
|
+
# {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} and sorting result rows.
|
1364
|
+
# See {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} for further
|
1365
|
+
# information.
|
1336
1366
|
# @param columns [::Array<::String>]
|
1337
|
-
# Required. The columns of {::Google::Cloud::Spanner::V1::ReadRequest#table table} to be
|
1338
|
-
# this request.
|
1367
|
+
# Required. The columns of {::Google::Cloud::Spanner::V1::ReadRequest#table table} to be
|
1368
|
+
# returned for each row matching this request.
|
1339
1369
|
# @param key_set [::Google::Cloud::Spanner::V1::KeySet, ::Hash]
|
1340
1370
|
# Required. `key_set` identifies the rows to be yielded. `key_set` names the
|
1341
|
-
# primary keys of the rows in {::Google::Cloud::Spanner::V1::ReadRequest#table table} to
|
1342
|
-
#
|
1343
|
-
#
|
1344
|
-
#
|
1345
|
-
#
|
1346
|
-
#
|
1347
|
-
#
|
1348
|
-
# empty, rows
|
1371
|
+
# primary keys of the rows in {::Google::Cloud::Spanner::V1::ReadRequest#table table} to
|
1372
|
+
# be yielded, unless {::Google::Cloud::Spanner::V1::ReadRequest#index index} is present.
|
1373
|
+
# If {::Google::Cloud::Spanner::V1::ReadRequest#index index} is present, then
|
1374
|
+
# {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} instead names index keys
|
1375
|
+
# in {::Google::Cloud::Spanner::V1::ReadRequest#index index}.
|
1376
|
+
#
|
1377
|
+
# If the {::Google::Cloud::Spanner::V1::ReadRequest#partition_token partition_token}
|
1378
|
+
# field is empty, rows are yielded in table primary key order (if
|
1379
|
+
# {::Google::Cloud::Spanner::V1::ReadRequest#index index} is empty) or index key order
|
1380
|
+
# (if {::Google::Cloud::Spanner::V1::ReadRequest#index index} is non-empty). If the
|
1381
|
+
# {::Google::Cloud::Spanner::V1::ReadRequest#partition_token partition_token} field is
|
1382
|
+
# not empty, rows will be yielded in an unspecified order.
|
1349
1383
|
#
|
1350
1384
|
# It is not an error for the `key_set` to name rows that do not
|
1351
1385
|
# exist in the database. Read yields nothing for nonexistent rows.
|
@@ -1356,9 +1390,9 @@ module Google
|
|
1356
1390
|
# @param resume_token [::String]
|
1357
1391
|
# If this request is resuming a previously interrupted read,
|
1358
1392
|
# `resume_token` should be copied from the last
|
1359
|
-
# {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the
|
1360
|
-
# enables the new read to resume where the last read
|
1361
|
-
# rest of the request parameters must exactly match the request
|
1393
|
+
# {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the
|
1394
|
+
# interruption. Doing this enables the new read to resume where the last read
|
1395
|
+
# left off. The rest of the request parameters must exactly match the request
|
1362
1396
|
# that yielded this token.
|
1363
1397
|
# @param partition_token [::String]
|
1364
1398
|
# If present, results will be restricted to the specified partition
|
@@ -1367,12 +1401,14 @@ module Google
|
|
1367
1401
|
# PartitionReadRequest message used to create this partition_token.
|
1368
1402
|
# @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash]
|
1369
1403
|
# Common options for this request.
|
1404
|
+
# @param directed_read_options [::Google::Cloud::Spanner::V1::DirectedReadOptions, ::Hash]
|
1405
|
+
# Directed read options for this request.
|
1370
1406
|
# @param data_boost_enabled [::Boolean]
|
1371
1407
|
# If this is for a partitioned read and this field is set to `true`, the
|
1372
|
-
# request
|
1408
|
+
# request is executed with Spanner Data Boost independent compute resources.
|
1373
1409
|
#
|
1374
1410
|
# If the field is set to `true` but the request does not set
|
1375
|
-
# `partition_token`, the API
|
1411
|
+
# `partition_token`, the API returns an `INVALID_ARGUMENT` error.
|
1376
1412
|
#
|
1377
1413
|
# @yield [response, operation] Access the result along with the RPC operation
|
1378
1414
|
# @yieldparam response [::Enumerable<::Google::Cloud::Spanner::V1::PartialResultSet>]
|
@@ -1443,7 +1479,8 @@ module Google
|
|
1443
1479
|
|
1444
1480
|
##
|
1445
1481
|
# Begins a new transaction. This step can often be skipped:
|
1446
|
-
# {::Google::Cloud::Spanner::V1::Spanner::Client#read Read},
|
1482
|
+
# {::Google::Cloud::Spanner::V1::Spanner::Client#read Read},
|
1483
|
+
# {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql} and
|
1447
1484
|
# {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} can begin a new transaction as a
|
1448
1485
|
# side-effect.
|
1449
1486
|
#
|
@@ -1588,8 +1625,8 @@ module Google
|
|
1588
1625
|
# this list.
|
1589
1626
|
# @param return_commit_stats [::Boolean]
|
1590
1627
|
# If `true`, then statistics related to the transaction will be included in
|
1591
|
-
# the {::Google::Cloud::Spanner::V1::CommitResponse#commit_stats CommitResponse}.
|
1592
|
-
# `false`.
|
1628
|
+
# the {::Google::Cloud::Spanner::V1::CommitResponse#commit_stats CommitResponse}.
|
1629
|
+
# Default value is `false`.
|
1593
1630
|
# @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash]
|
1594
1631
|
# Common options for this request.
|
1595
1632
|
#
|
@@ -1660,8 +1697,9 @@ module Google
|
|
1660
1697
|
##
|
1661
1698
|
# Rolls back a transaction, releasing any locks it holds. It is a good
|
1662
1699
|
# idea to call this for any transaction that includes one or more
|
1663
|
-
# {::Google::Cloud::Spanner::V1::Spanner::Client#read Read} or
|
1664
|
-
#
|
1700
|
+
# {::Google::Cloud::Spanner::V1::Spanner::Client#read Read} or
|
1701
|
+
# {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql} requests and ultimately
|
1702
|
+
# decides not to commit.
|
1665
1703
|
#
|
1666
1704
|
# `Rollback` returns `OK` if it successfully aborts the transaction, the
|
1667
1705
|
# transaction was already aborted, or the transaction is not
|
@@ -1754,10 +1792,11 @@ module Google
|
|
1754
1792
|
##
|
1755
1793
|
# Creates a set of partition tokens that can be used to execute a query
|
1756
1794
|
# operation in parallel. Each of the returned partition tokens can be used
|
1757
|
-
# by {::Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql ExecuteStreamingSql} to
|
1758
|
-
# of the query result to read. The same session and
|
1759
|
-
# must be used by the PartitionQueryRequest used to
|
1760
|
-
# partition tokens and the ExecuteSqlRequests that use the
|
1795
|
+
# by {::Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql ExecuteStreamingSql} to
|
1796
|
+
# specify a subset of the query result to read. The same session and
|
1797
|
+
# read-only transaction must be used by the PartitionQueryRequest used to
|
1798
|
+
# create the partition tokens and the ExecuteSqlRequests that use the
|
1799
|
+
# partition tokens.
|
1761
1800
|
#
|
1762
1801
|
# Partition tokens become invalid when the session used to create them
|
1763
1802
|
# is deleted, is idle for too long, begins a new transaction, or becomes too
|
@@ -1785,15 +1824,16 @@ module Google
|
|
1785
1824
|
# Read only snapshot transactions are supported, read/write and single use
|
1786
1825
|
# transactions are not.
|
1787
1826
|
# @param sql [::String]
|
1788
|
-
# Required. The query request to generate partitions for. The request will
|
1789
|
-
# the query is not root partitionable.
|
1790
|
-
# partitionable
|
1791
|
-
#
|
1792
|
-
#
|
1793
|
-
#
|
1794
|
-
#
|
1795
|
-
#
|
1796
|
-
# DELETE. Use
|
1827
|
+
# Required. The query request to generate partitions for. The request will
|
1828
|
+
# fail if the query is not root partitionable. For a query to be root
|
1829
|
+
# partitionable, it needs to satisfy a few conditions. For example, the first
|
1830
|
+
# operator in the query execution plan must be a distributed union operator.
|
1831
|
+
# For more information about other conditions, see [Read data in
|
1832
|
+
# parallel](https://cloud.google.com/spanner/docs/reads#read_data_in_parallel).
|
1833
|
+
#
|
1834
|
+
# The query request must not contain DML commands, such as INSERT, UPDATE, or
|
1835
|
+
# DELETE. Use
|
1836
|
+
# {::Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql ExecuteStreamingSql} with a
|
1797
1837
|
# PartitionedDml transaction for large, partition-friendly DML operations.
|
1798
1838
|
# @param params [::Google::Protobuf::Struct, ::Hash]
|
1799
1839
|
# Parameter names and values that bind to placeholders in the SQL string.
|
@@ -1811,7 +1851,8 @@ module Google
|
|
1811
1851
|
# @param param_types [::Hash{::String => ::Google::Cloud::Spanner::V1::Type, ::Hash}]
|
1812
1852
|
# It is not always possible for Cloud Spanner to infer the right SQL type
|
1813
1853
|
# from a JSON value. For example, values of type `BYTES` and values
|
1814
|
-
# of type `STRING` both appear in
|
1854
|
+
# of type `STRING` both appear in
|
1855
|
+
# {::Google::Cloud::Spanner::V1::PartitionQueryRequest#params params} as JSON strings.
|
1815
1856
|
#
|
1816
1857
|
# In these cases, `param_types` can be used to specify the exact
|
1817
1858
|
# SQL type for some or all of the SQL query parameters. See the
|
@@ -1887,12 +1928,13 @@ module Google
|
|
1887
1928
|
##
|
1888
1929
|
# Creates a set of partition tokens that can be used to execute a read
|
1889
1930
|
# operation in parallel. Each of the returned partition tokens can be used
|
1890
|
-
# by {::Google::Cloud::Spanner::V1::Spanner::Client#streaming_read StreamingRead} to specify a
|
1891
|
-
# result to read. The same session and read-only
|
1892
|
-
# the PartitionReadRequest used to create the
|
1893
|
-
# ReadRequests that use the partition tokens. There
|
1894
|
-
# guarantees on rows returned among the returned partition
|
1895
|
-
# within each individual StreamingRead call issued with a
|
1931
|
+
# by {::Google::Cloud::Spanner::V1::Spanner::Client#streaming_read StreamingRead} to specify a
|
1932
|
+
# subset of the read result to read. The same session and read-only
|
1933
|
+
# transaction must be used by the PartitionReadRequest used to create the
|
1934
|
+
# partition tokens and the ReadRequests that use the partition tokens. There
|
1935
|
+
# are no ordering guarantees on rows returned among the returned partition
|
1936
|
+
# tokens, or even within each individual StreamingRead call issued with a
|
1937
|
+
# partition_token.
|
1896
1938
|
#
|
1897
1939
|
# Partition tokens become invalid when the session used to create them
|
1898
1940
|
# is deleted, is idle for too long, begins a new transaction, or becomes too
|
@@ -1922,16 +1964,22 @@ module Google
|
|
1922
1964
|
# @param table [::String]
|
1923
1965
|
# Required. The name of the table in the database to be read.
|
1924
1966
|
# @param index [::String]
|
1925
|
-
# If non-empty, the name of an index on
|
1926
|
-
#
|
1927
|
-
#
|
1967
|
+
# If non-empty, the name of an index on
|
1968
|
+
# {::Google::Cloud::Spanner::V1::PartitionReadRequest#table table}. This index is used
|
1969
|
+
# instead of the table primary key when interpreting
|
1970
|
+
# {::Google::Cloud::Spanner::V1::PartitionReadRequest#key_set key_set} and sorting
|
1971
|
+
# result rows. See {::Google::Cloud::Spanner::V1::PartitionReadRequest#key_set key_set}
|
1972
|
+
# for further information.
|
1928
1973
|
# @param columns [::Array<::String>]
|
1929
|
-
# The columns of {::Google::Cloud::Spanner::V1::PartitionReadRequest#table table} to be
|
1930
|
-
# this request.
|
1974
|
+
# The columns of {::Google::Cloud::Spanner::V1::PartitionReadRequest#table table} to be
|
1975
|
+
# returned for each row matching this request.
|
1931
1976
|
# @param key_set [::Google::Cloud::Spanner::V1::KeySet, ::Hash]
|
1932
1977
|
# Required. `key_set` identifies the rows to be yielded. `key_set` names the
|
1933
|
-
# primary keys of the rows in
|
1934
|
-
#
|
1978
|
+
# primary keys of the rows in
|
1979
|
+
# {::Google::Cloud::Spanner::V1::PartitionReadRequest#table table} to be yielded, unless
|
1980
|
+
# {::Google::Cloud::Spanner::V1::PartitionReadRequest#index index} is present. If
|
1981
|
+
# {::Google::Cloud::Spanner::V1::PartitionReadRequest#index index} is present, then
|
1982
|
+
# {::Google::Cloud::Spanner::V1::PartitionReadRequest#key_set key_set} instead names
|
1935
1983
|
# index keys in {::Google::Cloud::Spanner::V1::PartitionReadRequest#index index}.
|
1936
1984
|
#
|
1937
1985
|
# It is not an error for the `key_set` to name rows that do not
|