New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@google-cloud/spanner

Package Overview
Dependencies
Maintainers
1
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/spanner - npm Package Compare versions

Comparing version 5.12.0 to 5.13.0

12

build/src/index.d.ts

@@ -27,3 +27,3 @@ /*!

import { google as instanceAdmin } from '../protos/protos';
import { PagedOptions, PagedResponse, PagedCallback, PagedOptionsWithFilter } from './common';
import { PagedOptions, PagedResponse, PagedCallback, PagedOptionsWithFilter, NormalCallback } from './common';
import { Session } from './session';

@@ -41,2 +41,7 @@ import { SessionPool } from './session-pool';

export declare type GetInstanceConfigsCallback = PagedCallback<instanceAdmin.spanner.admin.instance.v1.IInstanceConfig, instanceAdmin.spanner.admin.instance.v1.IListInstanceConfigsResponse>;
export interface GetInstanceConfigOptions {
gaxOptions?: CallOptions;
}
export declare type GetInstanceConfigResponse = [IInstanceConfig];
export declare type GetInstanceConfigCallback = NormalCallback<IInstanceConfig>;
export interface SpannerOptions extends GrpcClientOptions {

@@ -226,2 +231,6 @@ apiEndpoint?: string;

getInstanceConfigsStream(options?: GetInstanceConfigsOptions): NodeJS.ReadableStream;
getInstanceConfig(name: string): Promise<GetInstanceConfigResponse>;
getInstanceConfig(name: string, options: GetInstanceConfigOptions): Promise<GetInstanceConfigResponse>;
getInstanceConfig(name: string, callback: GetInstanceConfigCallback): void;
getInstanceConfig(name: string, options: GetInstanceConfigOptions, callback: GetInstanceConfigCallback): void;
/**

@@ -473,2 +482,3 @@ * Get a reference to an Instance object.

import * as protos from '../protos/protos';
import IInstanceConfig = instanceAdmin.spanner.admin.instance.v1.IInstanceConfig;
export { v1, protos };

@@ -475,0 +485,0 @@ declare const _default: {

@@ -515,2 +515,5 @@ "use strict";

* appears in UIs.
* @property {google.spanner.admin.instance.v1.IReplicaInfo[]} 0.replicas The replicas used by
* this instance config.
* @property {string[]} 0.leaderOptions The possible leader options for this instance config.
* @property {object} 1 A query object to receive more results.

@@ -527,2 +530,5 @@ * @property {object} 2 The full API response.

* as it appears in UIs.
* @param {google.spanner.admin.instance.v1.IReplicaInfo[]} instanceConfigs.replicas The replicas used by
* this instance config.
* @param {string[]} instanceConfigs.leaderOptions The possible leader options for this instance config.
* @param {object} nextQuery A query object to receive more results.

@@ -667,2 +673,73 @@ * @param {object} apiResponse The full API response.

/**
* Gets the instance configuration with the specified name.
*/
/**
* @typedef {array} GetInstanceConfigResponse
* @property {object[]} 0 The metadata of the instance config.
* @property {string} 0.name The unique identifier for the instance config.
* @property {string} 0.displayName The name of the instance config as it
* appears in UIs.
* @property {google.spanner.admin.instance.v1.IReplicaInfo[]} 0.replicas The replicas used by
* this instance config.
* @property {string[]} 0.leaderOptions The possible leader options for this instance config.
*/
/**
* @callback GetInstanceConfigCallback
* @param {?Error} err Request error, if any.
* @param {object} instanceConfig The metadata of the instance config.
* @param {string} instanceConfig.name The unique identifier for the instance
* config.
* @param {string} instanceConfig.displayName The name of the instance config
* as it appears in UIs.
* @param {google.spanner.admin.instance.v1.IReplicaInfo[]} instanceConfig.replicas The replicas used by
* this instance config.
* @param {string[]} 0.leaderOptions The possible leader options for this instance config.
*/
/**
* Get a specific instance config.
*
* Wrapper around {@link v1.InstanceAdminClient#getInstanceConfig}.
*
* @see {@link v1.InstanceAdminClient#getInstanceConfig}
* @see [GetInstanceConfig API Documentation](https://cloud.google.com/spanner/docs/reference/rpc/google.spanner.admin.instance.v1#google.spanner.admin.instance.v1.InstanceAdmin.GetInstanceConfig)
*
* @param {string} [name] The name of the instance config to get.
* @param {GetInstanceConfigCallback} [callback] Callback function.
* @returns {Promise<GetInstanceConfigResponse>}
*
* @example
* const {Spanner} = require('@google-cloud/spanner');
* const spanner = new Spanner();
*
* spanner.getInstanceConfig('nam6', function(err, instanceConfig) {
* // `instanceConfig` is an instance configuration descriptor.
* });
*
* //-
* // If the callback is omitted, we'll return a Promise.
* //-
* spanner.getInstanceConfig().then(function(data) {
* const instanceConfig = data[0];
* });
*/
getInstanceConfig(name, optionsOrCallback, cb) {
const callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : cb;
const options = typeof optionsOrCallback === 'object'
? optionsOrCallback
: {};
const reqOpts = extend({}, {
name: 'projects/' + this.projectId + '/instanceConfigs/' + name,
});
const gaxOpts = extend({}, options.gaxOptions);
return this.request({
client: 'InstanceAdminClient',
method: 'getInstanceConfig',
reqOpts,
gaxOpts,
headers: this.resourceHeader_,
}, (err, instanceConfig) => {
callback(err, instanceConfig);
});
}
/**
* Get a reference to an Instance object.

@@ -669,0 +746,0 @@ *

@@ -19,2 +19,3 @@ /// <reference types="node" />

private _opts;
private _providedCustomServicePath;
private _gaxModule;

@@ -26,2 +27,3 @@ private _gaxGrpc;

descriptors: Descriptors;
warn: (code: string, message: string, warnType?: string) => void;
innerApiCalls: {

@@ -28,0 +30,0 @@ [name: string]: Function;

@@ -34,2 +34,3 @@ /// <reference types="node" />

private _opts;
private _providedCustomServicePath;
private _gaxModule;

@@ -41,2 +42,3 @@ private _gaxGrpc;

descriptors: Descriptors;
warn: (code: string, message: string, warnType?: string) => void;
innerApiCalls: {

@@ -43,0 +45,0 @@ [name: string]: Function;

5

build/src/v1/instance_admin_client.js

@@ -104,2 +104,3 @@ "use strict";

const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || staticMembers.servicePath;
this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;

@@ -183,2 +184,4 @@ const clientConfig = (_a = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _a !== void 0 ? _a : {};

this.innerApiCalls = {};
// Add a warn function to the client constructor so it can be easily tested.
this.warn = gax.warn;
}

@@ -206,3 +209,3 @@ /**

: // eslint-disable-next-line @typescript-eslint/no-explicit-any
this._protos.google.spanner.admin.instance.v1.InstanceAdmin, this._opts);
this._protos.google.spanner.admin.instance.v1.InstanceAdmin, this._opts, this._providedCustomServicePath);
// Iterate over each of the methods that the service provides

@@ -209,0 +212,0 @@ // and create an API call method for each.

@@ -17,2 +17,3 @@ /// <reference types="node" />

private _opts;
private _providedCustomServicePath;
private _gaxModule;

@@ -24,2 +25,3 @@ private _gaxGrpc;

descriptors: Descriptors;
warn: (code: string, message: string, warnType?: string) => void;
innerApiCalls: {

@@ -26,0 +28,0 @@ [name: string]: Function;

{
"name": "@google-cloud/spanner",
"description": "Cloud Spanner Client Library for Node.js",
"version": "5.12.0",
"version": "5.13.0",
"license": "Apache-2.0",

@@ -6,0 +6,0 @@ "author": "Google Inc.",

@@ -106,7 +106,12 @@ [//]: # "This README.md file is auto-generated, all changes to this file will be lost."

| CRUD | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/crud.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/crud.js,samples/README.md) |
| Creates a new database with a specific default leader | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/database-create-with-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-create-with-default-leader.js,samples/README.md) |
| Database-create-with-encryption-key | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/database-create-with-encryption-key.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-create-with-encryption-key.js,samples/README.md) |
| Database-create-with-version-retention-period | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/database-create-with-version-retention-period.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-create-with-version-retention-period.js,samples/README.md) |
| Gets the schema definition of an existing database | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/database-get-ddl.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-get-ddl.js,samples/README.md) |
| Gets the default leader option of an existing database | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/database-get-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-get-default-leader.js,samples/README.md) |
| Updates the default leader of an existing database | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/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) |
| Datatypes | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/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) |
| DML | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/dml.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.js,samples/README.md) |
| Get-commit-stats | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/get-commit-stats.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/get-commit-stats.js,samples/README.md) |
| Gets the instance config metadata for the configuration nam6 | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/get-instance-config.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/get-instance-config.js,samples/README.md) |
| Creates a new value-storing index | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/index-create-storing.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/index-create-storing.js,samples/README.md) |

@@ -120,2 +125,4 @@ | Creates a new index | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/index-create.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/index-create.js,samples/README.md) |

| Instance | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/instance.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/instance.js,samples/README.md) |
| Lists all databases on the selected instance | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/list-databases.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/list-databases.js,samples/README.md) |
| Lists all the available instance configs for the selected project. | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/list-instance-configs.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/list-instance-configs.js,samples/README.md) |
| Numeric-add-column | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/numeric-add-column.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/numeric-add-column.js,samples/README.md) |

@@ -126,2 +133,3 @@ | Numeric-query-parameter | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/numeric-query-parameter.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/numeric-query-parameter.js,samples/README.md) |

| Quickstart | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/quickstart.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/quickstart.js,samples/README.md) |
| Sets a request tag for a single query | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/request-tag.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/request-tag.js,samples/README.md) |
| Rpc-priority | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/rpc-priority.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/rpc-priority.js,samples/README.md) |

@@ -131,2 +139,3 @@ | Schema | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/schema.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/schema.js,samples/README.md) |

| Timestamp | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/timestamp.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/timestamp.js,samples/README.md) |
| Executes a read/write transaction with transaction and request tags | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/transaction-tag.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/transaction-tag.js,samples/README.md) |
| Transaction | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/transaction.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/transaction.js,samples/README.md) |

@@ -133,0 +142,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc