@google-cloud/spanner 8.2.0 → 8.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -66,14 +66,14 @@ service Spanner {
66
66
  // transaction internally, and count toward the one transaction
67
67
  // limit.
68
68
  //
69
- // Active sessions use additional server resources, so it is a good idea to
69
+ // Active sessions use additional server resources, so it's a good idea to
70
70
  // delete idle and unneeded sessions.
71
- // Aside from explicit deletes, Cloud Spanner may delete sessions for which no
71
+ // Aside from explicit deletes, Cloud Spanner can delete sessions when no
72
72
  // operations are sent for more than an hour. If a session is deleted,
73
73
  // requests to it return `NOT_FOUND`.
74
74
  //
75
75
  // Idle sessions can be kept alive by sending a trivial SQL query
76
- // periodically, e.g., `"SELECT 1"`.
76
+ // periodically, for example, `"SELECT 1"`.
77
77
  rpc CreateSession(CreateSessionRequest) returns (Session) {
78
78
  option (google.api.http) = {
79
79
  post: "/v1/{database=projects/*/instances/*/databases/*}/sessions"
@@ -95,7 +95,7 @@ service Spanner {
95
95
  option (google.api.method_signature) = "database,session_count";
96
96
  }
97
97
 
98
- // Gets a session. Returns `NOT_FOUND` if the session does not exist.
98
+ // Gets a session. Returns `NOT_FOUND` if the session doesn't exist.
99
99
  // This is mainly useful for determining whether a session is still
100
100
  // alive.
101
101
  rpc GetSession(GetSessionRequest) returns (Session) {
@@ -113,9 +113,9 @@ service Spanner {
113
113
  option (google.api.method_signature) = "database";
114
114
  }
115
115
 
116
- // Ends a session, releasing server resources associated with it. This will
117
- // asynchronously trigger cancellation of any operations that are running with
118
- // this session.
116
+ // Ends a session, releasing server resources associated with it. This
117
+ // asynchronously triggers the cancellation of any operations that are running
118
+ // with this session.
119
119
  rpc DeleteSession(DeleteSessionRequest) returns (google.protobuf.Empty) {
120
120
  option (google.api.http) = {
121
121
  delete: "/v1/{name=projects/*/instances/*/databases/*/sessions/*}"
@@ -124,7 +124,7 @@ service Spanner {
124
124
  }
125
125
 
126
126
  // Executes an SQL statement, returning all results in a single reply. This
127
- // method cannot be used to return a result set larger than 10 MiB;
127
+ // method can't be used to return a result set larger than 10 MiB;
128
128
  // if the query yields more data than that, the query fails with
129
129
  // a `FAILED_PRECONDITION` error.
130
130
  //
@@ -136,6 +136,9 @@ service Spanner {
136
136
  // Larger result sets can be fetched in streaming fashion by calling
137
137
  // [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql]
138
138
  // instead.
139
+ //
140
+ // The query string can be SQL or [Graph Query Language
141
+ // (GQL)](https://cloud.google.com/spanner/docs/reference/standard-sql/graph-intro).
139
142
  rpc ExecuteSql(ExecuteSqlRequest) returns (ResultSet) {
140
143
  option (google.api.http) = {
141
144
  post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeSql"
@@ -148,6 +151,9 @@ service Spanner {
148
151
  // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], there is no limit on
149
152
  // the size of the returned result set. However, no individual row in the
150
153
  // result set can exceed 100 MiB, and no column value can exceed 10 MiB.
154
+ //
155
+ // The query string can be SQL or [Graph Query Language
156
+ // (GQL)](https://cloud.google.com/spanner/docs/reference/standard-sql/graph-intro).
151
157
  rpc ExecuteStreamingSql(ExecuteSqlRequest) returns (stream PartialResultSet) {
152
158
  option (google.api.http) = {
153
159
  post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeStreamingSql"
@@ -177,7 +183,7 @@ service Spanner {
177
183
 
178
184
  // Reads rows from the database using key lookups and scans, as a
179
185
  // simple key/value style alternative to
180
- // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. This method cannot be
186
+ // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. This method can't be
181
187
  // used to return a result set larger than 10 MiB; if the read matches more
182
188
  // data than that, the read fails with a `FAILED_PRECONDITION`
183
189
  // error.
@@ -227,8 +233,8 @@ service Spanner {
227
233
  // `Commit` might return an `ABORTED` error. This can occur at any time;
228
234
  // commonly, the cause is conflicts with concurrent
229
235
  // transactions. However, it can also happen for a variety of other
230
- // reasons. If `Commit` returns `ABORTED`, the caller should re-attempt
231
- // the transaction from the beginning, re-using the same session.
236
+ // reasons. If `Commit` returns `ABORTED`, the caller should retry
237
+ // the transaction from the beginning, reusing the same session.
232
238
  //
233
239
  // On very rare occasions, `Commit` might return `UNKNOWN`. This can happen,
234
240
  // for example, if the client job experiences a 1+ hour networking failure.
@@ -245,14 +251,14 @@ service Spanner {
245
251
  "session,single_use_transaction,mutations";
246
252
  }
247
253
 
248
- // Rolls back a transaction, releasing any locks it holds. It is a good
254
+ // Rolls back a transaction, releasing any locks it holds. It's a good
249
255
  // idea to call this for any transaction that includes one or more
250
256
  // [Read][google.spanner.v1.Spanner.Read] or
251
257
  // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] requests and ultimately
252
258
  // decides not to commit.
253
259
  //
254
260
  // `Rollback` returns `OK` if it successfully aborts the transaction, the
255
- // transaction was already aborted, or the transaction is not
261
+ // transaction was already aborted, or the transaction isn't
256
262
  // found. `Rollback` never returns `ABORTED`.
257
263
  rpc Rollback(RollbackRequest) returns (google.protobuf.Empty) {
258
264
  option (google.api.http) = {
@@ -263,16 +269,16 @@ service Spanner {
263
269
  }
264
270
 
265
271
  // Creates a set of partition tokens that can be used to execute a query
266
- // operation in parallel. Each of the returned partition tokens can be used
272
+ // operation in parallel. Each of the returned partition tokens can be used
267
273
  // by [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] to
268
- // specify a subset of the query result to read. The same session and
269
- // read-only transaction must be used by the PartitionQueryRequest used to
270
- // create the partition tokens and the ExecuteSqlRequests that use the
274
+ // specify a subset of the query result to read. The same session and
275
+ // read-only transaction must be used by the `PartitionQueryRequest` used to
276
+ // create the partition tokens and the `ExecuteSqlRequests` that use the
271
277
  // partition tokens.
272
278
  //
273
279
  // Partition tokens become invalid when the session used to create them
274
280
  // is deleted, is idle for too long, begins a new transaction, or becomes too
275
- // old. When any of these happen, it is not possible to resume the query, and
281
+ // old. When any of these happen, it isn't possible to resume the query, and
276
282
  // the whole operation must be restarted from the beginning.
277
283
  rpc PartitionQuery(PartitionQueryRequest) returns (PartitionResponse) {
278
284
  option (google.api.http) = {
@@ -282,18 +288,18 @@ service Spanner {
282
288
  }
283
289
 
284
290
  // Creates a set of partition tokens that can be used to execute a read
285
- // operation in parallel. Each of the returned partition tokens can be used
291
+ // operation in parallel. Each of the returned partition tokens can be used
286
292
  // by [StreamingRead][google.spanner.v1.Spanner.StreamingRead] to specify a
287
- // subset of the read result to read. The same session and read-only
288
- // transaction must be used by the PartitionReadRequest used to create the
289
- // partition tokens and the ReadRequests that use the partition tokens. There
290
- // are no ordering guarantees on rows returned among the returned partition
291
- // tokens, or even within each individual StreamingRead call issued with a
292
- // partition_token.
293
+ // subset of the read result to read. The same session and read-only
294
+ // transaction must be used by the `PartitionReadRequest` used to create the
295
+ // partition tokens and the `ReadRequests` that use the partition tokens.
296
+ // There are no ordering guarantees on rows returned among the returned
297
+ // partition tokens, or even within each individual `StreamingRead` call
298
+ // issued with a `partition_token`.
293
299
  //
294
300
  // Partition tokens become invalid when the session used to create them
295
301
  // is deleted, is idle for too long, begins a new transaction, or becomes too
296
- // old. When any of these happen, it is not possible to resume the read, and
302
+ // old. When any of these happen, it isn't possible to resume the read, and
297
303
  // the whole operation must be restarted from the beginning.
298
304
  rpc PartitionRead(PartitionReadRequest) returns (PartitionResponse) {
299
305
  option (google.api.http) = {
@@ -306,15 +312,15 @@ service Spanner {
306
312
  // transactions. All mutations in a group are committed atomically. However,
307
313
  // mutations across groups can be committed non-atomically in an unspecified
308
314
  // order and thus, they must be independent of each other. Partial failure is
309
- // possible, i.e., some groups may have been committed successfully, while
310
- // some may have failed. The results of individual batches are streamed into
311
- // the response as the batches are applied.
315
+ // possible, that is, some groups might have been committed successfully,
316
+ // while some might have failed. The results of individual batches are
317
+ // streamed into the response as the batches are applied.
312
318
  //
313
- // BatchWrite requests are not replay protected, meaning that each mutation
314
- // group may be applied more than once. Replays of non-idempotent mutations
315
- // may have undesirable effects. For example, replays of an insert mutation
316
- // may produce an already exists error or if you use generated or commit
317
- // timestamp-based keys, it may result in additional rows being added to the
319
+ // `BatchWrite` requests are not replay protected, meaning that each mutation
320
+ // group can be applied more than once. Replays of non-idempotent mutations
321
+ // can have undesirable effects. For example, replays of an insert mutation
322
+ // can produce an already exists error or if you use generated or commit
323
+ // timestamp-based keys, it can result in additional rows being added to the
318
324
  // mutation's table. We recommend structuring your mutation groups to be
319
325
  // idempotent to avoid this issue.
320
326
  rpc BatchWrite(BatchWriteRequest) returns (stream BatchWriteResponse) {
@@ -351,13 +357,13 @@ message BatchCreateSessionsRequest {
351
357
  }
352
358
  ];
353
359
 
354
- // Parameters to be applied to each created session.
360
+ // Parameters to apply to each created session.
355
361
  Session session_template = 2;
356
362
 
357
363
  // Required. The number of sessions to be created in this batch call.
358
- // The API may return fewer than the requested number of sessions. If a
364
+ // The API can return fewer than the requested number of sessions. If a
359
365
  // specific number of sessions are desired, the client can make additional
360
- // calls to BatchCreateSessions (adjusting
366
+ // calls to `BatchCreateSessions` (adjusting
361
367
  // [session_count][google.spanner.v1.BatchCreateSessionsRequest.session_count]
362
368
  // as necessary).
363
369
  int32 session_count = 3 [(google.api.field_behavior) = REQUIRED];
@@ -375,6 +381,8 @@ message Session {
375
381
  option (google.api.resource) = {
376
382
  type: "spanner.googleapis.com/Session"
377
383
  pattern: "projects/{project}/instances/{instance}/databases/{database}/sessions/{session}"
384
+ plural: "sessions"
385
+ singular: "session"
378
386
  };
379
387
 
380
388
  // Output only. The name of the session. This is always system-assigned.
@@ -395,7 +403,7 @@ message Session {
395
403
  google.protobuf.Timestamp create_time = 3
396
404
  [(google.api.field_behavior) = OUTPUT_ONLY];
397
405
 
398
- // Output only. The approximate timestamp when the session is last used. It is
406
+ // Output only. The approximate timestamp when the session is last used. It's
399
407
  // typically earlier than the actual last use time.
400
408
  google.protobuf.Timestamp approximate_last_use_time = 4
401
409
  [(google.api.field_behavior) = OUTPUT_ONLY];
@@ -403,13 +411,14 @@ message Session {
403
411
  // The database role which created this session.
404
412
  string creator_role = 5;
405
413
 
406
- // Optional. If true, specifies a multiplexed session. A multiplexed session
407
- // may be used for multiple, concurrent read-only operations but can not be
408
- // used for read-write transactions, partitioned reads, or partitioned
409
- // queries. Multiplexed sessions can be created via
410
- // [CreateSession][google.spanner.v1.Spanner.CreateSession] but not via
411
- // [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions].
412
- // Multiplexed sessions may not be deleted nor listed.
414
+ // Optional. If `true`, specifies a multiplexed session. Use a multiplexed
415
+ // session for multiple, concurrent read-only operations. Don't use them for
416
+ // read-write transactions, partitioned reads, or partitioned queries. Use
417
+ // [`sessions.create`][google.spanner.v1.Spanner.CreateSession] to create
418
+ // multiplexed sessions. Don't use
419
+ // [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions] to
420
+ // create a multiplexed session. You can't delete or list multiplexed
421
+ // sessions.
413
422
  bool multiplexed = 6 [(google.api.field_behavior) = OPTIONAL];
414
423
  }
415
424
 
@@ -477,22 +486,22 @@ message DeleteSessionRequest {
477
486
 
478
487
  // Common request options for various APIs.
479
488
  message RequestOptions {
480
- // The relative priority for requests. Note that priority is not applicable
489
+ // The relative priority for requests. Note that priority isn't applicable
481
490
  // for [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction].
482
491
  //
483
- // The priority acts as a hint to the Cloud Spanner scheduler and does not
492
+ // The priority acts as a hint to the Cloud Spanner scheduler and doesn't
484
493
  // guarantee priority or order of execution. For example:
485
494
  //
486
495
  // * Some parts of a write operation always execute at `PRIORITY_HIGH`,
487
- // regardless of the specified priority. This may cause you to see an
496
+ // regardless of the specified priority. This can cause you to see an
488
497
  // increase in high priority workload even when executing a low priority
489
498
  // request. This can also potentially cause a priority inversion where a
490
- // lower priority request will be fulfilled ahead of a higher priority
499
+ // lower priority request is fulfilled ahead of a higher priority
491
500
  // request.
492
501
  // * If a transaction contains multiple operations with different priorities,
493
- // Cloud Spanner does not guarantee to process the higher priority
494
- // operations first. There may be other constraints to satisfy, such as
495
- // order of operations.
502
+ // Cloud Spanner doesn't guarantee to process the higher priority
503
+ // operations first. There might be other constraints to satisfy, such as
504
+ // the order of operations.
496
505
  enum Priority {
497
506
  // `PRIORITY_UNSPECIFIED` is equivalent to `PRIORITY_HIGH`.
498
507
  PRIORITY_UNSPECIFIED = 0;
@@ -512,35 +521,35 @@ message RequestOptions {
512
521
 
513
522
  // A per-request tag which can be applied to queries or reads, used for
514
523
  // statistics collection.
515
- // Both request_tag and transaction_tag can be specified for a read or query
516
- // that belongs to a transaction.
517
- // This field is ignored for requests where it's not applicable (e.g.
518
- // CommitRequest).
524
+ // Both `request_tag` and `transaction_tag` can be specified for a read or
525
+ // query that belongs to a transaction.
526
+ // This field is ignored for requests where it's not applicable (for example,
527
+ // `CommitRequest`).
519
528
  // Legal characters for `request_tag` values are all printable characters
520
529
  // (ASCII 32 - 126) and the length of a request_tag is limited to 50
521
530
  // characters. Values that exceed this limit are truncated.
522
- // Any leading underscore (_) characters will be removed from the string.
531
+ // Any leading underscore (_) characters are removed from the string.
523
532
  string request_tag = 2;
524
533
 
525
534
  // A tag used for statistics collection about this transaction.
526
- // Both request_tag and transaction_tag can be specified for a read or query
527
- // that belongs to a transaction.
535
+ // Both `request_tag` and `transaction_tag` can be specified for a read or
536
+ // query that belongs to a transaction.
528
537
  // The value of transaction_tag should be the same for all requests belonging
529
538
  // to the same transaction.
530
- // If this request doesn't belong to any transaction, transaction_tag will be
539
+ // If this request doesn't belong to any transaction, `transaction_tag` is
531
540
  // ignored.
532
541
  // Legal characters for `transaction_tag` values are all printable characters
533
- // (ASCII 32 - 126) and the length of a transaction_tag is limited to 50
542
+ // (ASCII 32 - 126) and the length of a `transaction_tag` is limited to 50
534
543
  // characters. Values that exceed this limit are truncated.
535
- // Any leading underscore (_) characters will be removed from the string.
544
+ // Any leading underscore (_) characters are removed from the string.
536
545
  string transaction_tag = 3;
537
546
  }
538
547
 
539
- // The DirectedReadOptions can be used to indicate which replicas or regions
548
+ // The `DirectedReadOptions` can be used to indicate which replicas or regions
540
549
  // should be used for non-transactional reads or queries.
541
550
  //
542
- // DirectedReadOptions may only be specified for a read-only transaction,
543
- // otherwise the API will return an `INVALID_ARGUMENT` error.
551
+ // `DirectedReadOptions` can only be specified for a read-only transaction,
552
+ // otherwise the API returns an `INVALID_ARGUMENT` error.
544
553
  message DirectedReadOptions {
545
554
  // The directed read replica selector.
546
555
  // Callers must provide one or more of the following fields for replica
@@ -553,12 +562,12 @@ message DirectedReadOptions {
553
562
  // Some examples of using replica_selectors are:
554
563
  //
555
564
  // * `location:us-east1` --> The "us-east1" replica(s) of any available type
556
- // will be used to process the request.
557
- // * `type:READ_ONLY` --> The "READ_ONLY" type replica(s) in nearest
558
- // available location will be used to process the
565
+ // is used to process the request.
566
+ // * `type:READ_ONLY` --> The "READ_ONLY" type replica(s) in the nearest
567
+ // available location are used to process the
559
568
  // request.
560
569
  // * `location:us-east1 type:READ_ONLY` --> The "READ_ONLY" type replica(s)
561
- // in location "us-east1" will be used to process
570
+ // in location "us-east1" is used to process
562
571
  // the request.
563
572
  message ReplicaSelection {
564
573
  // Indicates the type of replica.
@@ -573,22 +582,22 @@ message DirectedReadOptions {
573
582
  READ_ONLY = 2;
574
583
  }
575
584
 
576
- // The location or region of the serving requests, e.g. "us-east1".
585
+ // The location or region of the serving requests, for example, "us-east1".
577
586
  string location = 1;
578
587
 
579
588
  // The type of replica.
580
589
  Type type = 2;
581
590
  }
582
591
 
583
- // An IncludeReplicas contains a repeated set of ReplicaSelection which
592
+ // An `IncludeReplicas` contains a repeated set of `ReplicaSelection` which
584
593
  // indicates the order in which replicas should be considered.
585
594
  message IncludeReplicas {
586
595
  // The directed read replica selector.
587
596
  repeated ReplicaSelection replica_selections = 1;
588
597
 
589
- // If true, Spanner will not route requests to a replica outside the
590
- // include_replicas list when all of the specified replicas are unavailable
591
- // or unhealthy. Default value is `false`.
598
+ // If `true`, Spanner doesn't route requests to a replica outside the
599
+ // <`include_replicas` list when all of the specified replicas are
600
+ // unavailable or unhealthy. Default value is `false`.
592
601
  bool auto_failover_disabled = 2;
593
602
  }
594
603
 
@@ -599,18 +608,18 @@ message DirectedReadOptions {
599
608
  repeated ReplicaSelection replica_selections = 1;
600
609
  }
601
610
 
602
- // Required. At most one of either include_replicas or exclude_replicas
611
+ // Required. At most one of either `include_replicas` or `exclude_replicas`
603
612
  // should be present in the message.
604
613
  oneof replicas {
605
- // Include_replicas indicates the order of replicas (as they appear in
606
- // this list) to process the request. If auto_failover_disabled is set to
607
- // true and all replicas are exhausted without finding a healthy replica,
608
- // Spanner will wait for a replica in the list to become available, requests
609
- // may fail due to `DEADLINE_EXCEEDED` errors.
614
+ // `Include_replicas` indicates the order of replicas (as they appear in
615
+ // this list) to process the request. If `auto_failover_disabled` is set to
616
+ // `true` and all replicas are exhausted without finding a healthy replica,
617
+ // Spanner waits for a replica in the list to become available, requests
618
+ // might fail due to `DEADLINE_EXCEEDED` errors.
610
619
  IncludeReplicas include_replicas = 1;
611
620
 
612
- // Exclude_replicas indicates that specified replicas should be excluded
613
- // from serving requests. Spanner will not route requests to the replicas
621
+ // `Exclude_replicas` indicates that specified replicas should be excluded
622
+ // from serving requests. Spanner doesn't route requests to the replicas
614
623
  // in this list.
615
624
  ExcludeReplicas exclude_replicas = 2;
616
625
  }
@@ -630,7 +639,7 @@ message ExecuteSqlRequest {
630
639
 
631
640
  // This mode returns the query plan, overall execution statistics,
632
641
  // operator level execution statistics along with the results. This has a
633
- // performance overhead compared to the other modes. It is not recommended
642
+ // performance overhead compared to the other modes. It isn't recommended
634
643
  // to use this mode for production traffic.
635
644
  PROFILE = 2;
636
645
 
@@ -657,7 +666,7 @@ message ExecuteSqlRequest {
657
666
  // overrides the default optimizer version for query execution.
658
667
  //
659
668
  // The list of supported optimizer versions can be queried from
660
- // SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS.
669
+ // `SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS`.
661
670
  //
662
671
  // Executing a SQL statement with an invalid optimizer version fails with
663
672
  // an `INVALID_ARGUMENT` error.
@@ -677,13 +686,13 @@ message ExecuteSqlRequest {
677
686
  // Specifying `latest` as a value instructs Cloud Spanner to use the latest
678
687
  // generated statistics package. If not specified, Cloud Spanner uses
679
688
  // the statistics package set at the database level options, or the latest
680
- // package if the database option is not set.
689
+ // package if the database option isn't set.
681
690
  //
682
691
  // The statistics package requested by the query has to be exempt from
683
692
  // garbage collection. This can be achieved with the following DDL
684
693
  // statement:
685
694
  //
686
- // ```
695
+ // ```sql
687
696
  // ALTER STATISTICS <package_name> SET OPTIONS (allow_gc=false)
688
697
  // ```
689
698
  //
@@ -708,7 +717,7 @@ message ExecuteSqlRequest {
708
717
  // transaction with strong concurrency.
709
718
  //
710
719
  // Standard DML statements require a read-write transaction. To protect
711
- // against replays, single-use transactions are not supported. The caller
720
+ // against replays, single-use transactions are not supported. The caller
712
721
  // must either supply an existing transaction ID or begin a new transaction.
713
722
  //
714
723
  // Partitioned DML requires an existing Partitioned DML transaction ID.
@@ -724,20 +733,20 @@ message ExecuteSqlRequest {
724
733
  // to the naming requirements of identifiers as specified at
725
734
  // https://cloud.google.com/spanner/docs/lexical#identifiers.
726
735
  //
727
- // Parameters can appear anywhere that a literal value is expected. The same
736
+ // Parameters can appear anywhere that a literal value is expected. The same
728
737
  // parameter name can be used more than once, for example:
729
738
  //
730
739
  // `"WHERE id > @msg_id AND id < @msg_id + 100"`
731
740
  //
732
- // It is an error to execute a SQL statement with unbound parameters.
741
+ // It's an error to execute a SQL statement with unbound parameters.
733
742
  google.protobuf.Struct params = 4;
734
743
 
735
- // It is not always possible for Cloud Spanner to infer the right SQL type
736
- // from a JSON value. For example, values of type `BYTES` and values
744
+ // It isn't always possible for Cloud Spanner to infer the right SQL type
745
+ // from a JSON value. For example, values of type `BYTES` and values
737
746
  // of type `STRING` both appear in
738
747
  // [params][google.spanner.v1.ExecuteSqlRequest.params] as JSON strings.
739
748
  //
740
- // In these cases, `param_types` can be used to specify the exact
749
+ // In these cases, you can use `param_types` to specify the exact
741
750
  // SQL type for some or all of the SQL statement parameters. See the
742
751
  // definition of [Type][google.spanner.v1.Type] for more information
743
752
  // about SQL types.
@@ -759,20 +768,20 @@ message ExecuteSqlRequest {
759
768
  // [QueryMode.NORMAL][google.spanner.v1.ExecuteSqlRequest.QueryMode.NORMAL].
760
769
  QueryMode query_mode = 7;
761
770
 
762
- // If present, results will be restricted to the specified partition
763
- // previously created using PartitionQuery(). There must be an exact
771
+ // If present, results are restricted to the specified partition
772
+ // previously created using `PartitionQuery`. There must be an exact
764
773
  // match for the values of fields common to this message and the
765
- // PartitionQueryRequest message used to create this partition_token.
774
+ // `PartitionQueryRequest` message used to create this `partition_token`.
766
775
  bytes partition_token = 8;
767
776
 
768
777
  // A per-transaction sequence number used to identify this request. This field
769
778
  // makes each request idempotent such that if the request is received multiple
770
- // times, at most one will succeed.
779
+ // times, at most one succeeds.
771
780
  //
772
781
  // The sequence number must be monotonically increasing within the
773
782
  // transaction. If a request arrives for the first time with an out-of-order
774
- // sequence number, the transaction may be aborted. Replays of previously
775
- // handled requests will yield the same response as the first execution.
783
+ // sequence number, the transaction can be aborted. Replays of previously
784
+ // handled requests yield the same response as the first execution.
776
785
  //
777
786
  // Required for DML statements. Ignored for queries.
778
787
  int64 seqno = 9;
@@ -789,19 +798,19 @@ message ExecuteSqlRequest {
789
798
  // If this is for a partitioned query and this field is set to `true`, the
790
799
  // request is executed with Spanner Data Boost independent compute resources.
791
800
  //
792
- // If the field is set to `true` but the request does not set
801
+ // If the field is set to `true` but the request doesn't set
793
802
  // `partition_token`, the API returns an `INVALID_ARGUMENT` error.
794
803
  bool data_boost_enabled = 16;
795
804
 
796
- // Optional. If set to true, this statement marks the end of the transaction.
797
- // The transaction should be committed or aborted after this statement
798
- // executes, and attempts to execute any other requests against this
799
- // transaction (including reads and queries) will be rejected.
805
+ // Optional. If set to `true`, this statement marks the end of the
806
+ // transaction. After this statement executes, you must commit or abort the
807
+ // transaction. Attempts to execute any other requests against this
808
+ // transaction (including reads and queries) are rejected.
800
809
  //
801
- // For DML statements, setting this option may cause some error reporting to
802
- // be deferred until commit time (e.g. validation of unique constraints).
803
- // Given this, successful execution of a DML statement should not be assumed
804
- // until a subsequent Commit call completes successfully.
810
+ // For DML statements, setting this option might cause some error reporting to
811
+ // be deferred until commit time (for example, validation of unique
812
+ // constraints). Given this, successful execution of a DML statement shouldn't
813
+ // be assumed until a subsequent `Commit` call completes successfully.
805
814
  bool last_statement = 17 [(google.api.field_behavior) = OPTIONAL];
806
815
  }
807
816
 
@@ -818,16 +827,16 @@ message ExecuteBatchDmlRequest {
818
827
  // parameter name (for example, `@firstName`). Parameter names can contain
819
828
  // letters, numbers, and underscores.
820
829
  //
821
- // Parameters can appear anywhere that a literal value is expected. The
830
+ // Parameters can appear anywhere that a literal value is expected. The
822
831
  // same parameter name can be used more than once, for example:
823
832
  //
824
833
  // `"WHERE id > @msg_id AND id < @msg_id + 100"`
825
834
  //
826
- // It is an error to execute a SQL statement with unbound parameters.
835
+ // It's an error to execute a SQL statement with unbound parameters.
827
836
  google.protobuf.Struct params = 2;
828
837
 
829
- // It is not always possible for Cloud Spanner to infer the right SQL type
830
- // from a JSON value. For example, values of type `BYTES` and values
838
+ // It isn't always possible for Cloud Spanner to infer the right SQL type
839
+ // from a JSON value. For example, values of type `BYTES` and values
831
840
  // of type `STRING` both appear in
832
841
  // [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as
833
842
  // JSON strings.
@@ -862,26 +871,26 @@ message ExecuteBatchDmlRequest {
862
871
 
863
872
  // Required. A per-transaction sequence number used to identify this request.
864
873
  // This field makes each request idempotent such that if the request is
865
- // received multiple times, at most one will succeed.
874
+ // received multiple times, at most one succeeds.
866
875
  //
867
876
  // The sequence number must be monotonically increasing within the
868
877
  // transaction. If a request arrives for the first time with an out-of-order
869
- // sequence number, the transaction may be aborted. Replays of previously
870
- // handled requests will yield the same response as the first execution.
878
+ // sequence number, the transaction might be aborted. Replays of previously
879
+ // handled requests yield the same response as the first execution.
871
880
  int64 seqno = 4 [(google.api.field_behavior) = REQUIRED];
872
881
 
873
882
  // Common options for this request.
874
883
  RequestOptions request_options = 5;
875
884
 
876
- // Optional. If set to true, this request marks the end of the transaction.
877
- // The transaction should be committed or aborted after these statements
878
- // execute, and attempts to execute any other requests against this
879
- // transaction (including reads and queries) will be rejected.
885
+ // Optional. If set to `true`, this request marks the end of the transaction.
886
+ // After these statements execute, you must commit or abort the transaction.
887
+ // Attempts to execute any other requests against this transaction
888
+ // (including reads and queries) are rejected.
880
889
  //
881
- // Setting this option may cause some error reporting to be deferred until
882
- // commit time (e.g. validation of unique constraints). Given this, successful
883
- // execution of statements should not be assumed until a subsequent Commit
884
- // call completes successfully.
890
+ // Setting this option might cause some error reporting to be deferred until
891
+ // commit time (for example, validation of unique constraints). Given this,
892
+ // successful execution of statements shouldn't be assumed until a subsequent
893
+ // `Commit` call completes successfully.
885
894
  bool last_statements = 6 [(google.api.field_behavior) = OPTIONAL];
886
895
  }
887
896
 
@@ -932,36 +941,32 @@ message ExecuteBatchDmlResponse {
932
941
  // Otherwise, the error status of the first failed statement.
933
942
  google.rpc.Status status = 2;
934
943
 
935
- // Optional. A precommit token will be included if the read-write transaction
936
- // is on a multiplexed session.
937
- // The precommit token with the highest sequence number from this transaction
938
- // attempt should be passed to the
944
+ // Optional. A precommit token is included if the read-write transaction
945
+ // is on a multiplexed session. Pass the precommit token with the highest
946
+ // sequence number from this transaction attempt should be passed to the
939
947
  // [Commit][google.spanner.v1.Spanner.Commit] request for this transaction.
940
- // This feature is not yet supported and will result in an UNIMPLEMENTED
941
- // error.
942
948
  MultiplexedSessionPrecommitToken precommit_token = 3
943
949
  [(google.api.field_behavior) = OPTIONAL];
944
950
  }
945
951
 
946
- // Options for a PartitionQueryRequest and
947
- // PartitionReadRequest.
952
+ // Options for a `PartitionQueryRequest` and `PartitionReadRequest`.
948
953
  message PartitionOptions {
949
- // **Note:** This hint is currently ignored by PartitionQuery and
950
- // PartitionRead requests.
954
+ // **Note:** This hint is currently ignored by `PartitionQuery` and
955
+ // `PartitionRead` requests.
951
956
  //
952
- // The desired data size for each partition generated. The default for this
953
- // option is currently 1 GiB. This is only a hint. The actual size of each
954
- // partition may be smaller or larger than this size request.
957
+ // The desired data size for each partition generated. The default for this
958
+ // option is currently 1 GiB. This is only a hint. The actual size of each
959
+ // partition can be smaller or larger than this size request.
955
960
  int64 partition_size_bytes = 1;
956
961
 
957
- // **Note:** This hint is currently ignored by PartitionQuery and
958
- // PartitionRead requests.
962
+ // **Note:** This hint is currently ignored by `PartitionQuery` and
963
+ // `PartitionRead` requests.
959
964
  //
960
- // The desired maximum number of partitions to return. For example, this may
961
- // be set to the number of workers available. The default for this option
962
- // is currently 10,000. The maximum value is currently 200,000. This is only
963
- // a hint. The actual number of partitions returned may be smaller or larger
964
- // than this maximum count request.
965
+ // The desired maximum number of partitions to return. For example, this
966
+ // might be set to the number of workers available. The default for this
967
+ // option is currently 10,000. The maximum value is currently 200,000. This
968
+ // is only a hint. The actual number of partitions returned can be smaller or
969
+ // larger than this maximum count request.
965
970
  int64 max_partitions = 2;
966
971
  }
967
972
 
@@ -973,22 +978,23 @@ message PartitionQueryRequest {
973
978
  (google.api.resource_reference) = { type: "spanner.googleapis.com/Session" }
974
979
  ];
975
980
 
976
- // Read only snapshot transactions are supported, read/write and single use
977
- // transactions are not.
981
+ // Read-only snapshot transactions are supported, read and write and
982
+ // single-use transactions are not.
978
983
  TransactionSelector transaction = 2;
979
984
 
980
- // Required. The query request to generate partitions for. The request will
981
- // fail if the query is not root partitionable. For a query to be root
985
+ // Required. The query request to generate partitions for. The request fails
986
+ // if the query isn't root partitionable. For a query to be root
982
987
  // partitionable, it needs to satisfy a few conditions. For example, if the
983
988
  // query execution plan contains a distributed union operator, then it must be
984
989
  // the first operator in the plan. For more information about other
985
990
  // conditions, see [Read data in
986
991
  // parallel](https://cloud.google.com/spanner/docs/reads#read_data_in_parallel).
987
992
  //
988
- // The query request must not contain DML commands, such as INSERT, UPDATE, or
989
- // DELETE. Use
990
- // [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] with a
991
- // PartitionedDml transaction for large, partition-friendly DML operations.
993
+ // The query request must not contain DML commands, such as `INSERT`,
994
+ // `UPDATE`, or `DELETE`. Use
995
+ // [`ExecuteStreamingSql`][google.spanner.v1.Spanner.ExecuteStreamingSql] with
996
+ // a `PartitionedDml` transaction for large, partition-friendly DML
997
+ // operations.
992
998
  string sql = 3 [(google.api.field_behavior) = REQUIRED];
993
999
 
994
1000
  // Parameter names and values that bind to placeholders in the SQL string.
@@ -997,16 +1003,16 @@ message PartitionQueryRequest {
997
1003
  // parameter name (for example, `@firstName`). Parameter names can contain
998
1004
  // letters, numbers, and underscores.
999
1005
  //
1000
- // Parameters can appear anywhere that a literal value is expected. The same
1006
+ // Parameters can appear anywhere that a literal value is expected. The same
1001
1007
  // parameter name can be used more than once, for example:
1002
1008
  //
1003
1009
  // `"WHERE id > @msg_id AND id < @msg_id + 100"`
1004
1010
  //
1005
- // It is an error to execute a SQL statement with unbound parameters.
1011
+ // It's an error to execute a SQL statement with unbound parameters.
1006
1012
  google.protobuf.Struct params = 4;
1007
1013
 
1008
- // It is not always possible for Cloud Spanner to infer the right SQL type
1009
- // from a JSON value. For example, values of type `BYTES` and values
1014
+ // It isn't always possible for Cloud Spanner to infer the right SQL type
1015
+ // from a JSON value. For example, values of type `BYTES` and values
1010
1016
  // of type `STRING` both appear in
1011
1017
  // [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings.
1012
1018
  //
@@ -1055,7 +1061,7 @@ message PartitionReadRequest {
1055
1061
  // [key_set][google.spanner.v1.PartitionReadRequest.key_set] instead names
1056
1062
  // index keys in [index][google.spanner.v1.PartitionReadRequest.index].
1057
1063
  //
1058
- // It is not an error for the `key_set` to name rows that do not
1064
+ // It isn't an error for the `key_set` to name rows that don't
1059
1065
  // exist in the database. Read yields nothing for nonexistent rows.
1060
1066
  KeySet key_set = 6 [(google.api.field_behavior) = REQUIRED];
1061
1067
 
@@ -1066,9 +1072,9 @@ message PartitionReadRequest {
1066
1072
  // Information returned for each partition returned in a
1067
1073
  // PartitionResponse.
1068
1074
  message Partition {
1069
- // This token can be passed to Read, StreamingRead, ExecuteSql, or
1070
- // ExecuteStreamingSql requests to restrict the results to those identified by
1071
- // this partition token.
1075
+ // This token can be passed to `Read`, `StreamingRead`, `ExecuteSql`, or
1076
+ // `ExecuteStreamingSql` requests to restrict the results to those identified
1077
+ // by this partition token.
1072
1078
  bytes partition_token = 1;
1073
1079
  }
1074
1080
 
@@ -1089,13 +1095,13 @@ message ReadRequest {
1089
1095
  enum OrderBy {
1090
1096
  // Default value.
1091
1097
  //
1092
- // ORDER_BY_UNSPECIFIED is equivalent to ORDER_BY_PRIMARY_KEY.
1098
+ // `ORDER_BY_UNSPECIFIED` is equivalent to `ORDER_BY_PRIMARY_KEY`.
1093
1099
  ORDER_BY_UNSPECIFIED = 0;
1094
1100
 
1095
1101
  // Read rows are returned in primary key order.
1096
1102
  //
1097
1103
  // In the event that this option is used in conjunction with the
1098
- // `partition_token` field, the API will return an `INVALID_ARGUMENT` error.
1104
+ // `partition_token` field, the API returns an `INVALID_ARGUMENT` error.
1099
1105
  ORDER_BY_PRIMARY_KEY = 1;
1100
1106
 
1101
1107
  // Read rows are returned in any order.
@@ -1106,7 +1112,7 @@ message ReadRequest {
1106
1112
  enum LockHint {
1107
1113
  // Default value.
1108
1114
  //
1109
- // LOCK_HINT_UNSPECIFIED is equivalent to LOCK_HINT_SHARED.
1115
+ // `LOCK_HINT_UNSPECIFIED` is equivalent to `LOCK_HINT_SHARED`.
1110
1116
  LOCK_HINT_UNSPECIFIED = 0;
1111
1117
 
1112
1118
  // Acquire shared locks.
@@ -1137,8 +1143,8 @@ message ReadRequest {
1137
1143
  // serialized. Each transaction waits its turn to acquire the lock and
1138
1144
  // avoids getting into deadlock situations.
1139
1145
  //
1140
- // Because the exclusive lock hint is just a hint, it should not be
1141
- // considered equivalent to a mutex. In other words, you should not use
1146
+ // Because the exclusive lock hint is just a hint, it shouldn't be
1147
+ // considered equivalent to a mutex. In other words, you shouldn't use
1142
1148
  // Spanner exclusive locks as a mutual exclusion mechanism for the execution
1143
1149
  // of code outside of Spanner.
1144
1150
  //
@@ -1185,16 +1191,16 @@ message ReadRequest {
1185
1191
  // If the [partition_token][google.spanner.v1.ReadRequest.partition_token]
1186
1192
  // field is empty, rows are yielded in table primary key order (if
1187
1193
  // [index][google.spanner.v1.ReadRequest.index] is empty) or index key order
1188
- // (if [index][google.spanner.v1.ReadRequest.index] is non-empty). If the
1189
- // [partition_token][google.spanner.v1.ReadRequest.partition_token] field is
1190
- // not empty, rows will be yielded in an unspecified order.
1194
+ // (if [index][google.spanner.v1.ReadRequest.index] is non-empty). If the
1195
+ // [partition_token][google.spanner.v1.ReadRequest.partition_token] field
1196
+ // isn't empty, rows are yielded in an unspecified order.
1191
1197
  //
1192
- // It is not an error for the `key_set` to name rows that do not
1198
+ // It isn't an error for the `key_set` to name rows that don't
1193
1199
  // exist in the database. Read yields nothing for nonexistent rows.
1194
1200
  KeySet key_set = 6 [(google.api.field_behavior) = REQUIRED];
1195
1201
 
1196
1202
  // If greater than zero, only the first `limit` rows are yielded. If `limit`
1197
- // is zero, the default is no limit. A limit cannot be specified if
1203
+ // is zero, the default is no limit. A limit can't be specified if
1198
1204
  // `partition_token` is set.
1199
1205
  int64 limit = 8;
1200
1206
 
@@ -1206,8 +1212,8 @@ message ReadRequest {
1206
1212
  // that yielded this token.
1207
1213
  bytes resume_token = 9;
1208
1214
 
1209
- // If present, results will be restricted to the specified partition
1210
- // previously created using PartitionRead(). There must be an exact
1215
+ // If present, results are restricted to the specified partition
1216
+ // previously created using `PartitionRead`. There must be an exact
1211
1217
  // match for the values of fields common to this message and the
1212
1218
  // PartitionReadRequest message used to create this partition_token.
1213
1219
  bytes partition_token = 10;
@@ -1221,17 +1227,18 @@ message ReadRequest {
1221
1227
  // If this is for a partitioned read and this field is set to `true`, the
1222
1228
  // request is executed with Spanner Data Boost independent compute resources.
1223
1229
  //
1224
- // If the field is set to `true` but the request does not set
1230
+ // If the field is set to `true` but the request doesn't set
1225
1231
  // `partition_token`, the API returns an `INVALID_ARGUMENT` error.
1226
1232
  bool data_boost_enabled = 15;
1227
1233
 
1228
1234
  // Optional. Order for the returned rows.
1229
1235
  //
1230
- // By default, Spanner will return result rows in primary key order except for
1231
- // PartitionRead requests. For applications that do not require rows to be
1236
+ // By default, Spanner returns result rows in primary key order except for
1237
+ // PartitionRead requests. For applications that don't require rows to be
1232
1238
  // returned in primary key (`ORDER_BY_PRIMARY_KEY`) order, setting
1233
1239
  // `ORDER_BY_NO_ORDER` option allows Spanner to optimize row retrieval,
1234
- // resulting in lower latencies in certain cases (e.g. bulk point lookups).
1240
+ // resulting in lower latencies in certain cases (for example, bulk point
1241
+ // lookups).
1235
1242
  OrderBy order_by = 16 [(google.api.field_behavior) = OPTIONAL];
1236
1243
 
1237
1244
  // Optional. Lock Hint for the request, it can only be used with read-write
@@ -1253,17 +1260,15 @@ message BeginTransactionRequest {
1253
1260
 
1254
1261
  // Common options for this request.
1255
1262
  // Priority is ignored for this request. Setting the priority in this
1256
- // request_options struct will not do anything. To set the priority for a
1263
+ // `request_options` struct doesn't do anything. To set the priority for a
1257
1264
  // transaction, set it on the reads and writes that are part of this
1258
1265
  // transaction instead.
1259
1266
  RequestOptions request_options = 3;
1260
1267
 
1261
1268
  // Optional. Required for read-write transactions on a multiplexed session
1262
- // that commit mutations but do not perform any reads or queries. Clients
1263
- // should randomly select one of the mutations from the mutation set and send
1264
- // it as a part of this request.
1265
- // This feature is not yet supported and will result in an UNIMPLEMENTED
1266
- // error.
1269
+ // that commit mutations but don't perform any reads or queries. You must
1270
+ // randomly select one of the mutations from the mutation set and send it as a
1271
+ // part of this request.
1267
1272
  Mutation mutation_key = 4 [(google.api.field_behavior) = OPTIONAL];
1268
1273
  }
1269
1274
 
@@ -1285,7 +1290,7 @@ message CommitRequest {
1285
1290
  // temporary transaction is non-idempotent. That is, if the
1286
1291
  // `CommitRequest` is sent to Cloud Spanner more than once (for
1287
1292
  // instance, due to retries in the application, or in the
1288
- // transport library), it is possible that the mutations are
1293
+ // transport library), it's possible that the mutations are
1289
1294
  // executed more than once. If this is undesirable, use
1290
1295
  // [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction] and
1291
1296
  // [Commit][google.spanner.v1.Spanner.Commit] instead.
@@ -1297,16 +1302,16 @@ message CommitRequest {
1297
1302
  // this list.
1298
1303
  repeated Mutation mutations = 4;
1299
1304
 
1300
- // If `true`, then statistics related to the transaction will be included in
1305
+ // If `true`, then statistics related to the transaction is included in
1301
1306
  // the [CommitResponse][google.spanner.v1.CommitResponse.commit_stats].
1302
1307
  // Default value is `false`.
1303
1308
  bool return_commit_stats = 5;
1304
1309
 
1305
- // Optional. The amount of latency this request is willing to incur in order
1306
- // to improve throughput. If this field is not set, Spanner assumes requests
1307
- // are relatively latency sensitive and automatically determines an
1308
- // appropriate delay time. You can specify a batching delay value between 0
1309
- // and 500 ms.
1310
+ // Optional. The amount of latency this request is configured to incur in
1311
+ // order to improve throughput. If this field isn't set, Spanner assumes
1312
+ // requests are relatively latency sensitive and automatically determines an
1313
+ // appropriate delay time. You can specify a commit delay value between 0 and
1314
+ // 500 ms.
1310
1315
  google.protobuf.Duration max_commit_delay = 8
1311
1316
  [(google.api.field_behavior) = OPTIONAL];
1312
1317
 
@@ -1314,11 +1319,9 @@ message CommitRequest {
1314
1319
  RequestOptions request_options = 6;
1315
1320
 
1316
1321
  // Optional. If the read-write transaction was executed on a multiplexed
1317
- // session, the precommit token with the highest sequence number received in
1318
- // this transaction attempt, should be included here. Failing to do so will
1319
- // result in a FailedPrecondition error.
1320
- // This feature is not yet supported and will result in an UNIMPLEMENTED
1321
- // error.
1322
+ // session, then you must include the precommit token with the highest
1323
+ // sequence number received in this transaction attempt. Failing to do so
1324
+ // results in a `FailedPrecondition` error.
1322
1325
  MultiplexedSessionPrecommitToken precommit_token = 9
1323
1326
  [(google.api.field_behavior) = OPTIONAL];
1324
1327
  }
@@ -1358,18 +1361,9 @@ message BatchWriteRequest {
1358
1361
  repeated MutationGroup mutation_groups = 4
1359
1362
  [(google.api.field_behavior) = REQUIRED];
1360
1363
 
1361
- // Optional. When `exclude_txn_from_change_streams` is set to `true`:
1362
- // * Mutations from all transactions in this batch write operation will not
1363
- // be recorded in change streams with DDL option `allow_txn_exclusion=true`
1364
- // that are tracking columns modified by these transactions.
1365
- // * Mutations from all transactions in this batch write operation will be
1366
- // recorded in change streams with DDL option `allow_txn_exclusion=false or
1367
- // not set` that are tracking columns modified by these transactions.
1368
- //
1369
- // When `exclude_txn_from_change_streams` is set to `false` or not set,
1370
- // mutations from all transactions in this batch write operation will be
1371
- // recorded in all change streams that are tracking columns modified by these
1372
- // transactions.
1364
+ // Optional. If you don't set the `exclude_txn_from_change_streams` option or
1365
+ // if it's set to `false`, then any change streams monitoring columns modified
1366
+ // by transactions will capture the updates made within that transaction.
1373
1367
  bool exclude_txn_from_change_streams = 5
1374
1368
  [(google.api.field_behavior) = OPTIONAL];
1375
1369
  }