@google-cloud/spanner 7.2.0 → 7.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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,36 @@
4
4
 
5
5
  [1]: https://www.npmjs.com/package/nodejs-spanner?activeTab=versions
6
6
 
7
+ ## [7.4.0](https://github.com/googleapis/nodejs-spanner/compare/v7.3.0...v7.4.0) (2024-02-23)
8
+
9
+
10
+ ### Features
11
+
12
+ * **spanner:** Add PG.OID support ([#1948](https://github.com/googleapis/nodejs-spanner/issues/1948)) ([cf9df7a](https://github.com/googleapis/nodejs-spanner/commit/cf9df7a54c21ac995bbea9ad82c3544e4aff41b6))
13
+ * Untyped param types ([#1869](https://github.com/googleapis/nodejs-spanner/issues/1869)) ([6ef44c3](https://github.com/googleapis/nodejs-spanner/commit/6ef44c383a90bf6ae95de531c83e21d2d58da159))
14
+ * Update TransactionOptions to include new option exclude_txn_from_change_streams ([#1998](https://github.com/googleapis/nodejs-spanner/issues/1998)) ([937a7a1](https://github.com/googleapis/nodejs-spanner/commit/937a7a13f8c7660e21d34ebbaecad426b2bacd99))
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **deps:** Update dependency google-gax to v4.3.1 ([#1995](https://github.com/googleapis/nodejs-spanner/issues/1995)) ([bed4832](https://github.com/googleapis/nodejs-spanner/commit/bed4832445e72c7116fe5495c79d989664220b38))
20
+ * Only reset pending value with resume token ([#2000](https://github.com/googleapis/nodejs-spanner/issues/2000)) ([f337089](https://github.com/googleapis/nodejs-spanner/commit/f337089567d7d92c9467e311be7d72b0a7dc8047)), closes [#1959](https://github.com/googleapis/nodejs-spanner/issues/1959)
21
+
22
+ ## [7.3.0](https://github.com/googleapis/nodejs-spanner/compare/v7.2.0...v7.3.0) (2024-02-08)
23
+
24
+
25
+ ### Features
26
+
27
+ * **spanner:** Add maxCommitDelay support ([#1992](https://github.com/googleapis/nodejs-spanner/issues/1992)) ([9f84408](https://github.com/googleapis/nodejs-spanner/commit/9f8440843fd8926a37ec300a318dad33b83b4f97))
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * **deps:** Update dependency google-gax to v4.1.0 ([#1981](https://github.com/googleapis/nodejs-spanner/issues/1981)) ([2a36150](https://github.com/googleapis/nodejs-spanner/commit/2a36150cb61e9abeef073724189cc651d29d8776))
33
+ * **deps:** Update dependency google-gax to v4.2.0 ([#1988](https://github.com/googleapis/nodejs-spanner/issues/1988)) ([005589a](https://github.com/googleapis/nodejs-spanner/commit/005589a7727ee87948a55a6c7710f5150fc1c6a7))
34
+ * **deps:** Update dependency google-gax to v4.2.1 ([#1989](https://github.com/googleapis/nodejs-spanner/issues/1989)) ([d2ae995](https://github.com/googleapis/nodejs-spanner/commit/d2ae9952e7449ce2321e69a6be36c9d50d863095))
35
+ * **deps:** Update dependency google-gax to v4.3.0 ([#1990](https://github.com/googleapis/nodejs-spanner/issues/1990)) ([e625753](https://github.com/googleapis/nodejs-spanner/commit/e625753a37393f32d9e449aa7324763082f6c923))
36
+
7
37
  ## [7.2.0](https://github.com/googleapis/nodejs-spanner/compare/v7.1.0...v7.2.0) (2024-01-11)
8
38
 
9
39
 
@@ -572,6 +572,23 @@ message CreateDatabaseRequest {
572
572
 
573
573
  // Optional. The dialect of the Cloud Spanner Database.
574
574
  DatabaseDialect database_dialect = 5 [(google.api.field_behavior) = OPTIONAL];
575
+
576
+ // Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements in
577
+ // 'extra_statements' above.
578
+ // Contains a protobuf-serialized
579
+ // [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto).
580
+ // To generate it, [install](https://grpc.io/docs/protoc-installation/) and
581
+ // run `protoc` with --include_imports and --descriptor_set_out. For example,
582
+ // to generate for moon/shot/app.proto, run
583
+ // ```
584
+ // $protoc --proto_path=/app_path --proto_path=/lib_path \
585
+ // --include_imports \
586
+ // --descriptor_set_out=descriptors.data \
587
+ // moon/shot/app.proto
588
+ // ```
589
+ // For more details, see protobuffer [self
590
+ // description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
591
+ bytes proto_descriptors = 6 [(google.api.field_behavior) = OPTIONAL];
575
592
  }
576
593
 
577
594
  // Metadata type for the operation returned by
@@ -674,6 +691,22 @@ message UpdateDatabaseDdlRequest {
674
691
  // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns
675
692
  // `ALREADY_EXISTS`.
676
693
  string operation_id = 3;
694
+
695
+ // Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements.
696
+ // Contains a protobuf-serialized
697
+ // [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto).
698
+ // To generate it, [install](https://grpc.io/docs/protoc-installation/) and
699
+ // run `protoc` with --include_imports and --descriptor_set_out. For example,
700
+ // to generate for moon/shot/app.proto, run
701
+ // ```
702
+ // $protoc --proto_path=/app_path --proto_path=/lib_path \
703
+ // --include_imports \
704
+ // --descriptor_set_out=descriptors.data \
705
+ // moon/shot/app.proto
706
+ // ```
707
+ // For more details, see protobuffer [self
708
+ // description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
709
+ bytes proto_descriptors = 4 [(google.api.field_behavior) = OPTIONAL];
677
710
  }
678
711
 
679
712
  // Action information extracted from a DDL statement. This proto is used to
@@ -762,6 +795,13 @@ message GetDatabaseDdlResponse {
762
795
  // A list of formatted DDL statements defining the schema of the database
763
796
  // specified in the request.
764
797
  repeated string statements = 1;
798
+
799
+ // Proto descriptors stored in the database.
800
+ // Contains a protobuf-serialized
801
+ // [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto).
802
+ // For more details, see protobuffer [self
803
+ // description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
804
+ bytes proto_descriptors = 2;
765
805
  }
766
806
 
767
807
  // The request for
@@ -22,6 +22,7 @@ import "google/api/annotations.proto";
22
22
  import "google/api/client.proto";
23
23
  import "google/api/field_behavior.proto";
24
24
  import "google/api/resource.proto";
25
+ import "google/protobuf/duration.proto";
25
26
  import "google/protobuf/empty.proto";
26
27
  import "google/protobuf/struct.proto";
27
28
  import "google/protobuf/timestamp.proto";
@@ -401,6 +402,15 @@ message Session {
401
402
 
402
403
  // The database role which created this session.
403
404
  string creator_role = 5;
405
+
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.
413
+ bool multiplexed = 6 [(google.api.field_behavior) = OPTIONAL];
404
414
  }
405
415
 
406
416
  // The request for [GetSession][google.spanner.v1.Spanner.GetSession].
@@ -545,7 +555,7 @@ message DirectedReadOptions {
545
555
  // * `location:us-east1` --> The "us-east1" replica(s) of any available type
546
556
  // will be used to process the request.
547
557
  // * `type:READ_ONLY` --> The "READ_ONLY" type replica(s) in nearest
548
- // . available location will be used to process the
558
+ // available location will be used to process the
549
559
  // request.
550
560
  // * `location:us-east1 type:READ_ONLY` --> The "READ_ONLY" type replica(s)
551
561
  // in location "us-east1" will be used to process
@@ -589,8 +599,7 @@ message DirectedReadOptions {
589
599
  repeated ReplicaSelection replica_selections = 1;
590
600
  }
591
601
 
592
- // Required. Replicas indicates the order in which replicas should be
593
- // considered. At most one of either include_replicas or exclude_replicas
602
+ // Required. At most one of either include_replicas or exclude_replicas
594
603
  // should be present in the message.
595
604
  oneof replicas {
596
605
  // Include_replicas indicates the order of replicas (as they appear in
@@ -600,8 +609,9 @@ message DirectedReadOptions {
600
609
  // may fail due to `DEADLINE_EXCEEDED` errors.
601
610
  IncludeReplicas include_replicas = 1;
602
611
 
603
- // Exclude_replicas indicates that should be excluded from serving
604
- // requests. Spanner will not route requests to the replicas in this list.
612
+ // Exclude_replicas indicates that specified replicas should be excluded
613
+ // from serving requests. Spanner will not route requests to the replicas
614
+ // in this list.
605
615
  ExcludeReplicas exclude_replicas = 2;
606
616
  }
607
617
  }
@@ -927,9 +937,10 @@ message PartitionQueryRequest {
927
937
 
928
938
  // Required. The query request to generate partitions for. The request will
929
939
  // fail if the query is not root partitionable. For a query to be root
930
- // partitionable, it needs to satisfy a few conditions. For example, the first
931
- // operator in the query execution plan must be a distributed union operator.
932
- // For more information about other conditions, see [Read data in
940
+ // partitionable, it needs to satisfy a few conditions. For example, if the
941
+ // query execution plan contains a distributed union operator, then it must be
942
+ // the first operator in the plan. For more information about other
943
+ // conditions, see [Read data in
933
944
  // parallel](https://cloud.google.com/spanner/docs/reads#read_data_in_parallel).
934
945
  //
935
946
  // The query request must not contain DML commands, such as INSERT, UPDATE, or
@@ -1163,6 +1174,14 @@ message CommitRequest {
1163
1174
  // Default value is `false`.
1164
1175
  bool return_commit_stats = 5;
1165
1176
 
1177
+ // Optional. The amount of latency this request is willing to incur in order
1178
+ // to improve throughput. If this field is not set, Spanner assumes requests
1179
+ // are relatively latency sensitive and automatically determines an
1180
+ // appropriate delay time. You can specify a batching delay value between 0
1181
+ // and 500 ms.
1182
+ google.protobuf.Duration max_commit_delay = 8
1183
+ [(google.api.field_behavior) = OPTIONAL];
1184
+
1166
1185
  // Common options for this request.
1167
1186
  RequestOptions request_options = 6;
1168
1187
  }
@@ -1201,6 +1220,21 @@ message BatchWriteRequest {
1201
1220
  // Required. The groups of mutations to be applied.
1202
1221
  repeated MutationGroup mutation_groups = 4
1203
1222
  [(google.api.field_behavior) = REQUIRED];
1223
+
1224
+ // Optional. When `exclude_txn_from_change_streams` is set to `true`:
1225
+ // * Mutations from all transactions in this batch write operation will not
1226
+ // be recorded in change streams with DDL option `allow_txn_exclusion=true`
1227
+ // that are tracking columns modified by these transactions.
1228
+ // * Mutations from all transactions in this batch write operation will be
1229
+ // recorded in change streams with DDL option `allow_txn_exclusion=false or
1230
+ // not set` that are tracking columns modified by these transactions.
1231
+ //
1232
+ // When `exclude_txn_from_change_streams` is set to `false` or not set,
1233
+ // mutations from all transactions in this batch write operation will be
1234
+ // recorded in all change streams that are tracking columns modified by these
1235
+ // transactions.
1236
+ bool exclude_txn_from_change_streams = 5
1237
+ [(google.api.field_behavior) = OPTIONAL];
1204
1238
  }
1205
1239
 
1206
1240
  // The result of applying a batch of mutations.
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2023 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -475,6 +475,22 @@ message TransactionOptions {
475
475
  // on the `session` resource.
476
476
  ReadOnly read_only = 2;
477
477
  }
478
+
479
+ // When `exclude_txn_from_change_streams` is set to `true`:
480
+ // * Mutations from this transaction will not be recorded in change streams
481
+ // with DDL option `allow_txn_exclusion=true` that are tracking columns
482
+ // modified by these transactions.
483
+ // * Mutations from this transaction will be recorded in change streams with
484
+ // DDL option `allow_txn_exclusion=false or not set` that are tracking
485
+ // columns modified by these transactions.
486
+ //
487
+ // When `exclude_txn_from_change_streams` is set to `false` or not set,
488
+ // mutations from this transaction will be recorded in all change streams that
489
+ // are tracking columns modified by these transactions.
490
+ // `exclude_txn_from_change_streams` may only be specified for read-write or
491
+ // partitioned-dml transactions, otherwise the API will return an
492
+ // `INVALID_ARGUMENT` error.
493
+ bool exclude_txn_from_change_streams = 5;
478
494
  }
479
495
 
480
496
  // A transaction.
@@ -47,6 +47,13 @@ message Type {
47
47
  // typically is not needed to process the content of a value (it doesn't
48
48
  // affect serialization) and clients can ignore it on the read path.
49
49
  TypeAnnotationCode type_annotation = 4;
50
+
51
+ // If [code][google.spanner.v1.Type.code] ==
52
+ // [PROTO][google.spanner.v1.TypeCode.PROTO] or
53
+ // [code][google.spanner.v1.Type.code] ==
54
+ // [ENUM][google.spanner.v1.TypeCode.ENUM], then `proto_type_fqn` is the fully
55
+ // qualified name of the proto type representing the proto/enum definition.
56
+ string proto_type_fqn = 5;
50
57
  }
51
58
 
52
59
  // `StructType` defines the fields of a [STRUCT][google.spanner.v1.TypeCode.STRUCT] type.
@@ -96,6 +103,10 @@ enum TypeCode {
96
103
  // `"-Infinity"`.
97
104
  FLOAT64 = 3;
98
105
 
106
+ // Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or
107
+ // `"-Infinity"`.
108
+ FLOAT32 = 15;
109
+
99
110
  // Encoded as `string` in RFC 3339 timestamp format. The time zone
100
111
  // must be present, and must be `"Z"`.
101
112
  //
@@ -145,6 +156,13 @@ enum TypeCode {
145
156
  // preserved.
146
157
  // - JSON array elements will have their order preserved.
147
158
  JSON = 11;
159
+
160
+ // Encoded as a base64-encoded `string`, as described in RFC 4648,
161
+ // section 4.
162
+ PROTO = 13;
163
+
164
+ // Encoded as `string`, in decimal format.
165
+ ENUM = 14;
148
166
  }
149
167
 
150
168
  // `TypeAnnotationCode` is used as a part of [Type][google.spanner.v1.Type] to