@google-cloud/spanner 8.3.1 → 8.4.0

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.
@@ -28,6 +28,7 @@ import "google/protobuf/struct.proto";
28
28
  import "google/protobuf/timestamp.proto";
29
29
  import "google/rpc/status.proto";
30
30
  import "google/spanner/v1/keys.proto";
31
+ import "google/spanner/v1/location.proto";
31
32
  import "google/spanner/v1/mutation.proto";
32
33
  import "google/spanner/v1/result_set.proto";
33
34
  import "google/spanner/v1/transaction.proto";
@@ -360,10 +361,10 @@ message BatchCreateSessionsRequest {
360
361
  // Parameters to apply to each created session.
361
362
  Session session_template = 2;
362
363
 
363
- // Required. The number of sessions to be created in this batch call.
364
- // The API can return fewer than the requested number of sessions. If a
365
- // specific number of sessions are desired, the client can make additional
366
- // calls to `BatchCreateSessions` (adjusting
364
+ // Required. The number of sessions to be created in this batch call. At least
365
+ // one session is created. The API can return fewer than the requested number
366
+ // of sessions. If a specific number of sessions are desired, the client can
367
+ // make additional calls to `BatchCreateSessions` (adjusting
367
368
  // [session_count][google.spanner.v1.BatchCreateSessionsRequest.session_count]
368
369
  // as necessary).
369
370
  int32 session_count = 3 [(google.api.field_behavior) = REQUIRED];
@@ -412,8 +413,8 @@ message Session {
412
413
  string creator_role = 5;
413
414
 
414
415
  // 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
416
+ // session for multiple, concurrent operations including any combination of
417
+ // read-only and read-write transactions. Use
417
418
  // [`sessions.create`][google.spanner.v1.Spanner.CreateSession] to create
418
419
  // multiplexed sessions. Don't use
419
420
  // [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions] to
@@ -516,6 +517,15 @@ message RequestOptions {
516
517
  PRIORITY_HIGH = 3;
517
518
  }
518
519
 
520
+ // Container for various pieces of client-owned context attached to a request.
521
+ message ClientContext {
522
+ // Optional. Map of parameter name to value for this request. These values
523
+ // will be returned by any SECURE_CONTEXT() calls invoked by this request
524
+ // (e.g., by queries against Parameterized Secure Views).
525
+ map<string, google.protobuf.Value> secure_context = 1
526
+ [(google.api.field_behavior) = OPTIONAL];
527
+ }
528
+
519
529
  // Priority for the request.
520
530
  Priority priority = 1;
521
531
 
@@ -543,6 +553,9 @@ message RequestOptions {
543
553
  // characters. Values that exceed this limit are truncated.
544
554
  // Any leading underscore (_) characters are removed from the string.
545
555
  string transaction_tag = 3;
556
+
557
+ // Optional. Optional context that may be needed for some requests.
558
+ ClientContext client_context = 4 [(google.api.field_behavior) = OPTIONAL];
546
559
  }
547
560
 
548
561
  // The `DirectedReadOptions` can be used to indicate which replicas or regions
@@ -812,6 +825,14 @@ message ExecuteSqlRequest {
812
825
  // constraints). Given this, successful execution of a DML statement shouldn't
813
826
  // be assumed until a subsequent `Commit` call completes successfully.
814
827
  bool last_statement = 17 [(google.api.field_behavior) = OPTIONAL];
828
+
829
+ // Optional. If present, it makes the Spanner requests location-aware.
830
+ //
831
+ // It gives the server hints that can be used to route the request
832
+ // to an appropriate server, potentially significantly decreasing latency and
833
+ // improving throughput. To achieve improved performance, most fields must be
834
+ // filled in with accurate values.
835
+ RoutingHint routing_hint = 18 [(google.api.field_behavior) = OPTIONAL];
815
836
  }
816
837
 
817
838
  // The request for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml].
@@ -1244,6 +1265,14 @@ message ReadRequest {
1244
1265
  // Optional. Lock Hint for the request, it can only be used with read-write
1245
1266
  // transactions.
1246
1267
  LockHint lock_hint = 17 [(google.api.field_behavior) = OPTIONAL];
1268
+
1269
+ // Optional. If present, it makes the Spanner requests location-aware.
1270
+ //
1271
+ // It gives the server hints that can be used to route the request
1272
+ // to an appropriate server, potentially significantly decreasing latency and
1273
+ // improving throughput. To achieve improved performance, most fields must be
1274
+ // filled in with accurate values.
1275
+ RoutingHint routing_hint = 18 [(google.api.field_behavior) = OPTIONAL];
1247
1276
  }
1248
1277
 
1249
1278
  // The request for
@@ -153,7 +153,9 @@ message TransactionOptions {
153
153
  bool return_read_timestamp = 6;
154
154
  }
155
155
 
156
- // `IsolationLevel` is used when setting `isolation_level` for a transaction.
156
+ // `IsolationLevel` is used when setting the [isolation
157
+ // level](https://cloud.google.com/spanner/docs/isolation-levels) for a
158
+ // transaction.
157
159
  enum IsolationLevel {
158
160
  // Default value.
159
161
  //
@@ -178,7 +180,7 @@ message TransactionOptions {
178
180
  // `SERIALIZABLE` transactions, only write-write conflicts are detected in
179
181
  // snapshot transactions.
180
182
  //
181
- // This isolation level does not support Read-only and Partitioned DML
183
+ // This isolation level does not support read-only and partitioned DML
182
184
  // transactions.
183
185
  //
184
186
  // When `REPEATABLE_READ` is specified on a read-write transaction, the