@google-cloud/spanner 8.6.0 → 8.7.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/README.md +2 -0
- package/build/protos/google/spanner/executor/v1/cloud_executor.proto +88 -4
- package/build/protos/google/spanner/v1/change_stream.proto +1 -1
- package/build/protos/google/spanner/v1/commit_response.proto +1 -1
- package/build/protos/google/spanner/v1/keys.proto +1 -1
- package/build/protos/google/spanner/v1/location.proto +1 -1
- package/build/protos/google/spanner/v1/mutation.proto +1 -1
- package/build/protos/google/spanner/v1/query_plan.proto +1 -1
- package/build/protos/google/spanner/v1/result_set.proto +9 -1
- package/build/protos/google/spanner/v1/spanner.proto +17 -10
- package/build/protos/google/spanner/v1/transaction.proto +1 -1
- package/build/protos/google/spanner/v1/type.proto +1 -1
- package/build/protos/protos.d.ts +322 -2
- package/build/protos/protos.js +1099 -5
- package/build/protos/protos.json +143 -4
- package/build/src/database.d.ts +1 -0
- package/build/src/metrics/interceptor.js +1 -3
- package/build/src/v1/spanner_client.d.ts +7 -6
- package/package.json +29 -8
package/build/protos/protos.json
CHANGED
|
@@ -5739,7 +5739,8 @@
|
|
|
5739
5739
|
"generateDbPartitionsQuery",
|
|
5740
5740
|
"executePartition",
|
|
5741
5741
|
"executeChangeStreamQuery",
|
|
5742
|
-
"queryCancellation"
|
|
5742
|
+
"queryCancellation",
|
|
5743
|
+
"adaptMessage"
|
|
5743
5744
|
]
|
|
5744
5745
|
}
|
|
5745
5746
|
},
|
|
@@ -5819,6 +5820,10 @@
|
|
|
5819
5820
|
"queryCancellation": {
|
|
5820
5821
|
"type": "QueryCancellationAction",
|
|
5821
5822
|
"id": 51
|
|
5823
|
+
},
|
|
5824
|
+
"adaptMessage": {
|
|
5825
|
+
"type": "AdaptMessageAction",
|
|
5826
|
+
"id": 52
|
|
5822
5827
|
}
|
|
5823
5828
|
}
|
|
5824
5829
|
},
|
|
@@ -5894,6 +5899,11 @@
|
|
|
5894
5899
|
"oneof": [
|
|
5895
5900
|
"autocommitIfSupported"
|
|
5896
5901
|
]
|
|
5902
|
+
},
|
|
5903
|
+
"_lastStatement": {
|
|
5904
|
+
"oneof": [
|
|
5905
|
+
"lastStatement"
|
|
5906
|
+
]
|
|
5897
5907
|
}
|
|
5898
5908
|
},
|
|
5899
5909
|
"fields": {
|
|
@@ -5907,15 +5917,36 @@
|
|
|
5907
5917
|
"options": {
|
|
5908
5918
|
"proto3_optional": true
|
|
5909
5919
|
}
|
|
5920
|
+
},
|
|
5921
|
+
"lastStatement": {
|
|
5922
|
+
"type": "bool",
|
|
5923
|
+
"id": 3,
|
|
5924
|
+
"options": {
|
|
5925
|
+
"proto3_optional": true
|
|
5926
|
+
}
|
|
5910
5927
|
}
|
|
5911
5928
|
}
|
|
5912
5929
|
},
|
|
5913
5930
|
"BatchDmlAction": {
|
|
5931
|
+
"oneofs": {
|
|
5932
|
+
"_lastStatements": {
|
|
5933
|
+
"oneof": [
|
|
5934
|
+
"lastStatements"
|
|
5935
|
+
]
|
|
5936
|
+
}
|
|
5937
|
+
},
|
|
5914
5938
|
"fields": {
|
|
5915
5939
|
"updates": {
|
|
5916
5940
|
"rule": "repeated",
|
|
5917
5941
|
"type": "QueryAction",
|
|
5918
5942
|
"id": 1
|
|
5943
|
+
},
|
|
5944
|
+
"lastStatements": {
|
|
5945
|
+
"type": "bool",
|
|
5946
|
+
"id": 2,
|
|
5947
|
+
"options": {
|
|
5948
|
+
"proto3_optional": true
|
|
5949
|
+
}
|
|
5919
5950
|
}
|
|
5920
5951
|
}
|
|
5921
5952
|
},
|
|
@@ -6325,6 +6356,26 @@
|
|
|
6325
6356
|
"optimistic": {
|
|
6326
6357
|
"type": "bool",
|
|
6327
6358
|
"id": 1
|
|
6359
|
+
},
|
|
6360
|
+
"excludeFromChangeStreams": {
|
|
6361
|
+
"type": "bool",
|
|
6362
|
+
"id": 2
|
|
6363
|
+
},
|
|
6364
|
+
"serializableOptimistic": {
|
|
6365
|
+
"type": "bool",
|
|
6366
|
+
"id": 3
|
|
6367
|
+
},
|
|
6368
|
+
"snapshotIsolationOptimistic": {
|
|
6369
|
+
"type": "bool",
|
|
6370
|
+
"id": 4
|
|
6371
|
+
},
|
|
6372
|
+
"snapshotIsolationPessimistic": {
|
|
6373
|
+
"type": "bool",
|
|
6374
|
+
"id": 5
|
|
6375
|
+
},
|
|
6376
|
+
"excludeTxnFromChangeStreams": {
|
|
6377
|
+
"type": "bool",
|
|
6378
|
+
"id": 6
|
|
6328
6379
|
}
|
|
6329
6380
|
}
|
|
6330
6381
|
},
|
|
@@ -6376,7 +6427,8 @@
|
|
|
6376
6427
|
"listCloudBackupOperations",
|
|
6377
6428
|
"getOperation",
|
|
6378
6429
|
"cancelOperation",
|
|
6379
|
-
"changeQuorumCloudDatabase"
|
|
6430
|
+
"changeQuorumCloudDatabase",
|
|
6431
|
+
"addSplitPoints"
|
|
6380
6432
|
]
|
|
6381
6433
|
}
|
|
6382
6434
|
},
|
|
@@ -6492,6 +6544,10 @@
|
|
|
6492
6544
|
"changeQuorumCloudDatabase": {
|
|
6493
6545
|
"type": "ChangeQuorumCloudDatabaseAction",
|
|
6494
6546
|
"id": 28
|
|
6547
|
+
},
|
|
6548
|
+
"addSplitPoints": {
|
|
6549
|
+
"type": "AddSplitPointsAction",
|
|
6550
|
+
"id": 29
|
|
6495
6551
|
}
|
|
6496
6552
|
}
|
|
6497
6553
|
},
|
|
@@ -6661,6 +6717,10 @@
|
|
|
6661
6717
|
"keyType": "string",
|
|
6662
6718
|
"type": "string",
|
|
6663
6719
|
"id": 5
|
|
6720
|
+
},
|
|
6721
|
+
"edition": {
|
|
6722
|
+
"type": "google.spanner.admin.instance.v1.Instance.Edition",
|
|
6723
|
+
"id": 8
|
|
6664
6724
|
}
|
|
6665
6725
|
}
|
|
6666
6726
|
},
|
|
@@ -6728,6 +6788,10 @@
|
|
|
6728
6788
|
"keyType": "string",
|
|
6729
6789
|
"type": "string",
|
|
6730
6790
|
"id": 6
|
|
6791
|
+
},
|
|
6792
|
+
"edition": {
|
|
6793
|
+
"type": "google.spanner.admin.instance.v1.Instance.Edition",
|
|
6794
|
+
"id": 8
|
|
6731
6795
|
}
|
|
6732
6796
|
}
|
|
6733
6797
|
},
|
|
@@ -6892,6 +6956,35 @@
|
|
|
6892
6956
|
}
|
|
6893
6957
|
}
|
|
6894
6958
|
},
|
|
6959
|
+
"AdaptMessageAction": {
|
|
6960
|
+
"fields": {
|
|
6961
|
+
"databaseUri": {
|
|
6962
|
+
"type": "string",
|
|
6963
|
+
"id": 1
|
|
6964
|
+
},
|
|
6965
|
+
"protocol": {
|
|
6966
|
+
"type": "string",
|
|
6967
|
+
"id": 2
|
|
6968
|
+
},
|
|
6969
|
+
"payload": {
|
|
6970
|
+
"type": "bytes",
|
|
6971
|
+
"id": 3
|
|
6972
|
+
},
|
|
6973
|
+
"attachments": {
|
|
6974
|
+
"keyType": "string",
|
|
6975
|
+
"type": "string",
|
|
6976
|
+
"id": 4
|
|
6977
|
+
},
|
|
6978
|
+
"query": {
|
|
6979
|
+
"type": "string",
|
|
6980
|
+
"id": 5
|
|
6981
|
+
},
|
|
6982
|
+
"prepareThenExecute": {
|
|
6983
|
+
"type": "bool",
|
|
6984
|
+
"id": 6
|
|
6985
|
+
}
|
|
6986
|
+
}
|
|
6987
|
+
},
|
|
6895
6988
|
"ListCloudDatabasesAction": {
|
|
6896
6989
|
"fields": {
|
|
6897
6990
|
"projectId": {
|
|
@@ -7241,6 +7334,27 @@
|
|
|
7241
7334
|
}
|
|
7242
7335
|
}
|
|
7243
7336
|
},
|
|
7337
|
+
"AddSplitPointsAction": {
|
|
7338
|
+
"fields": {
|
|
7339
|
+
"projectId": {
|
|
7340
|
+
"type": "string",
|
|
7341
|
+
"id": 1
|
|
7342
|
+
},
|
|
7343
|
+
"instanceId": {
|
|
7344
|
+
"type": "string",
|
|
7345
|
+
"id": 2
|
|
7346
|
+
},
|
|
7347
|
+
"databaseId": {
|
|
7348
|
+
"type": "string",
|
|
7349
|
+
"id": 3
|
|
7350
|
+
},
|
|
7351
|
+
"splitPoints": {
|
|
7352
|
+
"rule": "repeated",
|
|
7353
|
+
"type": "google.spanner.admin.database.v1.SplitPoints",
|
|
7354
|
+
"id": 4
|
|
7355
|
+
}
|
|
7356
|
+
}
|
|
7357
|
+
},
|
|
7244
7358
|
"StartBatchTransactionAction": {
|
|
7245
7359
|
"oneofs": {
|
|
7246
7360
|
"param": {
|
|
@@ -7495,6 +7609,11 @@
|
|
|
7495
7609
|
"oneof": [
|
|
7496
7610
|
"adminResult"
|
|
7497
7611
|
]
|
|
7612
|
+
},
|
|
7613
|
+
"_snapshotIsolationTxnReadTimestamp": {
|
|
7614
|
+
"oneof": [
|
|
7615
|
+
"snapshotIsolationTxnReadTimestamp"
|
|
7616
|
+
]
|
|
7498
7617
|
}
|
|
7499
7618
|
},
|
|
7500
7619
|
"fields": {
|
|
@@ -7561,6 +7680,13 @@
|
|
|
7561
7680
|
"rule": "repeated",
|
|
7562
7681
|
"type": "ChangeStreamRecord",
|
|
7563
7682
|
"id": 10
|
|
7683
|
+
},
|
|
7684
|
+
"snapshotIsolationTxnReadTimestamp": {
|
|
7685
|
+
"type": "int64",
|
|
7686
|
+
"id": 11,
|
|
7687
|
+
"options": {
|
|
7688
|
+
"proto3_optional": true
|
|
7689
|
+
}
|
|
7564
7690
|
}
|
|
7565
7691
|
}
|
|
7566
7692
|
},
|
|
@@ -8743,12 +8869,18 @@
|
|
|
8743
8869
|
},
|
|
8744
8870
|
"params": {
|
|
8745
8871
|
"type": "google.protobuf.Struct",
|
|
8746
|
-
"id": 4
|
|
8872
|
+
"id": 4,
|
|
8873
|
+
"options": {
|
|
8874
|
+
"(google.api.field_behavior)": "OPTIONAL"
|
|
8875
|
+
}
|
|
8747
8876
|
},
|
|
8748
8877
|
"paramTypes": {
|
|
8749
8878
|
"keyType": "string",
|
|
8750
8879
|
"type": "Type",
|
|
8751
|
-
"id": 5
|
|
8880
|
+
"id": 5,
|
|
8881
|
+
"options": {
|
|
8882
|
+
"(google.api.field_behavior)": "OPTIONAL"
|
|
8883
|
+
}
|
|
8752
8884
|
},
|
|
8753
8885
|
"partitionOptions": {
|
|
8754
8886
|
"type": "PartitionOptions",
|
|
@@ -9848,6 +9980,13 @@
|
|
|
9848
9980
|
"options": {
|
|
9849
9981
|
"(google.api.field_behavior)": "OPTIONAL"
|
|
9850
9982
|
}
|
|
9983
|
+
},
|
|
9984
|
+
"cacheUpdate": {
|
|
9985
|
+
"type": "CacheUpdate",
|
|
9986
|
+
"id": 6,
|
|
9987
|
+
"options": {
|
|
9988
|
+
"(google.api.field_behavior)": "OPTIONAL"
|
|
9989
|
+
}
|
|
9851
9990
|
}
|
|
9852
9991
|
}
|
|
9853
9992
|
},
|
package/build/src/database.d.ts
CHANGED
|
@@ -1198,6 +1198,7 @@ declare class Database extends common.GrpcServiceObject {
|
|
|
1198
1198
|
*/
|
|
1199
1199
|
getTransaction(optionsOrCallback?: GetTransactionOptions): Promise<[Transaction]>;
|
|
1200
1200
|
getTransaction(callback: GetTransactionCallback): void;
|
|
1201
|
+
getTransaction(options: GetTransactionOptions, callback: GetTransactionCallback): void;
|
|
1201
1202
|
/**
|
|
1202
1203
|
* Query object for listing database operations.
|
|
1203
1204
|
*
|
|
@@ -72,9 +72,7 @@ const MetricInterceptor = (options, nextCall) => {
|
|
|
72
72
|
metricsTracer?.recordAfeLatency(status.code);
|
|
73
73
|
}
|
|
74
74
|
else {
|
|
75
|
-
|
|
76
|
-
// currently.
|
|
77
|
-
// metricsTracer?.recordAfeConnectivityErrorCount(status.code);
|
|
75
|
+
metricsTracer?.recordAfeConnectivityErrorCount(status.code);
|
|
78
76
|
}
|
|
79
77
|
},
|
|
80
78
|
};
|
|
@@ -718,8 +718,9 @@ export declare class SpannerClient {
|
|
|
718
718
|
* {@link protos.google.spanner.v1.Spanner.ExecuteStreamingSql|`ExecuteStreamingSql`} with
|
|
719
719
|
* a `PartitionedDml` transaction for large, partition-friendly DML
|
|
720
720
|
* operations.
|
|
721
|
-
* @param {google.protobuf.Struct} request.params
|
|
722
|
-
* Parameter names and values that bind to placeholders in the SQL
|
|
721
|
+
* @param {google.protobuf.Struct} [request.params]
|
|
722
|
+
* Optional. Parameter names and values that bind to placeholders in the SQL
|
|
723
|
+
* string.
|
|
723
724
|
*
|
|
724
725
|
* A parameter placeholder consists of the `@` character followed by the
|
|
725
726
|
* parameter name (for example, `@firstName`). Parameter names can contain
|
|
@@ -731,10 +732,10 @@ export declare class SpannerClient {
|
|
|
731
732
|
* `"WHERE id > @msg_id AND id < @msg_id + 100"`
|
|
732
733
|
*
|
|
733
734
|
* It's an error to execute a SQL statement with unbound parameters.
|
|
734
|
-
* @param {number[]} request.paramTypes
|
|
735
|
-
* It isn't always possible for Cloud Spanner to infer the right SQL
|
|
736
|
-
* from a JSON value. For example, values of type `BYTES` and values
|
|
737
|
-
*
|
|
735
|
+
* @param {number[]} [request.paramTypes]
|
|
736
|
+
* Optional. It isn't always possible for Cloud Spanner to infer the right SQL
|
|
737
|
+
* type from a JSON value. For example, values of type `BYTES` and values of
|
|
738
|
+
* type `STRING` both appear in
|
|
738
739
|
* {@link protos.google.spanner.v1.PartitionQueryRequest.params|params} as JSON strings.
|
|
739
740
|
*
|
|
740
741
|
* In these cases, `param_types` can be used to specify the exact
|
package/package.json
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@google-cloud/spanner",
|
|
3
3
|
"description": "Cloud Spanner Client Library for Node.js",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.7.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Google Inc.",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=18"
|
|
9
9
|
},
|
|
10
|
-
"repository":
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"directory": "handwritten/spanner",
|
|
13
|
+
"url": "https://github.com/googleapis/google-cloud-node.git"
|
|
14
|
+
},
|
|
11
15
|
"main": "./build/src/index.js",
|
|
12
16
|
"types": "./build/src/index.d.ts",
|
|
13
17
|
"files": [
|
|
@@ -54,6 +58,9 @@
|
|
|
54
58
|
"coverage": "c8 mocha build/test build/test/common && c8 report --check-coverage"
|
|
55
59
|
},
|
|
56
60
|
"dependencies": {
|
|
61
|
+
"@babel/core": "7.27.7",
|
|
62
|
+
"@babel/helpers": "7.27.6",
|
|
63
|
+
"@babel/traverse": "7.27.7",
|
|
57
64
|
"@google-cloud/common": "^6.0.0",
|
|
58
65
|
"@google-cloud/monitoring": "^5.0.0",
|
|
59
66
|
"@google-cloud/opentelemetry-resource-util": "^2.4.0",
|
|
@@ -88,14 +95,13 @@
|
|
|
88
95
|
"stream-events": "^1.0.5",
|
|
89
96
|
"teeny-request": "^10.0.0",
|
|
90
97
|
"through2": "^4.0.2",
|
|
91
|
-
"@babel/traverse": "7.27.7",
|
|
92
|
-
"@babel/core": "7.27.7",
|
|
93
|
-
"@babel/helpers": "7.27.6",
|
|
94
98
|
"uuid": "^11.1.0"
|
|
95
99
|
},
|
|
96
100
|
"devDependencies": {
|
|
101
|
+
"@grpc/reflection": "^1.0.4",
|
|
97
102
|
"@opentelemetry/sdk-trace-base": "^2.0.0",
|
|
98
103
|
"@opentelemetry/sdk-trace-node": "^2.0.0",
|
|
104
|
+
"@opentelemetry/exporter-trace-otlp-grpc": "^0.57.0",
|
|
99
105
|
"@types/concat-stream": "^2.0.3",
|
|
100
106
|
"@types/extend": "^3.0.4",
|
|
101
107
|
"@types/is": "^0.0.25",
|
|
@@ -104,10 +110,12 @@
|
|
|
104
110
|
"@types/mocha": "^10.0.10",
|
|
105
111
|
"@types/mv": "^2.1.4",
|
|
106
112
|
"@types/ncp": "^2.0.8",
|
|
113
|
+
"@types/node": "^25.5.0",
|
|
107
114
|
"@types/proxyquire": "^1.3.31",
|
|
108
115
|
"@types/request": "^2.48.12",
|
|
109
116
|
"@types/sinon": "^21.0.0",
|
|
110
117
|
"@types/through2": "^2.0.41",
|
|
118
|
+
"@types/yargs": "^17.0.35",
|
|
111
119
|
"binary-search-bounds": "^2.0.5",
|
|
112
120
|
"c8": "^10.1.3",
|
|
113
121
|
"codecov": "^3.8.3",
|
|
@@ -115,12 +123,14 @@
|
|
|
115
123
|
"dedent": "^1.5.3",
|
|
116
124
|
"execa": "^5.0.0",
|
|
117
125
|
"gapic-tools": "^1.0.1",
|
|
126
|
+
"grpc-health-check": "^2.1.0",
|
|
118
127
|
"gts": "^6.0.2",
|
|
119
128
|
"jsdoc": "^4.0.4",
|
|
120
129
|
"jsdoc-fresh": "^5.0.0",
|
|
121
130
|
"jsdoc-region-tag": "^4.0.0",
|
|
122
131
|
"linkinator": "^6.1.2",
|
|
123
132
|
"lodash.random": "^3.2.0",
|
|
133
|
+
"long": "^5.3.2",
|
|
124
134
|
"mocha": "^11.1.0",
|
|
125
135
|
"mv": "^2.1.1",
|
|
126
136
|
"ncp": "^2.0.0",
|
|
@@ -128,11 +138,22 @@
|
|
|
128
138
|
"p-limit": "^3.0.1",
|
|
129
139
|
"path-to-regexp": "^8.2.0",
|
|
130
140
|
"proxyquire": "^2.1.3",
|
|
131
|
-
"sinon": "
|
|
141
|
+
"sinon": "21.0.3",
|
|
132
142
|
"stats-lite": "^2.2.0",
|
|
133
143
|
"time-span": "4.0.0",
|
|
134
144
|
"tmp": "^0.2.3",
|
|
135
145
|
"typescript": "^5.8.2",
|
|
136
146
|
"yargs": "^17.7.2"
|
|
137
|
-
}
|
|
138
|
-
|
|
147
|
+
},
|
|
148
|
+
"overrides": {
|
|
149
|
+
"gcp-metadata": "^7.0.1",
|
|
150
|
+
"@sinonjs/fake-timers": "15.2.1"
|
|
151
|
+
},
|
|
152
|
+
"pnpm": {
|
|
153
|
+
"overrides": {
|
|
154
|
+
"gcp-metadata": "^7.0.1",
|
|
155
|
+
"@sinonjs/fake-timers": "15.2.1"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"homepage": "https://github.com/googleapis/google-cloud-node/tree/main/handwritten/spanner"
|
|
159
|
+
}
|