@google-cloud/spanner 7.1.0 → 7.3.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 +29 -0
- package/README.md +1 -0
- package/build/protos/google/spanner/admin/database/v1/spanner_database_admin.proto +40 -0
- package/build/protos/google/spanner/v1/spanner.proto +13 -3
- package/build/protos/google/spanner/v1/type.proto +18 -0
- package/build/protos/protos.d.ts +287 -30
- package/build/protos/protos.js +1134 -120
- package/build/protos/protos.json +116 -36
- package/build/src/common-grpc/service.js +2 -2
- package/build/src/index.d.ts +5 -0
- package/build/src/index.js +7 -1
- package/build/src/session-pool.js +2 -0
- package/build/src/transaction.d.ts +17 -1
- package/build/src/transaction.js +29 -2
- package/build/src/v1/database_admin_client.d.ts +42 -2
- package/build/src/v1/database_admin_client.js +37 -10
- package/build/src/v1/instance_admin_client.d.ts +11 -2
- package/build/src/v1/instance_admin_client.js +37 -10
- package/build/src/v1/spanner_client.d.ts +21 -5
- package/build/src/v1/spanner_client.js +43 -13
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,35 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/nodejs-spanner?activeTab=versions
|
|
6
6
|
|
|
7
|
+
## [7.3.0](https://github.com/googleapis/nodejs-spanner/compare/v7.2.0...v7.3.0) (2024-02-08)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **spanner:** Add maxCommitDelay support ([#1992](https://github.com/googleapis/nodejs-spanner/issues/1992)) ([9f84408](https://github.com/googleapis/nodejs-spanner/commit/9f8440843fd8926a37ec300a318dad33b83b4f97))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **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))
|
|
18
|
+
* **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))
|
|
19
|
+
* **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))
|
|
20
|
+
* **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))
|
|
21
|
+
|
|
22
|
+
## [7.2.0](https://github.com/googleapis/nodejs-spanner/compare/v7.1.0...v7.2.0) (2024-01-11)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* Support for Directed Reads ([#1966](https://github.com/googleapis/nodejs-spanner/issues/1966)) ([c0a4363](https://github.com/googleapis/nodejs-spanner/commit/c0a43638c81dd769cc55e021cc4cf1d93db8a72a))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* **deps:** Update dependency @google-cloud/precise-date to v4 ([#1903](https://github.com/googleapis/nodejs-spanner/issues/1903)) ([7464c8b](https://github.com/googleapis/nodejs-spanner/commit/7464c8b2412a9b718cd8981363cb982aebbe3723))
|
|
33
|
+
* **deps:** Update dependency @types/stack-trace to v0.0.33 ([#1952](https://github.com/googleapis/nodejs-spanner/issues/1952)) ([45ab751](https://github.com/googleapis/nodejs-spanner/commit/45ab751da1f0f73bc06c8b8e0007b457fa75518f))
|
|
34
|
+
* **deps:** Update dependency retry-request to v7 ([#1934](https://github.com/googleapis/nodejs-spanner/issues/1934)) ([c575c80](https://github.com/googleapis/nodejs-spanner/commit/c575c80b17e5fdf2cbba24c806fa21f26c2010dc))
|
|
35
|
+
|
|
7
36
|
## [7.1.0](https://github.com/googleapis/nodejs-spanner/compare/v7.0.0...v7.1.0) (2023-11-16)
|
|
8
37
|
|
|
9
38
|
|
package/README.md
CHANGED
|
@@ -112,6 +112,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-spanner/tre
|
|
|
112
112
|
| Updates the default leader of an existing database | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/database-update-default-leader.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/database-update-default-leader.js,samples/README.md) |
|
|
113
113
|
| Updates a Cloud Spanner Database. | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/database-update.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/database-update.js,samples/README.md) |
|
|
114
114
|
| Datatypes | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/datatypes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/datatypes.js,samples/README.md) |
|
|
115
|
+
| Runs an execute sql request with directed read options | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/directed-reads.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/directed-reads.js,samples/README.md) |
|
|
115
116
|
| Delete using DML returning. | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/dml-returning-delete.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/dml-returning-delete.js,samples/README.md) |
|
|
116
117
|
| Insert using DML returning. | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/dml-returning-insert.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/dml-returning-insert.js,samples/README.md) |
|
|
117
118
|
| Update using DML returning. | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/dml-returning-update.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/dml-returning-update.js,samples/README.md) |
|
|
@@ -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";
|
|
@@ -927,9 +928,10 @@ message PartitionQueryRequest {
|
|
|
927
928
|
|
|
928
929
|
// Required. The query request to generate partitions for. The request will
|
|
929
930
|
// 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
|
|
931
|
-
//
|
|
932
|
-
// For more information about other
|
|
931
|
+
// partitionable, it needs to satisfy a few conditions. For example, if the
|
|
932
|
+
// query execution plan contains a distributed union operator, then it must be
|
|
933
|
+
// the first operator in the plan. For more information about other
|
|
934
|
+
// conditions, see [Read data in
|
|
933
935
|
// parallel](https://cloud.google.com/spanner/docs/reads#read_data_in_parallel).
|
|
934
936
|
//
|
|
935
937
|
// The query request must not contain DML commands, such as INSERT, UPDATE, or
|
|
@@ -1163,6 +1165,14 @@ message CommitRequest {
|
|
|
1163
1165
|
// Default value is `false`.
|
|
1164
1166
|
bool return_commit_stats = 5;
|
|
1165
1167
|
|
|
1168
|
+
// Optional. The amount of latency this request is willing to incur in order
|
|
1169
|
+
// to improve throughput. If this field is not set, Spanner assumes requests
|
|
1170
|
+
// are relatively latency sensitive and automatically determines an
|
|
1171
|
+
// appropriate delay time. You can specify a batching delay value between 0
|
|
1172
|
+
// and 500 ms.
|
|
1173
|
+
google.protobuf.Duration max_commit_delay = 8
|
|
1174
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1175
|
+
|
|
1166
1176
|
// Common options for this request.
|
|
1167
1177
|
RequestOptions request_options = 6;
|
|
1168
1178
|
}
|
|
@@ -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
|