@google-cloud/spanner 8.9.0 → 8.11.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/build/protos/status.json +243 -0
- package/build/src/backup.d.ts +2 -1
- package/build/src/batch-transaction.d.ts +2 -1
- package/build/src/codec.d.ts +2 -1
- package/build/src/codec.js +21 -20
- package/build/src/common.d.ts +3 -2
- package/build/src/database.d.ts +5 -2
- package/build/src/index.d.ts +3 -2
- package/build/src/index.js +7 -16
- package/build/src/instance-config.d.ts +2 -1
- package/build/src/instance.d.ts +4 -3
- package/build/src/instance.js +3 -2
- package/build/src/partial-result-stream.d.ts +2 -1
- package/build/src/partial-result-stream.js +5 -4
- package/build/src/protos.d.ts +21 -0
- package/build/src/protos.js +52 -0
- package/build/src/session.d.ts +2 -1
- package/build/src/spanner_grpc_config.json +1 -1
- package/build/src/table.d.ts +3 -2
- package/build/src/table.js +4 -3
- package/build/src/transaction-runner.d.ts +2 -1
- package/build/src/transaction-runner.js +6 -8
- package/build/src/transaction.d.ts +3 -2
- package/build/src/transaction.js +6 -5
- package/build/src/v1/index.d.ts +1 -4
- package/build/src/v1/index.js +5 -8
- package/package.json +8 -6
- package/build/protos/google/spanner/admin/database/v1/backup.proto +0 -773
- package/build/protos/google/spanner/admin/database/v1/backup_schedule.proto +0 -230
- package/build/protos/google/spanner/admin/database/v1/common.proto +0 -132
- package/build/protos/google/spanner/admin/database/v1/spanner_database_admin.proto +0 -1314
- package/build/protos/google/spanner/admin/instance/v1/common.proto +0 -64
- package/build/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto +0 -2184
- package/build/protos/google/spanner/executor/v1/cloud_executor.proto +0 -1604
- package/build/protos/google/spanner/v1/change_stream.proto +0 -451
- package/build/protos/google/spanner/v1/commit_response.proto +0 -80
- package/build/protos/google/spanner/v1/keys.proto +0 -163
- package/build/protos/google/spanner/v1/location.proto +0 -388
- package/build/protos/google/spanner/v1/mutation.proto +0 -156
- package/build/protos/google/spanner/v1/query_plan.proto +0 -156
- package/build/protos/google/spanner/v1/result_set.proto +0 -260
- package/build/protos/google/spanner/v1/spanner.proto +0 -1472
- package/build/protos/google/spanner/v1/transaction.proto +0 -329
- package/build/protos/google/spanner/v1/type.proto +0 -214
- package/build/protos/protos.d.ts +0 -44031
- package/build/protos/protos.js +0 -122630
- package/build/protos/protos.json +0 -11631
- package/build/src/v1/database_admin_client.d.ts +0 -2367
- package/build/src/v1/database_admin_client.js +0 -2914
- package/build/src/v1/database_admin_client_config.json +0 -169
- package/build/src/v1/database_admin_proto_list.json +0 -6
- package/build/src/v1/gapic_metadata.json +0 -27
- package/build/src/v1/instance_admin_client.d.ts +0 -2106
- package/build/src/v1/instance_admin_client.js +0 -2387
- package/build/src/v1/instance_admin_client_config.json +0 -129
- package/build/src/v1/instance_admin_proto_list.json +0 -4
- package/build/src/v1/spanner_client.d.ts +0 -1319
- package/build/src/v1/spanner_client.js +0 -1446
- package/build/src/v1/spanner_client_config.json +0 -123
- package/build/src/v1/spanner_executor_proxy_client.d.ts +0 -419
- package/build/src/v1/spanner_executor_proxy_client.js +0 -728
- package/build/src/v1/spanner_executor_proxy_client_config.json +0 -30
- package/build/src/v1/spanner_executor_proxy_proto_list.json +0 -15
- package/build/src/v1/spanner_proto_list.json +0 -12
package/build/src/session.d.ts
CHANGED
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
declare const common: any;
|
|
20
20
|
import * as r from 'teeny-request';
|
|
21
21
|
import { Snapshot, Transaction, PartitionedDml, TimestampBounds } from './transaction';
|
|
22
|
-
import {
|
|
22
|
+
import { protos } from '@google-cloud/spanner-api';
|
|
23
|
+
import google = protos.google;
|
|
23
24
|
import { Database } from './database';
|
|
24
25
|
import { NormalCallback } from './common';
|
|
25
26
|
import { ObservabilityOptions } from './instrument';
|
package/build/src/table.d.ts
CHANGED
|
@@ -17,11 +17,12 @@ import { Operation as GaxOperation, CallOptions } from 'google-gax';
|
|
|
17
17
|
import { Database, UpdateSchemaCallback, UpdateSchemaResponse } from './database';
|
|
18
18
|
import { PartialResultStream } from './partial-result-stream';
|
|
19
19
|
import { ReadRequest, TimestampBounds, CommitOptions, CommitResponse, ReadResponse, ReadCallback, CommitCallback } from './transaction';
|
|
20
|
-
import {
|
|
20
|
+
import { protos } from '@google-cloud/spanner-api';
|
|
21
|
+
import databaseAdmin = protos.google;
|
|
21
22
|
import { Schema, LongRunningCallback } from './common';
|
|
22
23
|
import IRequestOptions = databaseAdmin.spanner.v1.IRequestOptions;
|
|
23
24
|
import { ObservabilityOptions } from './instrument';
|
|
24
|
-
import
|
|
25
|
+
import google = protos.google;
|
|
25
26
|
import IsolationLevel = google.spanner.v1.TransactionOptions.IsolationLevel;
|
|
26
27
|
import ReadLockMode = google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode;
|
|
27
28
|
import { Int, SpannerDate, Numeric, Float32, Float } from './codec';
|
package/build/src/table.js
CHANGED
|
@@ -18,10 +18,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
exports.Table = void 0;
|
|
19
19
|
const promisify_1 = require("@google-cloud/promisify");
|
|
20
20
|
const through = require("through2");
|
|
21
|
+
const spanner_api_1 = require("@google-cloud/spanner-api");
|
|
21
22
|
const instrument_1 = require("./instrument");
|
|
22
|
-
|
|
23
|
-
var IsolationLevel =
|
|
24
|
-
var ReadLockMode =
|
|
23
|
+
var google = spanner_api_1.protos.google;
|
|
24
|
+
var IsolationLevel = google.spanner.v1.TransactionOptions.IsolationLevel;
|
|
25
|
+
var ReadLockMode = google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode;
|
|
25
26
|
const GOOGLE_STANDARD_SQL = 'GOOGLE_STANDARD_SQL';
|
|
26
27
|
const POSTGRESQL = 'POSTGRESQL';
|
|
27
28
|
/**
|
|
@@ -17,7 +17,8 @@ import { grpc } from 'google-gax';
|
|
|
17
17
|
import { Session } from './session';
|
|
18
18
|
import { Transaction } from './transaction';
|
|
19
19
|
import { NormalCallback } from './common';
|
|
20
|
-
import {
|
|
20
|
+
import { protos } from '@google-cloud/spanner-api';
|
|
21
|
+
import google = protos.google;
|
|
21
22
|
import IRequestOptions = google.spanner.v1.IRequestOptions;
|
|
22
23
|
import IsolationLevel = google.spanner.v1.TransactionOptions.IsolationLevel;
|
|
23
24
|
import ReadLockMode = google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode;
|
|
@@ -19,18 +19,16 @@ exports.AsyncTransactionRunner = exports.TransactionRunner = exports.Runner = ex
|
|
|
19
19
|
exports.isRetryableInternalError = isRetryableInternalError;
|
|
20
20
|
const promisify_1 = require("@google-cloud/promisify");
|
|
21
21
|
const google_gax_1 = require("google-gax");
|
|
22
|
-
const protobufjs_1 = require("protobufjs");
|
|
23
22
|
const through = require("through2");
|
|
24
23
|
const session_pool_1 = require("./session-pool");
|
|
25
|
-
const
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
const
|
|
24
|
+
const spanner_api_1 = require("@google-cloud/spanner-api");
|
|
25
|
+
var google = spanner_api_1.protos.google;
|
|
26
|
+
var IsolationLevel = google.spanner.v1.TransactionOptions.IsolationLevel;
|
|
27
|
+
var ReadLockMode = google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode;
|
|
28
|
+
const protos_1 = require("./protos");
|
|
30
29
|
const RETRY_INFO = 'google.rpc.retryinfo-bin';
|
|
31
30
|
const RETRYABLE = [google_gax_1.grpc.status.ABORTED];
|
|
32
|
-
|
|
33
|
-
const RetryInfo = protobufjs_1.Root.fromJSON(jsonProtos).lookup('google.rpc.RetryInfo');
|
|
31
|
+
const RetryInfo = (0, protos_1.getRetryInfo)();
|
|
34
32
|
/**
|
|
35
33
|
* Error class used to signal a Transaction timeout.
|
|
36
34
|
*
|
|
@@ -24,9 +24,10 @@ import { PartialResultStream, ResumeToken, Row } from './partial-result-stream';
|
|
|
24
24
|
import { Session } from './session';
|
|
25
25
|
import { Key } from './table';
|
|
26
26
|
import { Span } from './instrument';
|
|
27
|
-
import { google as spannerClient } from '../protos/protos';
|
|
28
27
|
import { NormalCallback } from './common';
|
|
29
|
-
import {
|
|
28
|
+
import { protos } from '@google-cloud/spanner-api';
|
|
29
|
+
import spannerClient = protos.google;
|
|
30
|
+
import google = protos.google;
|
|
30
31
|
import IQueryOptions = google.spanner.v1.ExecuteSqlRequest.IQueryOptions;
|
|
31
32
|
import IRequestOptions = google.spanner.v1.IRequestOptions;
|
|
32
33
|
import { Spanner } from '.';
|
package/build/src/transaction.js
CHANGED
|
@@ -24,11 +24,12 @@ const google_gax_1 = require("google-gax");
|
|
|
24
24
|
const stream_1 = require("stream");
|
|
25
25
|
const codec_1 = require("./codec");
|
|
26
26
|
const partial_result_stream_1 = require("./partial-result-stream");
|
|
27
|
-
const protos_1 = require("../protos/protos");
|
|
28
27
|
const common_1 = require("./common");
|
|
29
|
-
const
|
|
30
|
-
var
|
|
31
|
-
var
|
|
28
|
+
const spanner_api_1 = require("@google-cloud/spanner-api");
|
|
29
|
+
var spannerClient = spanner_api_1.protos.google;
|
|
30
|
+
var google = spanner_api_1.protos.google;
|
|
31
|
+
var IsolationLevel = google.spanner.v1.TransactionOptions.IsolationLevel;
|
|
32
|
+
var ReadLockMode = google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode;
|
|
32
33
|
const instrument_1 = require("./instrument");
|
|
33
34
|
const request_id_header_1 = require("./request_id_header");
|
|
34
35
|
const RETRY_INFO_TYPE = 'type.googleapis.com/google.rpc.retryinfo';
|
|
@@ -2229,7 +2230,7 @@ class MutationGroup {
|
|
|
2229
2230
|
_proto;
|
|
2230
2231
|
constructor() {
|
|
2231
2232
|
this._proto =
|
|
2232
|
-
new
|
|
2233
|
+
new spannerClient.spanner.v1.BatchWriteRequest.MutationGroup();
|
|
2233
2234
|
}
|
|
2234
2235
|
insert(table, rows) {
|
|
2235
2236
|
this._proto.mutations.push(buildMutation('insert', table, rows));
|
package/build/src/v1/index.d.ts
CHANGED
|
@@ -1,4 +1 @@
|
|
|
1
|
-
export { SpannerClient } from '
|
|
2
|
-
export { DatabaseAdminClient } from './database_admin_client';
|
|
3
|
-
export { InstanceAdminClient } from './instance_admin_client';
|
|
4
|
-
export { SpannerExecutorProxyClient } from './spanner_executor_proxy_client';
|
|
1
|
+
export { SpannerClient, DatabaseAdminClient, InstanceAdminClient, SpannerExecutorProxyClient, } from '@google-cloud/spanner-api';
|
package/build/src/v1/index.js
CHANGED
|
@@ -18,12 +18,9 @@
|
|
|
18
18
|
// ** All changes to this file may be overwritten. **
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
20
|
exports.SpannerExecutorProxyClient = exports.InstanceAdminClient = exports.DatabaseAdminClient = exports.SpannerClient = void 0;
|
|
21
|
-
var
|
|
22
|
-
Object.defineProperty(exports, "SpannerClient", { enumerable: true, get: function () { return
|
|
23
|
-
|
|
24
|
-
Object.defineProperty(exports, "
|
|
25
|
-
|
|
26
|
-
Object.defineProperty(exports, "InstanceAdminClient", { enumerable: true, get: function () { return instance_admin_client_1.InstanceAdminClient; } });
|
|
27
|
-
var spanner_executor_proxy_client_1 = require("./spanner_executor_proxy_client");
|
|
28
|
-
Object.defineProperty(exports, "SpannerExecutorProxyClient", { enumerable: true, get: function () { return spanner_executor_proxy_client_1.SpannerExecutorProxyClient; } });
|
|
21
|
+
var spanner_api_1 = require("@google-cloud/spanner-api");
|
|
22
|
+
Object.defineProperty(exports, "SpannerClient", { enumerable: true, get: function () { return spanner_api_1.SpannerClient; } });
|
|
23
|
+
Object.defineProperty(exports, "DatabaseAdminClient", { enumerable: true, get: function () { return spanner_api_1.DatabaseAdminClient; } });
|
|
24
|
+
Object.defineProperty(exports, "InstanceAdminClient", { enumerable: true, get: function () { return spanner_api_1.InstanceAdminClient; } });
|
|
25
|
+
Object.defineProperty(exports, "SpannerExecutorProxyClient", { enumerable: true, get: function () { return spanner_api_1.SpannerExecutorProxyClient; } });
|
|
29
26
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@google-cloud/spanner",
|
|
3
3
|
"description": "Cloud Spanner Client Library for Node.js",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.11.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Google Inc.",
|
|
7
7
|
"engines": {
|
|
@@ -42,14 +42,12 @@
|
|
|
42
42
|
"fix": "gts fix",
|
|
43
43
|
"clean": "gts clean",
|
|
44
44
|
"compile": "tsc -p . && cp -r protos build && cp -r test/data build/test",
|
|
45
|
-
"prepare": "
|
|
45
|
+
"prepare": "cp -r protos build && npm run compile",
|
|
46
46
|
"pretest": "npm run compile",
|
|
47
47
|
"presystem-test": "npm run compile",
|
|
48
48
|
"preobservability-test": "npm run compile",
|
|
49
|
-
"proto": "compileProtos src",
|
|
50
49
|
"benchwrapper": "node bin/benchwrapper.js",
|
|
51
50
|
"precompile": "gts clean",
|
|
52
|
-
"compile-protos": "compileProtos src",
|
|
53
51
|
"coverage": "c8 mocha build/test build/test/common && c8 report --check-coverage"
|
|
54
52
|
},
|
|
55
53
|
"dependencies": {
|
|
@@ -61,6 +59,7 @@
|
|
|
61
59
|
"@google-cloud/opentelemetry-resource-util": "^2.4.0",
|
|
62
60
|
"@google-cloud/precise-date": "^5.0.0",
|
|
63
61
|
"@google-cloud/promisify": "^5.0.0",
|
|
62
|
+
"@google-cloud/spanner-api": "^0.2.0",
|
|
64
63
|
"@grpc/grpc-js": "^1.13.2",
|
|
65
64
|
"@grpc/proto-loader": "^0.8.0",
|
|
66
65
|
"@opentelemetry/api": "^1.9.0",
|
|
@@ -139,12 +138,15 @@
|
|
|
139
138
|
},
|
|
140
139
|
"overrides": {
|
|
141
140
|
"gcp-metadata": "^7.0.1",
|
|
142
|
-
"@sinonjs/fake-timers": "15.2.1"
|
|
141
|
+
"@sinonjs/fake-timers": "15.2.1",
|
|
142
|
+
"brace-expansion": "5.0.7",
|
|
143
|
+
"@eslint-community/eslint-utils": "<4.10.0"
|
|
143
144
|
},
|
|
144
145
|
"pnpm": {
|
|
145
146
|
"overrides": {
|
|
146
147
|
"gcp-metadata": "^7.0.1",
|
|
147
|
-
"@sinonjs/fake-timers": "15.2.1"
|
|
148
|
+
"@sinonjs/fake-timers": "15.2.1",
|
|
149
|
+
"@eslint-community/eslint-utils": "<4.10.0"
|
|
148
150
|
}
|
|
149
151
|
},
|
|
150
152
|
"homepage": "https://github.com/googleapis/google-cloud-node/tree/main/handwritten/spanner"
|