google-cloud-spanner-v1 0.2.2 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
- rpc :Commit, Google::Cloud::Spanner::V1::CommitRequest, Google::Cloud::Spanner::V1::CommitResponse
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
@@ -54,6 +54,12 @@ module Google
54
54
  # This indicates that the field may be set once in a request to create a
55
55
  # resource, but may not be changed thereafter.
56
56
  IMMUTABLE = 5
57
+
58
+ # Denotes that a (repeated) field is an unordered list.
59
+ # This indicates that the service may provide the elements of the list
60
+ # in any arbitrary order, rather than the order the user originally
61
+ # provided. Additionally, the list's order may or may not be stable.
62
+ UNORDERED_LIST = 6
57
63
  end
58
64
  end
59
65
  end
@@ -43,12 +43,12 @@ module Google
43
43
  #
44
44
  # The ResourceDescriptor Yaml config will look like:
45
45
  #
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}"
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 'projects' for
187
- # the name of 'projects/\\{project}'. It is the same concept of the `plural`
188
- # field in k8s CRD spec
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
- # message ListLogEntriesRequest {
238
- # string parent = 1 [(google.api.resource_reference) = {
239
- # child_type: "logging.googleapis.com/LogEntry"
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
@@ -57,10 +57,13 @@ module Google
57
57
  # Example 4: Pack and unpack a message in Go
58
58
  #
59
59
  # foo := &pb.Foo{...}
60
- # any, err := ptypes.MarshalAny(foo)
60
+ # any, err := anypb.New(foo)
61
+ # if err != nil {
62
+ # ...
63
+ # }
61
64
  # ...
62
65
  # foo := &pb.Foo{}
63
- # if err := ptypes.UnmarshalAny(any, foo); err != nil {
66
+ # if err := any.UnmarshalTo(foo); err != nil {
64
67
  # ...
65
68
  # }
66
69
  #
@@ -70,7 +70,16 @@ module Google
70
70
  # .setNanos((int) ((millis % 1000) * 1000000)).build();
71
71
  #
72
72
  #
73
- # Example 5: Compute Timestamp from current time in Python.
73
+ # Example 5: Compute Timestamp from Java `Instant.now()`.
74
+ #
75
+ # Instant now = Instant.now();
76
+ #
77
+ # Timestamp timestamp =
78
+ # Timestamp.newBuilder().setSeconds(now.getEpochSecond())
79
+ # .setNanos(now.getNano()).build();
80
+ #
81
+ #
82
+ # Example 6: Compute Timestamp from current time in Python.
74
83
  #
75
84
  # timestamp = Timestamp()
76
85
  # timestamp.GetCurrentTime()
@@ -62,10 +62,9 @@ module Google
62
62
  end
63
63
 
64
64
  # A session in the Cloud Spanner API.
65
- # @!attribute [rw] name
65
+ # @!attribute [r] name
66
66
  # @return [::String]
67
- # The name of the session. This is always system-assigned; values provided
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 [rw] create_time
79
+ # @!attribute [r] create_time
81
80
  # @return [::Google::Protobuf::Timestamp]
82
81
  # Output only. The timestamp when the session is created.
83
- # @!attribute [rw] approximate_last_use_time
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.
@@ -160,6 +159,66 @@ module Google
160
159
  extend ::Google::Protobuf::MessageExts::ClassMethods
161
160
  end
162
161
 
162
+ # Common request options for various APIs.
163
+ # @!attribute [rw] priority
164
+ # @return [::Google::Cloud::Spanner::V1::RequestOptions::Priority]
165
+ # Priority for the request.
166
+ # @!attribute [rw] request_tag
167
+ # @return [::String]
168
+ # A per-request tag which can be applied to queries or reads, used for
169
+ # statistics collection.
170
+ # Both request_tag and transaction_tag can be specified for a read or query
171
+ # that belongs to a transaction.
172
+ # This field is ignored for requests where it's not applicable (e.g.
173
+ # CommitRequest).
174
+ # `request_tag` must be a valid identifier of the form:
175
+ # `[a-zA-Z][a-zA-Z0-9_\-]` between 2 and 64 characters in length
176
+ # @!attribute [rw] transaction_tag
177
+ # @return [::String]
178
+ # A tag used for statistics collection about this transaction.
179
+ # Both request_tag and transaction_tag can be specified for a read or query
180
+ # that belongs to a transaction.
181
+ # The value of transaction_tag should be the same for all requests belonging
182
+ # to the same transaction.
183
+ # If this request doesn’t belong to any transaction, transaction_tag will be
184
+ # ignored.
185
+ # `transaction_tag` must be a valid identifier of the format:
186
+ # `[a-zA-Z][a-zA-Z0-9_\-]{0,49}`
187
+ class RequestOptions
188
+ include ::Google::Protobuf::MessageExts
189
+ extend ::Google::Protobuf::MessageExts::ClassMethods
190
+
191
+ # The relative priority for requests. Note that priority is not applicable
192
+ # for {::Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction BeginTransaction}.
193
+ #
194
+ # The priority acts as a hint to the Cloud Spanner scheduler and does not
195
+ # guarantee priority or order of execution. For example:
196
+ #
197
+ # * Some parts of a write operation always execute at `PRIORITY_HIGH`,
198
+ # regardless of the specified priority. This may cause you to see an
199
+ # increase in high priority workload even when executing a low priority
200
+ # request. This can also potentially cause a priority inversion where a
201
+ # lower priority request will be fulfilled ahead of a higher priority
202
+ # request.
203
+ # * If a transaction contains multiple operations with different priorities,
204
+ # Cloud Spanner does not guarantee to process the higher priority
205
+ # operations first. There may be other constraints to satisfy, such as
206
+ # order of operations.
207
+ module Priority
208
+ # `PRIORITY_UNSPECIFIED` is equivalent to `PRIORITY_HIGH`.
209
+ PRIORITY_UNSPECIFIED = 0
210
+
211
+ # This specifies that the request is low priority.
212
+ PRIORITY_LOW = 1
213
+
214
+ # This specifies that the request is medium priority.
215
+ PRIORITY_MEDIUM = 2
216
+
217
+ # This specifies that the request is high priority.
218
+ PRIORITY_HIGH = 3
219
+ end
220
+ end
221
+
163
222
  # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql} and
164
223
  # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql ExecuteStreamingSql}.
165
224
  # @!attribute [rw] session
@@ -185,8 +244,9 @@ module Google
185
244
  # Parameter names and values that bind to placeholders in the SQL string.
186
245
  #
187
246
  # A parameter placeholder consists of the `@` character followed by the
188
- # parameter name (for example, `@firstName`). Parameter names can contain
189
- # letters, numbers, and underscores.
247
+ # parameter name (for example, `@firstName`). Parameter names must conform
248
+ # to the naming requirements of identifiers as specified at
249
+ # https://cloud.google.com/spanner/docs/lexical#identifiers.
190
250
  #
191
251
  # Parameters can appear anywhere that a literal value is expected. The same
192
252
  # parameter name can be used more than once, for example:
@@ -238,6 +298,9 @@ module Google
238
298
  # @!attribute [rw] query_options
239
299
  # @return [::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryOptions]
240
300
  # Query optimizer configuration to use for the given query.
301
+ # @!attribute [rw] request_options
302
+ # @return [::Google::Cloud::Spanner::V1::RequestOptions]
303
+ # Common options for this request.
241
304
  class ExecuteSqlRequest
242
305
  include ::Google::Protobuf::MessageExts
243
306
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -250,17 +313,49 @@ module Google
250
313
  # This parameter allows individual queries to pick different query
251
314
  # optimizer versions.
252
315
  #
253
- # Specifying "latest" as a value instructs Cloud Spanner to use the
316
+ # Specifying `latest` as a value instructs Cloud Spanner to use the
254
317
  # latest supported query optimizer version. If not specified, Cloud Spanner
255
- # uses optimizer version set at the database level options. Any other
318
+ # uses the optimizer version set at the database level options. Any other
256
319
  # positive integer (from the list of supported optimizer versions)
257
320
  # overrides the default optimizer version for query execution.
321
+ #
258
322
  # The list of supported optimizer versions can be queried from
259
- # SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement
260
- # with an invalid optimizer version will fail with a syntax error
261
- # (`INVALID_ARGUMENT`) status.
323
+ # SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS.
324
+ #
325
+ # Executing a SQL statement with an invalid optimizer version fails with
326
+ # an `INVALID_ARGUMENT` error.
327
+ #
328
+ # See
329
+ # https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer
330
+ # for more information on managing the query optimizer.
262
331
  #
263
332
  # The `optimizer_version` statement hint has precedence over this setting.
333
+ # @!attribute [rw] optimizer_statistics_package
334
+ # @return [::String]
335
+ # An option to control the selection of optimizer statistics package.
336
+ #
337
+ # This parameter allows individual queries to use a different query
338
+ # optimizer statistics package.
339
+ #
340
+ # Specifying `latest` as a value instructs Cloud Spanner to use the latest
341
+ # generated statistics package. If not specified, Cloud Spanner uses
342
+ # the statistics package set at the database level options, or the latest
343
+ # package if the database option is not set.
344
+ #
345
+ # The statistics package requested by the query has to be exempt from
346
+ # garbage collection. This can be achieved with the following DDL
347
+ # statement:
348
+ #
349
+ # ```
350
+ # ALTER STATISTICS <package_name> SET OPTIONS (allow_gc=false)
351
+ # ```
352
+ #
353
+ # The list of available statistics packages can be queried from
354
+ # `INFORMATION_SCHEMA.SPANNER_STATISTICS`.
355
+ #
356
+ # Executing a SQL statement with an invalid optimizer statistics package
357
+ # or with a statistics package that allows garbage collection fails with
358
+ # an `INVALID_ARGUMENT` error.
264
359
  class QueryOptions
265
360
  include ::Google::Protobuf::MessageExts
266
361
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -319,6 +414,9 @@ module Google
319
414
  # transaction. If a request arrives for the first time with an out-of-order
320
415
  # sequence number, the transaction may be aborted. Replays of previously
321
416
  # handled requests will yield the same response as the first execution.
417
+ # @!attribute [rw] request_options
418
+ # @return [::Google::Cloud::Spanner::V1::RequestOptions]
419
+ # Common options for this request.
322
420
  class ExecuteBatchDmlRequest
323
421
  include ::Google::Protobuf::MessageExts
324
422
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -610,6 +708,9 @@ module Google
610
708
  # previously created using PartitionRead(). There must be an exact
611
709
  # match for the values of fields common to this message and the
612
710
  # PartitionReadRequest message used to create this partition_token.
711
+ # @!attribute [rw] request_options
712
+ # @return [::Google::Cloud::Spanner::V1::RequestOptions]
713
+ # Common options for this request.
613
714
  class ReadRequest
614
715
  include ::Google::Protobuf::MessageExts
615
716
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -622,6 +723,13 @@ module Google
622
723
  # @!attribute [rw] options
623
724
  # @return [::Google::Cloud::Spanner::V1::TransactionOptions]
624
725
  # Required. Options for the new transaction.
726
+ # @!attribute [rw] request_options
727
+ # @return [::Google::Cloud::Spanner::V1::RequestOptions]
728
+ # Common options for this request.
729
+ # Priority is ignored for this request. Setting the priority in this
730
+ # request_options struct will not do anything. To set the priority for a
731
+ # transaction, set it on the reads and writes that are part of this
732
+ # transaction instead.
625
733
  class BeginTransactionRequest
626
734
  include ::Google::Protobuf::MessageExts
627
735
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -650,6 +758,14 @@ module Google
650
758
  # The mutations to be executed when this transaction commits. All
651
759
  # mutations are applied atomically, in the order they appear in
652
760
  # this list.
761
+ # @!attribute [rw] return_commit_stats
762
+ # @return [::Boolean]
763
+ # If `true`, then statistics related to the transaction will be included in
764
+ # the {::Google::Cloud::Spanner::V1::CommitResponse#commit_stats CommitResponse}. Default value is
765
+ # `false`.
766
+ # @!attribute [rw] request_options
767
+ # @return [::Google::Cloud::Spanner::V1::RequestOptions]
768
+ # Common options for this request.
653
769
  class CommitRequest
654
770
  include ::Google::Protobuf::MessageExts
655
771
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -659,9 +775,29 @@ module Google
659
775
  # @!attribute [rw] commit_timestamp
660
776
  # @return [::Google::Protobuf::Timestamp]
661
777
  # The Cloud Spanner timestamp at which the transaction committed.
778
+ # @!attribute [rw] commit_stats
779
+ # @return [::Google::Cloud::Spanner::V1::CommitResponse::CommitStats]
780
+ # The statistics about this Commit. Not returned by default.
781
+ # For more information, see
782
+ # {::Google::Cloud::Spanner::V1::CommitRequest#return_commit_stats CommitRequest.return_commit_stats}.
662
783
  class CommitResponse
663
784
  include ::Google::Protobuf::MessageExts
664
785
  extend ::Google::Protobuf::MessageExts::ClassMethods
786
+
787
+ # Additional statistics about a commit.
788
+ # @!attribute [rw] mutation_count
789
+ # @return [::Integer]
790
+ # The total number of mutations for the transaction. Knowing the
791
+ # `mutation_count` value can help you maximize the number of mutations
792
+ # in a transaction and minimize the number of API round trips. You can
793
+ # also monitor this value to prevent transactions from exceeding the system
794
+ # [limit](http://cloud.google.com/spanner/quotas#limits_for_creating_reading_updating_and_deleting_data).
795
+ # If the number of mutations exceeds the limit, the server returns
796
+ # [INVALID_ARGUMENT](http://cloud.google.com/spanner/docs/reference/rest/v1/Code#ENUM_VALUES.INVALID_ARGUMENT).
797
+ class CommitStats
798
+ include ::Google::Protobuf::MessageExts
799
+ extend ::Google::Protobuf::MessageExts::ClassMethods
800
+ end
665
801
  end
666
802
 
667
803
  # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#rollback Rollback}.