google-cloud-spanner-v1 0.1.0 → 0.3.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.rb +3 -0
- data/lib/google/cloud/spanner/v1/spanner/client.rb +32 -20
- data/lib/google/cloud/spanner/v1/version.rb +1 -1
- data/lib/google/spanner/v1/spanner_pb.rb +7 -0
- data/lib/google/spanner/v1/spanner_services_pb.rb +21 -15
- data/lib/google/spanner/v1/type_pb.rb +2 -0
- data/proto_docs/google/api/resource.rb +50 -14
- data/proto_docs/google/spanner/v1/spanner.rb +35 -7
- data/proto_docs/google/spanner/v1/transaction.rb +5 -4
- data/proto_docs/google/spanner/v1/type.rb +12 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3dc249a88987a01cb292039eff91ea84e35fccdc84015c7c84cdcbd34858178c
|
4
|
+
data.tar.gz: 5d899e990abc7f2b9a87913116e9cdccc367f544e50aef6b9e9bc125226b34a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edcff63203e85d4d5d641ac7fb8dbc122d46ee661026054aa970bc9059fa41ccce7fccc277f8e257e19ed4cde8bf3fc23118915de6e5c21d708af634ffd9d236
|
7
|
+
data.tar.gz: ca00243b49bdb011daff75922cd1b150acca227e4f1dfe0686cffdfc19ddc6dda8b2702e424ef1c15d3269b20859a5278d42c00402c072610e2f29baf4b3b8ec
|
@@ -73,7 +73,7 @@ module Google
|
|
73
73
|
initial_delay: 0.25,
|
74
74
|
max_delay: 32.0,
|
75
75
|
multiplier: 1.3,
|
76
|
-
retry_codes: [
|
76
|
+
retry_codes: [14]
|
77
77
|
}
|
78
78
|
|
79
79
|
default_config.rpcs.batch_create_sessions.timeout = 60.0
|
@@ -81,7 +81,7 @@ module Google
|
|
81
81
|
initial_delay: 0.25,
|
82
82
|
max_delay: 32.0,
|
83
83
|
multiplier: 1.3,
|
84
|
-
retry_codes: [
|
84
|
+
retry_codes: [14]
|
85
85
|
}
|
86
86
|
|
87
87
|
default_config.rpcs.get_session.timeout = 30.0
|
@@ -89,7 +89,7 @@ module Google
|
|
89
89
|
initial_delay: 0.25,
|
90
90
|
max_delay: 32.0,
|
91
91
|
multiplier: 1.3,
|
92
|
-
retry_codes: [
|
92
|
+
retry_codes: [14]
|
93
93
|
}
|
94
94
|
|
95
95
|
default_config.rpcs.list_sessions.timeout = 3600.0
|
@@ -97,7 +97,7 @@ module Google
|
|
97
97
|
initial_delay: 0.25,
|
98
98
|
max_delay: 32.0,
|
99
99
|
multiplier: 1.3,
|
100
|
-
retry_codes: [
|
100
|
+
retry_codes: [14]
|
101
101
|
}
|
102
102
|
|
103
103
|
default_config.rpcs.delete_session.timeout = 30.0
|
@@ -105,7 +105,7 @@ module Google
|
|
105
105
|
initial_delay: 0.25,
|
106
106
|
max_delay: 32.0,
|
107
107
|
multiplier: 1.3,
|
108
|
-
retry_codes: [
|
108
|
+
retry_codes: [14]
|
109
109
|
}
|
110
110
|
|
111
111
|
default_config.rpcs.execute_sql.timeout = 30.0
|
@@ -113,7 +113,7 @@ module Google
|
|
113
113
|
initial_delay: 0.25,
|
114
114
|
max_delay: 32.0,
|
115
115
|
multiplier: 1.3,
|
116
|
-
retry_codes: [
|
116
|
+
retry_codes: [14]
|
117
117
|
}
|
118
118
|
|
119
119
|
default_config.rpcs.execute_streaming_sql.timeout = 3600.0
|
@@ -123,7 +123,7 @@ module Google
|
|
123
123
|
initial_delay: 0.25,
|
124
124
|
max_delay: 32.0,
|
125
125
|
multiplier: 1.3,
|
126
|
-
retry_codes: [
|
126
|
+
retry_codes: [14]
|
127
127
|
}
|
128
128
|
|
129
129
|
default_config.rpcs.read.timeout = 30.0
|
@@ -131,7 +131,7 @@ module Google
|
|
131
131
|
initial_delay: 0.25,
|
132
132
|
max_delay: 32.0,
|
133
133
|
multiplier: 1.3,
|
134
|
-
retry_codes: [
|
134
|
+
retry_codes: [14]
|
135
135
|
}
|
136
136
|
|
137
137
|
default_config.rpcs.streaming_read.timeout = 3600.0
|
@@ -141,7 +141,7 @@ module Google
|
|
141
141
|
initial_delay: 0.25,
|
142
142
|
max_delay: 32.0,
|
143
143
|
multiplier: 1.3,
|
144
|
-
retry_codes: [
|
144
|
+
retry_codes: [14]
|
145
145
|
}
|
146
146
|
|
147
147
|
default_config.rpcs.commit.timeout = 3600.0
|
@@ -149,7 +149,7 @@ module Google
|
|
149
149
|
initial_delay: 0.25,
|
150
150
|
max_delay: 32.0,
|
151
151
|
multiplier: 1.3,
|
152
|
-
retry_codes: [
|
152
|
+
retry_codes: [14]
|
153
153
|
}
|
154
154
|
|
155
155
|
default_config.rpcs.rollback.timeout = 30.0
|
@@ -157,7 +157,7 @@ module Google
|
|
157
157
|
initial_delay: 0.25,
|
158
158
|
max_delay: 32.0,
|
159
159
|
multiplier: 1.3,
|
160
|
-
retry_codes: [
|
160
|
+
retry_codes: [14]
|
161
161
|
}
|
162
162
|
|
163
163
|
default_config.rpcs.partition_query.timeout = 30.0
|
@@ -165,7 +165,7 @@ module Google
|
|
165
165
|
initial_delay: 0.25,
|
166
166
|
max_delay: 32.0,
|
167
167
|
multiplier: 1.3,
|
168
|
-
retry_codes: [
|
168
|
+
retry_codes: [14]
|
169
169
|
}
|
170
170
|
|
171
171
|
default_config.rpcs.partition_read.timeout = 30.0
|
@@ -173,7 +173,7 @@ module Google
|
|
173
173
|
initial_delay: 0.25,
|
174
174
|
max_delay: 32.0,
|
175
175
|
multiplier: 1.3,
|
176
|
-
retry_codes: [
|
176
|
+
retry_codes: [14]
|
177
177
|
}
|
178
178
|
|
179
179
|
default_config
|
@@ -686,8 +686,9 @@ module Google
|
|
686
686
|
# Parameter names and values that bind to placeholders in the SQL string.
|
687
687
|
#
|
688
688
|
# A parameter placeholder consists of the `@` character followed by the
|
689
|
-
# parameter name (for example, `@firstName`). Parameter names
|
690
|
-
#
|
689
|
+
# parameter name (for example, `@firstName`). Parameter names must conform
|
690
|
+
# to the naming requirements of identifiers as specified at
|
691
|
+
# https://cloud.google.com/spanner/docs/lexical#identifiers.
|
691
692
|
#
|
692
693
|
# Parameters can appear anywhere that a literal value is expected. The same
|
693
694
|
# parameter name can be used more than once, for example:
|
@@ -820,8 +821,9 @@ module Google
|
|
820
821
|
# Parameter names and values that bind to placeholders in the SQL string.
|
821
822
|
#
|
822
823
|
# A parameter placeholder consists of the `@` character followed by the
|
823
|
-
# parameter name (for example, `@firstName`). Parameter names
|
824
|
-
#
|
824
|
+
# parameter name (for example, `@firstName`). Parameter names must conform
|
825
|
+
# to the naming requirements of identifiers as specified at
|
826
|
+
# https://cloud.google.com/spanner/docs/lexical#identifiers.
|
825
827
|
#
|
826
828
|
# Parameters can appear anywhere that a literal value is expected. The same
|
827
829
|
# parameter name can be used more than once, for example:
|
@@ -1322,6 +1324,12 @@ module Google
|
|
1322
1324
|
# reasons. If `Commit` returns `ABORTED`, the caller should re-attempt
|
1323
1325
|
# the transaction from the beginning, re-using the same session.
|
1324
1326
|
#
|
1327
|
+
# On very rare occasions, `Commit` might return `UNKNOWN`. This can happen,
|
1328
|
+
# for example, if the client job experiences a 1+ hour networking failure.
|
1329
|
+
# At that point, Cloud Spanner has lost track of the transaction outcome and
|
1330
|
+
# we recommend that you perform another read from the database to see the
|
1331
|
+
# state of things as they are now.
|
1332
|
+
#
|
1325
1333
|
# @overload commit(request, options = nil)
|
1326
1334
|
# Pass arguments to `commit` via a request object, either of type
|
1327
1335
|
# {::Google::Cloud::Spanner::V1::CommitRequest} or an equivalent Hash.
|
@@ -1332,7 +1340,7 @@ module Google
|
|
1332
1340
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1333
1341
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1334
1342
|
#
|
1335
|
-
# @overload commit(session: nil, transaction_id: nil, single_use_transaction: nil, mutations: nil)
|
1343
|
+
# @overload commit(session: nil, transaction_id: nil, single_use_transaction: nil, mutations: nil, return_commit_stats: nil)
|
1336
1344
|
# Pass arguments to `commit` via keyword arguments. Note that at
|
1337
1345
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1338
1346
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1355,6 +1363,10 @@ module Google
|
|
1355
1363
|
# The mutations to be executed when this transaction commits. All
|
1356
1364
|
# mutations are applied atomically, in the order they appear in
|
1357
1365
|
# this list.
|
1366
|
+
# @param return_commit_stats [::Boolean]
|
1367
|
+
# If `true`, then statistics related to the transaction will be included in
|
1368
|
+
# the {::Google::Cloud::Spanner::V1::CommitResponse#commit_stats CommitResponse}. Default value is
|
1369
|
+
# `false`.
|
1358
1370
|
#
|
1359
1371
|
# @yield [response, operation] Access the result along with the RPC operation
|
1360
1372
|
# @yieldparam response [::Google::Cloud::Spanner::V1::CommitResponse]
|
@@ -1775,7 +1787,7 @@ module Google
|
|
1775
1787
|
|
1776
1788
|
config_attr :endpoint, "spanner.googleapis.com", ::String
|
1777
1789
|
config_attr :credentials, nil do |value|
|
1778
|
-
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1790
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1779
1791
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
1780
1792
|
allowed.any? { |klass| klass === value }
|
1781
1793
|
end
|
@@ -1815,7 +1827,7 @@ module Google
|
|
1815
1827
|
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1816
1828
|
# the following configuration fields:
|
1817
1829
|
#
|
1818
|
-
# * `timeout` (*type:* `Numeric`) - The call timeout in
|
1830
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1819
1831
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
1820
1832
|
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
1821
1833
|
# include the following keys:
|
@@ -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'
|
@@ -133,6 +134,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
133
134
|
add_message "google.spanner.v1.CommitRequest" do
|
134
135
|
optional :session, :string, 1
|
135
136
|
repeated :mutations, :message, 4, "google.spanner.v1.Mutation"
|
137
|
+
optional :return_commit_stats, :bool, 5
|
136
138
|
oneof :transaction do
|
137
139
|
optional :transaction_id, :bytes, 2
|
138
140
|
optional :single_use_transaction, :message, 3, "google.spanner.v1.TransactionOptions"
|
@@ -140,6 +142,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
140
142
|
end
|
141
143
|
add_message "google.spanner.v1.CommitResponse" do
|
142
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
|
143
149
|
end
|
144
150
|
add_message "google.spanner.v1.RollbackRequest" do
|
145
151
|
optional :session, :string, 1
|
@@ -175,6 +181,7 @@ module Google
|
|
175
181
|
BeginTransactionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.BeginTransactionRequest").msgclass
|
176
182
|
CommitRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitRequest").msgclass
|
177
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
|
178
185
|
RollbackRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.RollbackRequest").msgclass
|
179
186
|
end
|
180
187
|
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
|
@@ -3,6 +3,7 @@
|
|
3
3
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
|
+
require 'google/api/field_behavior_pb'
|
6
7
|
require 'google/api/annotations_pb'
|
7
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
9
|
add_file("google/spanner/v1/type.proto", :syntax => :proto3) do
|
@@ -29,6 +30,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
29
30
|
value :BYTES, 7
|
30
31
|
value :ARRAY, 8
|
31
32
|
value :STRUCT, 9
|
33
|
+
value :NUMERIC, 10
|
32
34
|
end
|
33
35
|
end
|
34
36
|
end
|
@@ -43,12 +43,12 @@ module Google
|
|
43
43
|
#
|
44
44
|
# The ResourceDescriptor Yaml config will look like:
|
45
45
|
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
46
|
+
# resources:
|
47
|
+
# - type: "pubsub.googleapis.com/Topic"
|
48
|
+
# name_descriptor:
|
49
|
+
# - pattern: "projects/{project}/topics/{topic}"
|
50
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
+
# parent_name_extractor: "projects/{project}"
|
52
52
|
#
|
53
53
|
# Sometimes, resources have multiple patterns, typically because they can
|
54
54
|
# live under multiple parents.
|
@@ -183,15 +183,24 @@ module Google
|
|
183
183
|
# }
|
184
184
|
# @!attribute [rw] plural
|
185
185
|
# @return [::String]
|
186
|
-
# The plural name used in the resource name, such as
|
187
|
-
# the name of 'projects/\\{project}'
|
188
|
-
#
|
186
|
+
# The plural name used in the resource name and permission names, such as
|
187
|
+
# 'projects' for the resource name of 'projects/\\{project}' and the permission
|
188
|
+
# name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
|
189
|
+
# concept of the `plural` field in k8s CRD spec
|
189
190
|
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
191
|
+
#
|
192
|
+
# Note: The plural form is required even for singleton resources. See
|
193
|
+
# https://aip.dev/156
|
190
194
|
# @!attribute [rw] singular
|
191
195
|
# @return [::String]
|
192
196
|
# The same concept of the `singular` field in k8s CRD spec
|
193
197
|
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
194
198
|
# Such as "project" for the `resourcemanager.googleapis.com/Project` type.
|
199
|
+
# @!attribute [rw] style
|
200
|
+
# @return [::Array<::Google::Api::ResourceDescriptor::Style>]
|
201
|
+
# Style flag(s) for this resource.
|
202
|
+
# These indicate that a resource is expected to conform to a given
|
203
|
+
# style. See the specific style flags for additional information.
|
195
204
|
class ResourceDescriptor
|
196
205
|
include ::Google::Protobuf::MessageExts
|
197
206
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -211,6 +220,22 @@ module Google
|
|
211
220
|
# that from being necessary once there are multiple patterns.)
|
212
221
|
FUTURE_MULTI_PATTERN = 2
|
213
222
|
end
|
223
|
+
|
224
|
+
# A flag representing a specific style that a resource claims to conform to.
|
225
|
+
module Style
|
226
|
+
# The unspecified value. Do not use.
|
227
|
+
STYLE_UNSPECIFIED = 0
|
228
|
+
|
229
|
+
# This resource is intended to be "declarative-friendly".
|
230
|
+
#
|
231
|
+
# Declarative-friendly resources must be more strictly consistent, and
|
232
|
+
# setting this to true communicates to tools that this resource should
|
233
|
+
# adhere to declarative-friendly expectations.
|
234
|
+
#
|
235
|
+
# Note: This is used by the API linter (linter.aip.dev) to enable
|
236
|
+
# additional checks.
|
237
|
+
DECLARATIVE_FRIENDLY = 1
|
238
|
+
end
|
214
239
|
end
|
215
240
|
|
216
241
|
# Defines a proto annotation that describes a string field that refers to
|
@@ -226,6 +251,17 @@ module Google
|
|
226
251
|
# type: "pubsub.googleapis.com/Topic"
|
227
252
|
# }];
|
228
253
|
# }
|
254
|
+
#
|
255
|
+
# Occasionally, a field may reference an arbitrary resource. In this case,
|
256
|
+
# APIs use the special value * in their resource reference.
|
257
|
+
#
|
258
|
+
# Example:
|
259
|
+
#
|
260
|
+
# message GetIamPolicyRequest {
|
261
|
+
# string resource = 2 [(google.api.resource_reference) = {
|
262
|
+
# type: "*"
|
263
|
+
# }];
|
264
|
+
# }
|
229
265
|
# @!attribute [rw] child_type
|
230
266
|
# @return [::String]
|
231
267
|
# The resource type of a child collection that the annotated field
|
@@ -234,11 +270,11 @@ module Google
|
|
234
270
|
#
|
235
271
|
# Example:
|
236
272
|
#
|
237
|
-
#
|
238
|
-
#
|
239
|
-
#
|
240
|
-
#
|
241
|
-
#
|
273
|
+
# message ListLogEntriesRequest {
|
274
|
+
# string parent = 1 [(google.api.resource_reference) = {
|
275
|
+
# child_type: "logging.googleapis.com/LogEntry"
|
276
|
+
# };
|
277
|
+
# }
|
242
278
|
class ResourceReference
|
243
279
|
include ::Google::Protobuf::MessageExts
|
244
280
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -62,10 +62,9 @@ module Google
|
|
62
62
|
end
|
63
63
|
|
64
64
|
# A session in the Cloud Spanner API.
|
65
|
-
# @!attribute [
|
65
|
+
# @!attribute [r] name
|
66
66
|
# @return [::String]
|
67
|
-
# The name of the session. This is always system-assigned
|
68
|
-
# when creating a session are ignored.
|
67
|
+
# Output only. The name of the session. This is always system-assigned.
|
69
68
|
# @!attribute [rw] labels
|
70
69
|
# @return [::Google::Protobuf::Map{::String => ::String}]
|
71
70
|
# The labels for the session.
|
@@ -77,10 +76,10 @@ module Google
|
|
77
76
|
# * No more than 64 labels can be associated with a given session.
|
78
77
|
#
|
79
78
|
# See https://goo.gl/xmQnxf for more information on and examples of labels.
|
80
|
-
# @!attribute [
|
79
|
+
# @!attribute [r] create_time
|
81
80
|
# @return [::Google::Protobuf::Timestamp]
|
82
81
|
# Output only. The timestamp when the session is created.
|
83
|
-
# @!attribute [
|
82
|
+
# @!attribute [r] approximate_last_use_time
|
84
83
|
# @return [::Google::Protobuf::Timestamp]
|
85
84
|
# Output only. The approximate timestamp when the session is last used. It is
|
86
85
|
# typically earlier than the actual last use time.
|
@@ -185,8 +184,9 @@ module Google
|
|
185
184
|
# Parameter names and values that bind to placeholders in the SQL string.
|
186
185
|
#
|
187
186
|
# A parameter placeholder consists of the `@` character followed by the
|
188
|
-
# parameter name (for example, `@firstName`). Parameter names
|
189
|
-
#
|
187
|
+
# parameter name (for example, `@firstName`). Parameter names must conform
|
188
|
+
# to the naming requirements of identifiers as specified at
|
189
|
+
# https://cloud.google.com/spanner/docs/lexical#identifiers.
|
190
190
|
#
|
191
191
|
# Parameters can appear anywhere that a literal value is expected. The same
|
192
192
|
# parameter name can be used more than once, for example:
|
@@ -259,6 +259,9 @@ module Google
|
|
259
259
|
# SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement
|
260
260
|
# with an invalid optimizer version will fail with a syntax error
|
261
261
|
# (`INVALID_ARGUMENT`) status.
|
262
|
+
# See
|
263
|
+
# https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer
|
264
|
+
# for more information on managing the query optimizer.
|
262
265
|
#
|
263
266
|
# The `optimizer_version` statement hint has precedence over this setting.
|
264
267
|
class QueryOptions
|
@@ -650,6 +653,11 @@ module Google
|
|
650
653
|
# The mutations to be executed when this transaction commits. All
|
651
654
|
# mutations are applied atomically, in the order they appear in
|
652
655
|
# this list.
|
656
|
+
# @!attribute [rw] return_commit_stats
|
657
|
+
# @return [::Boolean]
|
658
|
+
# If `true`, then statistics related to the transaction will be included in
|
659
|
+
# the {::Google::Cloud::Spanner::V1::CommitResponse#commit_stats CommitResponse}. Default value is
|
660
|
+
# `false`.
|
653
661
|
class CommitRequest
|
654
662
|
include ::Google::Protobuf::MessageExts
|
655
663
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -659,9 +667,29 @@ module Google
|
|
659
667
|
# @!attribute [rw] commit_timestamp
|
660
668
|
# @return [::Google::Protobuf::Timestamp]
|
661
669
|
# The Cloud Spanner timestamp at which the transaction committed.
|
670
|
+
# @!attribute [rw] commit_stats
|
671
|
+
# @return [::Google::Cloud::Spanner::V1::CommitResponse::CommitStats]
|
672
|
+
# The statistics about this Commit. Not returned by default.
|
673
|
+
# For more information, see
|
674
|
+
# {::Google::Cloud::Spanner::V1::CommitRequest#return_commit_stats CommitRequest.return_commit_stats}.
|
662
675
|
class CommitResponse
|
663
676
|
include ::Google::Protobuf::MessageExts
|
664
677
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
678
|
+
|
679
|
+
# Additional statistics about a commit.
|
680
|
+
# @!attribute [rw] mutation_count
|
681
|
+
# @return [::Integer]
|
682
|
+
# The total number of mutations for the transaction. Knowing the
|
683
|
+
# `mutation_count` value can help you maximize the number of mutations
|
684
|
+
# in a transaction and minimize the number of API round trips. You can
|
685
|
+
# also monitor this value to prevent transactions from exceeding the system
|
686
|
+
# [limit](http://cloud.google.com/spanner/quotas#limits_for_creating_reading_updating_and_deleting_data).
|
687
|
+
# If the number of mutations exceeds the limit, the server returns
|
688
|
+
# [INVALID_ARGUMENT](http://cloud.google.com/spanner/docs/reference/rest/v1/Code#ENUM_VALUES.INVALID_ARGUMENT).
|
689
|
+
class CommitStats
|
690
|
+
include ::Google::Protobuf::MessageExts
|
691
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
692
|
+
end
|
665
693
|
end
|
666
694
|
|
667
695
|
# The request for {::Google::Cloud::Spanner::V1::Spanner::Client#rollback Rollback}.
|
@@ -24,10 +24,11 @@ module Google
|
|
24
24
|
# # Transactions
|
25
25
|
#
|
26
26
|
#
|
27
|
-
# Each session can have at most one active transaction at a time
|
28
|
-
#
|
29
|
-
#
|
30
|
-
#
|
27
|
+
# Each session can have at most one active transaction at a time (note that
|
28
|
+
# standalone reads and queries use a transaction internally and do count
|
29
|
+
# towards the one transaction limit). After the active transaction is
|
30
|
+
# completed, the session can immediately be re-used for the next transaction.
|
31
|
+
# It is not necessary to create a new session for each transaction.
|
31
32
|
#
|
32
33
|
# # Transaction Modes
|
33
34
|
#
|
@@ -59,7 +59,7 @@ module Google
|
|
59
59
|
# SQL queries, it is the column alias (e.g., `"Word"` in the
|
60
60
|
# query `"SELECT 'hello' AS Word"`), or the column name (e.g.,
|
61
61
|
# `"ColName"` in the query `"SELECT ColName FROM Table"`). Some
|
62
|
-
# columns might have an empty name (e.g.,
|
62
|
+
# columns might have an empty name (e.g., `"SELECT
|
63
63
|
# UPPER(ColName)"`). Note that a query result can contain
|
64
64
|
# multiple fields with the same name.
|
65
65
|
# @!attribute [rw] type
|
@@ -120,6 +120,17 @@ module Google
|
|
120
120
|
# Encoded as `list`, where list element `i` is represented according
|
121
121
|
# to [struct_type.fields[i]][google.spanner.v1.StructType.fields].
|
122
122
|
STRUCT = 9
|
123
|
+
|
124
|
+
# Encoded as `string`, in decimal format or scientific notation format.
|
125
|
+
# <br>Decimal format:
|
126
|
+
# <br>`[+-]Digits[.[Digits]]` or
|
127
|
+
# <br>`[+-][Digits].Digits`
|
128
|
+
#
|
129
|
+
# Scientific notation:
|
130
|
+
# <br>`[+-]Digits[.[Digits]][ExponentIndicator[+-]Digits]` or
|
131
|
+
# <br>`[+-][Digits].Digits[ExponentIndicator[+-]Digits]`
|
132
|
+
# <br>(ExponentIndicator is `"e"` or `"E"`)
|
133
|
+
NUMERIC = 10
|
123
134
|
end
|
124
135
|
end
|
125
136
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-spanner-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -211,7 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
211
211
|
- !ruby/object:Gem::Version
|
212
212
|
version: '0'
|
213
213
|
requirements: []
|
214
|
-
rubygems_version: 3.
|
214
|
+
rubygems_version: 3.2.6
|
215
215
|
signing_key:
|
216
216
|
specification_version: 4
|
217
217
|
summary: API Client library for the Cloud Spanner V1 API
|