@google-cloud/spanner 7.17.1 → 7.18.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.
Files changed (81) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/package.json +1 -1
  3. package/build/protos/google/spanner/admin/database/v1/backup.proto +0 -757
  4. package/build/protos/google/spanner/admin/database/v1/backup_schedule.proto +0 -230
  5. package/build/protos/google/spanner/admin/database/v1/common.proto +0 -132
  6. package/build/protos/google/spanner/admin/database/v1/spanner_database_admin.proto +0 -1209
  7. package/build/protos/google/spanner/admin/instance/v1/common.proto +0 -63
  8. package/build/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto +0 -1983
  9. package/build/protos/google/spanner/executor/v1/cloud_executor.proto +0 -1520
  10. package/build/protos/google/spanner/v1/commit_response.proto +0 -59
  11. package/build/protos/google/spanner/v1/keys.proto +0 -163
  12. package/build/protos/google/spanner/v1/mutation.proto +0 -107
  13. package/build/protos/google/spanner/v1/query_plan.proto +0 -128
  14. package/build/protos/google/spanner/v1/result_set.proto +0 -237
  15. package/build/protos/google/spanner/v1/spanner.proto +0 -1389
  16. package/build/protos/google/spanner/v1/transaction.proto +0 -575
  17. package/build/protos/google/spanner/v1/type.proto +0 -210
  18. package/build/protos/protos.d.ts +0 -38999
  19. package/build/protos/protos.js +0 -99538
  20. package/build/protos/protos.json +0 -10182
  21. package/build/src/backup.d.ts +0 -349
  22. package/build/src/backup.js +0 -246
  23. package/build/src/batch-transaction.d.ts +0 -247
  24. package/build/src/batch-transaction.js +0 -384
  25. package/build/src/codec.d.ts +0 -362
  26. package/build/src/codec.js +0 -791
  27. package/build/src/common-grpc/service-object.d.ts +0 -80
  28. package/build/src/common-grpc/service-object.js +0 -101
  29. package/build/src/common-grpc/service.d.ts +0 -445
  30. package/build/src/common-grpc/service.js +0 -826
  31. package/build/src/common.d.ts +0 -66
  32. package/build/src/common.js +0 -54
  33. package/build/src/database.d.ts +0 -2104
  34. package/build/src/database.js +0 -1655
  35. package/build/src/extra_proto_list.json +0 -1
  36. package/build/src/helper.d.ts +0 -45
  37. package/build/src/helper.js +0 -71
  38. package/build/src/index.d.ts +0 -1195
  39. package/build/src/index.js +0 -1059
  40. package/build/src/instance-config.d.ts +0 -295
  41. package/build/src/instance-config.js +0 -216
  42. package/build/src/instance.d.ts +0 -833
  43. package/build/src/instance.js +0 -781
  44. package/build/src/instrument.d.ts +0 -85
  45. package/build/src/instrument.js +0 -212
  46. package/build/src/multiplexed-session.d.ts +0 -136
  47. package/build/src/multiplexed-session.js +0 -197
  48. package/build/src/partial-result-stream.d.ts +0 -253
  49. package/build/src/partial-result-stream.js +0 -400
  50. package/build/src/session-factory.d.ts +0 -101
  51. package/build/src/session-factory.js +0 -93
  52. package/build/src/session-pool.d.ts +0 -471
  53. package/build/src/session-pool.js +0 -754
  54. package/build/src/session.d.ts +0 -259
  55. package/build/src/session.js +0 -348
  56. package/build/src/spanner_grpc_config.json +0 -92
  57. package/build/src/table.d.ts +0 -831
  58. package/build/src/table.js +0 -277
  59. package/build/src/transaction-runner.d.ts +0 -185
  60. package/build/src/transaction-runner.js +0 -282
  61. package/build/src/transaction.d.ts +0 -1691
  62. package/build/src/transaction.js +0 -2004
  63. package/build/src/v1/database_admin_client.d.ts +0 -2301
  64. package/build/src/v1/database_admin_client.js +0 -2286
  65. package/build/src/v1/database_admin_client_config.json +0 -160
  66. package/build/src/v1/database_admin_proto_list.json +0 -6
  67. package/build/src/v1/gapic_metadata.json +0 -27
  68. package/build/src/v1/index.d.ts +0 -4
  69. package/build/src/v1/index.js +0 -29
  70. package/build/src/v1/instance_admin_client.d.ts +0 -1982
  71. package/build/src/v1/instance_admin_client.js +0 -1766
  72. package/build/src/v1/instance_admin_client_config.json +0 -129
  73. package/build/src/v1/instance_admin_proto_list.json +0 -4
  74. package/build/src/v1/spanner_client.d.ts +0 -1250
  75. package/build/src/v1/spanner_client.js +0 -1086
  76. package/build/src/v1/spanner_client_config.json +0 -119
  77. package/build/src/v1/spanner_executor_proxy_client.d.ts +0 -418
  78. package/build/src/v1/spanner_executor_proxy_client.js +0 -706
  79. package/build/src/v1/spanner_executor_proxy_client_config.json +0 -30
  80. package/build/src/v1/spanner_executor_proxy_proto_list.json +0 -14
  81. package/build/src/v1/spanner_proto_list.json +0 -10
@@ -1,66 +0,0 @@
1
- /*!
2
- * Copyright 2017 Google Inc. All Rights Reserved.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { grpc, CallOptions, Operation as GaxOperation } from 'google-gax';
17
- import { google as instanceAdmin } from '../protos/protos';
18
- import { google as databaseAdmin } from '../protos/protos';
19
- export type IOperation = instanceAdmin.longrunning.IOperation;
20
- export type Schema = string | string[] | databaseAdmin.spanner.admin.database.v1.IUpdateDatabaseDdlRequest;
21
- export interface ResourceCallback<Resource, Response> {
22
- (err: grpc.ServiceError | null, resource?: Resource | null, response?: Response): void;
23
- }
24
- export type PagedResponse<Item, Response> = [Item[], {} | null, Response];
25
- export type RequestCallback<T, R = void> = R extends void ? NormalCallback<T> : PagedCallback<T, R>;
26
- export interface NormalCallback<TResponse> {
27
- (err: grpc.ServiceError | null, res?: TResponse | null): void;
28
- }
29
- export interface PagedCallback<Item, Response> {
30
- (err: grpc.ServiceError | null, results?: Item[] | null, nextQuery?: {} | null, response?: Response | null): void;
31
- }
32
- export interface LongRunningCallback<Resource> {
33
- (err: grpc.ServiceError | null, resource?: Resource | null, operation?: GaxOperation | null, apiResponse?: IOperation): void;
34
- }
35
- export interface PagedOptions {
36
- pageSize?: number;
37
- pageToken?: string;
38
- gaxOptions?: CallOptions;
39
- }
40
- export interface PagedOptionsWithFilter extends PagedOptions {
41
- filter?: string;
42
- }
43
- /*!
44
- * HTTP header for the resource prefix to improve routing
45
- * by the backend.
46
- */
47
- export declare const CLOUD_RESOURCE_HEADER = "google-cloud-resource-prefix";
48
- /*!
49
- * HTTP header to route the requests at Leader
50
- */
51
- export declare const LEADER_AWARE_ROUTING_HEADER = "x-goog-spanner-route-to-leader";
52
- export declare const END_TO_END_TRACING_HEADER = "x-goog-spanner-end-to-end-tracing";
53
- /**
54
- * Add Leader aware routing header to existing header list.
55
- * @param headers Existing header list.
56
- */
57
- export declare function addLeaderAwareRoutingHeader(headers: {
58
- [k: string]: string;
59
- }): void;
60
- /**
61
- * Returns common headers to add.
62
- * @param headers Common header list.
63
- */
64
- export declare function getCommonHeaders(resourceName: string, enableTracing?: boolean): {
65
- [k: string]: string;
66
- };
@@ -1,54 +0,0 @@
1
- "use strict";
2
- /*!
3
- * Copyright 2017 Google Inc. All Rights Reserved.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.END_TO_END_TRACING_HEADER = exports.LEADER_AWARE_ROUTING_HEADER = exports.CLOUD_RESOURCE_HEADER = void 0;
19
- exports.addLeaderAwareRoutingHeader = addLeaderAwareRoutingHeader;
20
- exports.getCommonHeaders = getCommonHeaders;
21
- /*!
22
- * HTTP header for the resource prefix to improve routing
23
- * by the backend.
24
- */
25
- exports.CLOUD_RESOURCE_HEADER = 'google-cloud-resource-prefix';
26
- /*!
27
- * HTTP header to route the requests at Leader
28
- */
29
- exports.LEADER_AWARE_ROUTING_HEADER = 'x-goog-spanner-route-to-leader';
30
- /*
31
- * END TO END TRACING header.
32
- */
33
- exports.END_TO_END_TRACING_HEADER = 'x-goog-spanner-end-to-end-tracing';
34
- /**
35
- * Add Leader aware routing header to existing header list.
36
- * @param headers Existing header list.
37
- */
38
- function addLeaderAwareRoutingHeader(headers) {
39
- headers[exports.LEADER_AWARE_ROUTING_HEADER] = 'true';
40
- }
41
- /**
42
- * Returns common headers to add.
43
- * @param headers Common header list.
44
- */
45
- function getCommonHeaders(resourceName, enableTracing) {
46
- const headers = {};
47
- if (process.env.SPANNER_ENABLE_END_TO_END_TRACING === 'true' ||
48
- enableTracing) {
49
- headers[exports.END_TO_END_TRACING_HEADER] = 'true';
50
- }
51
- headers[exports.CLOUD_RESOURCE_HEADER] = resourceName;
52
- return headers;
53
- }
54
- //# sourceMappingURL=common.js.map