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

@google-cloud/bigquery-storage

Package Overview
Dependencies
Maintainers
4
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/bigquery-storage - npm Package Compare versions

Comparing version 2.8.0 to 3.0.0

33

build/src/v1/big_query_read_client.d.ts

@@ -36,3 +36,3 @@ import * as gax from 'google-gax';

* The options accepted by the constructor are described in detail
* in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance).
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
* The common options are:

@@ -60,7 +60,6 @@ * @param {object} [options.credentials] - Credentials object.

* Follows the structure of {@link gapicConfig}.
* @param {boolean} [options.fallback] - Use HTTP fallback mode.
* In fallback mode, a special browser-compatible transport implementation is used
* instead of gRPC transport. In browser context (if the `window` object is defined)
* the fallback mode is enabled automatically; set `options.fallback` to `false`
* if you need to override this behavior.
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
* For more information, please check the
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
*/

@@ -138,7 +137,9 @@ constructor(opts?: ClientOptions);

* non-negative. The number of streams may be lower than the requested number,
* depending on the amount parallelism that is reasonable for the table. Error
* will be returned if the max count is greater than the current system
* max limit of 1,000.
* depending on the amount parallelism that is reasonable for the table.
* There is a default system max limit of 1,000.
*
* Streams must be read starting from offset 0.
* This must be greater than or equal to preferred_min_stream_count.
* Typically, clients should either leave this unset to let the system to
* determine an upper bound OR set this a size for the maximum "units of work"
* it can gracefully handle.
* @param {object} [options]

@@ -154,3 +155,7 @@ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.

*/
createReadSession(request?: protos.google.cloud.bigquery.storage.v1.ICreateReadSessionRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.storage.v1.IReadSession, (protos.google.cloud.bigquery.storage.v1.ICreateReadSessionRequest | undefined), {} | undefined]>;
createReadSession(request?: protos.google.cloud.bigquery.storage.v1.ICreateReadSessionRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.storage.v1.IReadSession,
(protos.google.cloud.bigquery.storage.v1.ICreateReadSessionRequest | undefined),
{} | undefined
]>;
createReadSession(request: protos.google.cloud.bigquery.storage.v1.ICreateReadSessionRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.storage.v1.IReadSession, protos.google.cloud.bigquery.storage.v1.ICreateReadSessionRequest | null | undefined, {} | null | undefined>): void;

@@ -194,3 +199,7 @@ createReadSession(request: protos.google.cloud.bigquery.storage.v1.ICreateReadSessionRequest, callback: Callback<protos.google.cloud.bigquery.storage.v1.IReadSession, protos.google.cloud.bigquery.storage.v1.ICreateReadSessionRequest | null | undefined, {} | null | undefined>): void;

*/
splitReadStream(request?: protos.google.cloud.bigquery.storage.v1.ISplitReadStreamRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.storage.v1.ISplitReadStreamResponse, (protos.google.cloud.bigquery.storage.v1.ISplitReadStreamRequest | undefined), {} | undefined]>;
splitReadStream(request?: protos.google.cloud.bigquery.storage.v1.ISplitReadStreamRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.storage.v1.ISplitReadStreamResponse,
(protos.google.cloud.bigquery.storage.v1.ISplitReadStreamRequest | undefined),
{} | undefined
]>;
splitReadStream(request: protos.google.cloud.bigquery.storage.v1.ISplitReadStreamRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.storage.v1.ISplitReadStreamResponse, protos.google.cloud.bigquery.storage.v1.ISplitReadStreamRequest | null | undefined, {} | null | undefined>): void;

@@ -197,0 +206,0 @@ splitReadStream(request: protos.google.cloud.bigquery.storage.v1.ISplitReadStreamRequest, callback: Callback<protos.google.cloud.bigquery.storage.v1.ISplitReadStreamResponse, protos.google.cloud.bigquery.storage.v1.ISplitReadStreamRequest | null | undefined, {} | null | undefined>): void;

"use strict";
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//

@@ -23,2 +23,4 @@ // Licensed under the Apache License, Version 2.0 (the "License");

const gax = require("google-gax");
const google_gax_1 = require("google-gax");
const stream_1 = require("stream");
const jsonProtos = require("../../protos/protos.json");

@@ -45,3 +47,3 @@ /**

* The options accepted by the constructor are described in detail
* in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance).
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
* The common options are:

@@ -69,7 +71,6 @@ * @param {object} [options.credentials] - Credentials object.

* Follows the structure of {@link gapicConfig}.
* @param {boolean} [options.fallback] - Use HTTP fallback mode.
* In fallback mode, a special browser-compatible transport implementation is used
* instead of gRPC transport. In browser context (if the `window` object is defined)
* the fallback mode is enabled automatically; set `options.fallback` to `false`
* if you need to override this behavior.
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
* For more information, please check the
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
*/

@@ -145,3 +146,3 @@ constructor(opts) {

this.descriptors.stream = {
readRows: new this._gaxModule.StreamDescriptor(gax.StreamType.SERVER_STREAMING),
readRows: new this._gaxModule.StreamDescriptor(gax.StreamType.SERVER_STREAMING, opts.fallback === 'rest'),
};

@@ -189,2 +190,9 @@ // Put together the default options sent with requests.

if (this._terminated) {
if (methodName in this.descriptors.stream) {
const stream = new stream_1.PassThrough();
setImmediate(() => {
stream.emit('error', new google_gax_1.GoogleError('The client has already been closed.'));
});
return stream;
}
return Promise.reject('The client has already been closed.');

@@ -233,3 +241,2 @@ }

'https://www.googleapis.com/auth/bigquery',
'https://www.googleapis.com/auth/bigquery.readonly',
'https://www.googleapis.com/auth/cloud-platform',

@@ -574,4 +581,3 @@ ];

close() {
this.initialize();
if (!this._terminated) {
if (this.bigQueryReadStub && !this._terminated) {
return this.bigQueryReadStub.then(stub => {

@@ -578,0 +584,0 @@ this._terminated = true;

@@ -10,2 +10,7 @@ {

],
"deadline_exceeded_resource_exhausted_unavailable": [
"DEADLINE_EXCEEDED",
"RESOURCE_EXHAUSTED",
"UNAVAILABLE"
],
"unavailable": [

@@ -24,2 +29,11 @@ "UNAVAILABLE"

"total_timeout_millis": 600000
},
"ec82364a95d03873ac5f61710bb6b9b42e40f31d": {
"initial_retry_delay_millis": 10000,
"retry_delay_multiplier": 1.3,
"max_retry_delay_millis": 120000,
"initial_rpc_timeout_millis": 60000,
"rpc_timeout_multiplier": 1,
"max_rpc_timeout_millis": 60000,
"total_timeout_millis": 600000
}

@@ -29,5 +43,5 @@ },

"CreateWriteStream": {
"timeout_millis": 600000,
"retry_codes_name": "idempotent",
"retry_params_name": "default"
"timeout_millis": 1200000,
"retry_codes_name": "deadline_exceeded_resource_exhausted_unavailable",
"retry_params_name": "ec82364a95d03873ac5f61710bb6b9b42e40f31d"
},

@@ -34,0 +48,0 @@ "AppendRows": {

@@ -39,3 +39,3 @@ import * as gax from 'google-gax';

* The options accepted by the constructor are described in detail
* in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance).
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
* The common options are:

@@ -63,7 +63,6 @@ * @param {object} [options.credentials] - Credentials object.

* Follows the structure of {@link gapicConfig}.
* @param {boolean} [options.fallback] - Use HTTP fallback mode.
* In fallback mode, a special browser-compatible transport implementation is used
* instead of gRPC transport. In browser context (if the `window` object is defined)
* the fallback mode is enabled automatically; set `options.fallback` to `false`
* if you need to override this behavior.
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
* For more information, please check the
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
*/

@@ -134,3 +133,7 @@ constructor(opts?: ClientOptions);

*/
createWriteStream(request?: protos.google.cloud.bigquery.storage.v1.ICreateWriteStreamRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.storage.v1.IWriteStream, (protos.google.cloud.bigquery.storage.v1.ICreateWriteStreamRequest | undefined), {} | undefined]>;
createWriteStream(request?: protos.google.cloud.bigquery.storage.v1.ICreateWriteStreamRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.storage.v1.IWriteStream,
(protos.google.cloud.bigquery.storage.v1.ICreateWriteStreamRequest | undefined),
{} | undefined
]>;
createWriteStream(request: protos.google.cloud.bigquery.storage.v1.ICreateWriteStreamRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.storage.v1.IWriteStream, protos.google.cloud.bigquery.storage.v1.ICreateWriteStreamRequest | null | undefined, {} | null | undefined>): void;

@@ -156,3 +159,7 @@ createWriteStream(request: protos.google.cloud.bigquery.storage.v1.ICreateWriteStreamRequest, callback: Callback<protos.google.cloud.bigquery.storage.v1.IWriteStream, protos.google.cloud.bigquery.storage.v1.ICreateWriteStreamRequest | null | undefined, {} | null | undefined>): void;

*/
getWriteStream(request?: protos.google.cloud.bigquery.storage.v1.IGetWriteStreamRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.storage.v1.IWriteStream, (protos.google.cloud.bigquery.storage.v1.IGetWriteStreamRequest | undefined), {} | undefined]>;
getWriteStream(request?: protos.google.cloud.bigquery.storage.v1.IGetWriteStreamRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.storage.v1.IWriteStream,
(protos.google.cloud.bigquery.storage.v1.IGetWriteStreamRequest | undefined),
{} | undefined
]>;
getWriteStream(request: protos.google.cloud.bigquery.storage.v1.IGetWriteStreamRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.storage.v1.IWriteStream, protos.google.cloud.bigquery.storage.v1.IGetWriteStreamRequest | null | undefined, {} | null | undefined>): void;

@@ -179,3 +186,7 @@ getWriteStream(request: protos.google.cloud.bigquery.storage.v1.IGetWriteStreamRequest, callback: Callback<protos.google.cloud.bigquery.storage.v1.IWriteStream, protos.google.cloud.bigquery.storage.v1.IGetWriteStreamRequest | null | undefined, {} | null | undefined>): void;

*/
finalizeWriteStream(request?: protos.google.cloud.bigquery.storage.v1.IFinalizeWriteStreamRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.storage.v1.IFinalizeWriteStreamResponse, (protos.google.cloud.bigquery.storage.v1.IFinalizeWriteStreamRequest | undefined), {} | undefined]>;
finalizeWriteStream(request?: protos.google.cloud.bigquery.storage.v1.IFinalizeWriteStreamRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.storage.v1.IFinalizeWriteStreamResponse,
(protos.google.cloud.bigquery.storage.v1.IFinalizeWriteStreamRequest | undefined),
{} | undefined
]>;
finalizeWriteStream(request: protos.google.cloud.bigquery.storage.v1.IFinalizeWriteStreamRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.storage.v1.IFinalizeWriteStreamResponse, protos.google.cloud.bigquery.storage.v1.IFinalizeWriteStreamRequest | null | undefined, {} | null | undefined>): void;

@@ -208,3 +219,7 @@ finalizeWriteStream(request: protos.google.cloud.bigquery.storage.v1.IFinalizeWriteStreamRequest, callback: Callback<protos.google.cloud.bigquery.storage.v1.IFinalizeWriteStreamResponse, protos.google.cloud.bigquery.storage.v1.IFinalizeWriteStreamRequest | null | undefined, {} | null | undefined>): void;

*/
batchCommitWriteStreams(request?: protos.google.cloud.bigquery.storage.v1.IBatchCommitWriteStreamsRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.storage.v1.IBatchCommitWriteStreamsResponse, (protos.google.cloud.bigquery.storage.v1.IBatchCommitWriteStreamsRequest | undefined), {} | undefined]>;
batchCommitWriteStreams(request?: protos.google.cloud.bigquery.storage.v1.IBatchCommitWriteStreamsRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.storage.v1.IBatchCommitWriteStreamsResponse,
(protos.google.cloud.bigquery.storage.v1.IBatchCommitWriteStreamsRequest | undefined),
{} | undefined
]>;
batchCommitWriteStreams(request: protos.google.cloud.bigquery.storage.v1.IBatchCommitWriteStreamsRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.storage.v1.IBatchCommitWriteStreamsResponse, protos.google.cloud.bigquery.storage.v1.IBatchCommitWriteStreamsRequest | null | undefined, {} | null | undefined>): void;

@@ -239,3 +254,7 @@ batchCommitWriteStreams(request: protos.google.cloud.bigquery.storage.v1.IBatchCommitWriteStreamsRequest, callback: Callback<protos.google.cloud.bigquery.storage.v1.IBatchCommitWriteStreamsResponse, protos.google.cloud.bigquery.storage.v1.IBatchCommitWriteStreamsRequest | null | undefined, {} | null | undefined>): void;

*/
flushRows(request?: protos.google.cloud.bigquery.storage.v1.IFlushRowsRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.storage.v1.IFlushRowsResponse, protos.google.cloud.bigquery.storage.v1.IFlushRowsRequest | undefined, {} | undefined]>;
flushRows(request?: protos.google.cloud.bigquery.storage.v1.IFlushRowsRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.storage.v1.IFlushRowsResponse,
protos.google.cloud.bigquery.storage.v1.IFlushRowsRequest | undefined,
{} | undefined
]>;
flushRows(request: protos.google.cloud.bigquery.storage.v1.IFlushRowsRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.storage.v1.IFlushRowsResponse, protos.google.cloud.bigquery.storage.v1.IFlushRowsRequest | null | undefined, {} | null | undefined>): void;

@@ -276,2 +295,9 @@ flushRows(request: protos.google.cloud.bigquery.storage.v1.IFlushRowsRequest, callback: Callback<protos.google.cloud.bigquery.storage.v1.IFlushRowsResponse, protos.google.cloud.bigquery.storage.v1.IFlushRowsRequest | null | undefined, {} | null | undefined>): void;

*
* Note: For users coding against the gRPC api directly, it may be
* necessary to supply the x-goog-request-params system parameter
* with `write_stream=<full_write_stream_name>`.
*
* More information about system parameters:
* https://cloud.google.com/apis/docs/system-parameters
*
* @param {object} [options]

@@ -278,0 +304,0 @@ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.

"use strict";
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//

@@ -23,2 +23,4 @@ // Licensed under the Apache License, Version 2.0 (the "License");

const gax = require("google-gax");
const google_gax_1 = require("google-gax");
const stream_1 = require("stream");
const jsonProtos = require("../../protos/protos.json");

@@ -48,3 +50,3 @@ /**

* The options accepted by the constructor are described in detail
* in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance).
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
* The common options are:

@@ -72,7 +74,6 @@ * @param {object} [options.credentials] - Credentials object.

* Follows the structure of {@link gapicConfig}.
* @param {boolean} [options.fallback] - Use HTTP fallback mode.
* In fallback mode, a special browser-compatible transport implementation is used
* instead of gRPC transport. In browser context (if the `window` object is defined)
* the fallback mode is enabled automatically; set `options.fallback` to `false`
* if you need to override this behavior.
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
* For more information, please check the
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
*/

@@ -148,3 +149,3 @@ constructor(opts) {

this.descriptors.stream = {
appendRows: new this._gaxModule.StreamDescriptor(gax.StreamType.BIDI_STREAMING),
appendRows: new this._gaxModule.StreamDescriptor(gax.StreamType.BIDI_STREAMING, opts.fallback === 'rest'),
};

@@ -195,2 +196,9 @@ // Put together the default options sent with requests.

if (this._terminated) {
if (methodName in this.descriptors.stream) {
const stream = new stream_1.PassThrough();
setImmediate(() => {
stream.emit('error', new google_gax_1.GoogleError('The client has already been closed.'));
});
return stream;
}
return Promise.reject('The client has already been closed.');

@@ -387,2 +395,9 @@ }

*
* Note: For users coding against the gRPC api directly, it may be
* necessary to supply the x-goog-request-params system parameter
* with `write_stream=<full_write_stream_name>`.
*
* More information about system parameters:
* https://cloud.google.com/apis/docs/system-parameters
*
* @param {object} [options]

@@ -402,3 +417,3 @@ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.

this.initialize();
return this.innerApiCalls.appendRows(options);
return this.innerApiCalls.appendRows(null, options);
}

@@ -651,4 +666,3 @@ // --------------------

close() {
this.initialize();
if (!this._terminated) {
if (this.bigQueryWriteStub && !this._terminated) {
return this.bigQueryWriteStub.then(stub => {

@@ -655,0 +669,0 @@ this._terminated = true;

"use strict";
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//

@@ -20,2 +20,3 @@ // Licensed under the Apache License, Version 2.0 (the "License");

Object.defineProperty(exports, "__esModule", { value: true });
exports.BigQueryWriteClient = exports.BigQueryReadClient = void 0;
var big_query_read_client_1 = require("./big_query_read_client");

@@ -22,0 +23,0 @@ Object.defineProperty(exports, "BigQueryReadClient", { enumerable: true, get: function () { return big_query_read_client_1.BigQueryReadClient; } });

@@ -36,3 +36,3 @@ import * as gax from 'google-gax';

* The options accepted by the constructor are described in detail
* in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance).
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
* The common options are:

@@ -60,7 +60,6 @@ * @param {object} [options.credentials] - Credentials object.

* Follows the structure of {@link gapicConfig}.
* @param {boolean} [options.fallback] - Use HTTP fallback mode.
* In fallback mode, a special browser-compatible transport implementation is used
* instead of gRPC transport. In browser context (if the `window` object is defined)
* the fallback mode is enabled automatically; set `options.fallback` to `false`
* if you need to override this behavior.
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
* For more information, please check the
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
*/

@@ -155,3 +154,7 @@ constructor(opts?: ClientOptions);

*/
createReadSession(request?: protos.google.cloud.bigquery.storage.v1beta1.ICreateReadSessionRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.storage.v1beta1.IReadSession, (protos.google.cloud.bigquery.storage.v1beta1.ICreateReadSessionRequest | undefined), {} | undefined]>;
createReadSession(request?: protos.google.cloud.bigquery.storage.v1beta1.ICreateReadSessionRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.storage.v1beta1.IReadSession,
(protos.google.cloud.bigquery.storage.v1beta1.ICreateReadSessionRequest | undefined),
{} | undefined
]>;
createReadSession(request: protos.google.cloud.bigquery.storage.v1beta1.ICreateReadSessionRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.storage.v1beta1.IReadSession, protos.google.cloud.bigquery.storage.v1beta1.ICreateReadSessionRequest | null | undefined, {} | null | undefined>): void;

@@ -183,3 +186,7 @@ createReadSession(request: protos.google.cloud.bigquery.storage.v1beta1.ICreateReadSessionRequest, callback: Callback<protos.google.cloud.bigquery.storage.v1beta1.IReadSession, protos.google.cloud.bigquery.storage.v1beta1.ICreateReadSessionRequest | null | undefined, {} | null | undefined>): void;

*/
batchCreateReadSessionStreams(request?: protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsResponse, (protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsRequest | undefined), {} | undefined]>;
batchCreateReadSessionStreams(request?: protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsResponse,
(protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsRequest | undefined),
{} | undefined
]>;
batchCreateReadSessionStreams(request: protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsResponse, protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsRequest | null | undefined, {} | null | undefined>): void;

@@ -217,3 +224,7 @@ batchCreateReadSessionStreams(request: protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsRequest, callback: Callback<protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsResponse, protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsRequest | null | undefined, {} | null | undefined>): void;

*/
finalizeStream(request?: protos.google.cloud.bigquery.storage.v1beta1.IFinalizeStreamRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, (protos.google.cloud.bigquery.storage.v1beta1.IFinalizeStreamRequest | undefined), {} | undefined]>;
finalizeStream(request?: protos.google.cloud.bigquery.storage.v1beta1.IFinalizeStreamRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.bigquery.storage.v1beta1.IFinalizeStreamRequest | undefined),
{} | undefined
]>;
finalizeStream(request: protos.google.cloud.bigquery.storage.v1beta1.IFinalizeStreamRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.storage.v1beta1.IFinalizeStreamRequest | null | undefined, {} | null | undefined>): void;

@@ -258,3 +269,7 @@ finalizeStream(request: protos.google.cloud.bigquery.storage.v1beta1.IFinalizeStreamRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.storage.v1beta1.IFinalizeStreamRequest | null | undefined, {} | null | undefined>): void;

*/
splitReadStream(request?: protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamResponse, (protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamRequest | undefined), {} | undefined]>;
splitReadStream(request?: protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamResponse,
(protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamRequest | undefined),
{} | undefined
]>;
splitReadStream(request: protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamResponse, protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamRequest | null | undefined, {} | null | undefined>): void;

@@ -261,0 +276,0 @@ splitReadStream(request: protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamRequest, callback: Callback<protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamResponse, protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamRequest | null | undefined, {} | null | undefined>): void;

"use strict";
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//

@@ -23,2 +23,4 @@ // Licensed under the Apache License, Version 2.0 (the "License");

const gax = require("google-gax");
const google_gax_1 = require("google-gax");
const stream_1 = require("stream");
const jsonProtos = require("../../protos/protos.json");

@@ -45,3 +47,3 @@ /**

* The options accepted by the constructor are described in detail
* in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance).
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
* The common options are:

@@ -69,7 +71,6 @@ * @param {object} [options.credentials] - Credentials object.

* Follows the structure of {@link gapicConfig}.
* @param {boolean} [options.fallback] - Use HTTP fallback mode.
* In fallback mode, a special browser-compatible transport implementation is used
* instead of gRPC transport. In browser context (if the `window` object is defined)
* the fallback mode is enabled automatically; set `options.fallback` to `false`
* if you need to override this behavior.
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
* For more information, please check the
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
*/

@@ -143,3 +144,3 @@ constructor(opts) {

this.descriptors.stream = {
readRows: new this._gaxModule.StreamDescriptor(gax.StreamType.SERVER_STREAMING),
readRows: new this._gaxModule.StreamDescriptor(gax.StreamType.SERVER_STREAMING, opts.fallback === 'rest'),
};

@@ -190,2 +191,9 @@ // Put together the default options sent with requests.

if (this._terminated) {
if (methodName in this.descriptors.stream) {
const stream = new stream_1.PassThrough();
setImmediate(() => {
stream.emit('error', new google_gax_1.GoogleError('The client has already been closed.'));
});
return stream;
}
return Promise.reject('The client has already been closed.');

@@ -234,3 +242,2 @@ }

'https://www.googleapis.com/auth/bigquery',
'https://www.googleapis.com/auth/bigquery.readonly',
'https://www.googleapis.com/auth/cloud-platform',

@@ -494,4 +501,3 @@ ];

close() {
this.initialize();
if (!this._terminated) {
if (this.bigQueryStorageStub && !this._terminated) {
return this.bigQueryStorageStub.then(stub => {

@@ -498,0 +504,0 @@ this._terminated = true;

"use strict";
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//

@@ -20,4 +20,5 @@ // Licensed under the Apache License, Version 2.0 (the "License");

Object.defineProperty(exports, "__esModule", { value: true });
exports.BigQueryStorageClient = void 0;
var big_query_storage_client_1 = require("./big_query_storage_client");
Object.defineProperty(exports, "BigQueryStorageClient", { enumerable: true, get: function () { return big_query_storage_client_1.BigQueryStorageClient; } });
//# sourceMappingURL=index.js.map
# Changelog
## [3.0.0](https://github.com/googleapis/nodejs-bigquery-storage/compare/v2.8.0...v3.0.0) (2022-06-29)
### ⚠ BREAKING CHANGES
* update library to use Node 12 (#272)
### Features
* Deprecate format specific `row_count` field in Read API ([#249](https://github.com/googleapis/nodejs-bigquery-storage/issues/249)) ([fb8acf1](https://github.com/googleapis/nodejs-bigquery-storage/commit/fb8acf1f4eab7823132159bcf5927c9eda6374e2))
### Bug Fixes
* fixes for dynamic routing and streaming descriptors ([#274](https://github.com/googleapis/nodejs-bigquery-storage/issues/274)) ([4271ea0](https://github.com/googleapis/nodejs-bigquery-storage/commit/4271ea0aaa98286696eb6822d0bef82a655a5811))
* Modify client lib retry policy for CreateWriteStream with longer backoff, more error code and longer overall time ([#279](https://github.com/googleapis/nodejs-bigquery-storage/issues/279)) ([849cc23](https://github.com/googleapis/nodejs-bigquery-storage/commit/849cc237081e63a585264a62d49e9407d2f14450))
### Build System
* update library to use Node 12 ([#272](https://github.com/googleapis/nodejs-bigquery-storage/issues/272)) ([5e774e6](https://github.com/googleapis/nodejs-bigquery-storage/commit/5e774e614132f189362d56c502960d87200a11a0))
## [2.8.0](https://www.github.com/googleapis/nodejs-bigquery-storage/compare/v2.7.0...v2.8.0) (2021-12-30)

@@ -4,0 +26,0 @@

{
"name": "@google-cloud/bigquery-storage",
"version": "2.8.0",
"version": "3.0.0",
"description": "Client for the BigQuery Storage API",

@@ -30,20 +30,20 @@ "repository": "googleapis/nodejs-bigquery-storage",

"dependencies": {
"google-gax": "^2.24.1"
"google-gax": "^3.0.1"
},
"devDependencies": {
"@types/mocha": "^8.0.0",
"@types/mocha": "^9.0.0",
"@types/node": "^16.0.0",
"@types/sinon": "^10.0.0",
"c8": "^7.1.0",
"gts": "^2.0.0",
"gts": "^3.1.0",
"jsdoc": "^3.6.3",
"jsdoc-fresh": "^1.0.2",
"jsdoc-region-tag": "^1.0.4",
"jsdoc-fresh": "^2.0.0",
"jsdoc-region-tag": "^2.0.0",
"linkinator": "^2.0.1",
"mocha": "^8.0.0",
"mocha": "^9.2.2",
"null-loader": "^4.0.0",
"pack-n-play": "^1.0.0-2",
"sinon": "^12.0.0",
"sinon": "^14.0.0",
"ts-loader": "^9.0.0",
"typescript": "^3.8.3",
"typescript": "^4.6.4",
"webpack": "^5.0.0",

@@ -53,4 +53,4 @@ "webpack-cli": "^4.0.0"

"engines": {
"node": ">=10"
"node": ">=12.0.0"
}
}

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

[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
[![npm version](https://img.shields.io/npm/v/@google-cloud/bigquery-storage.svg)](https://www.npmjs.org/package/@google-cloud/bigquery-storage)
[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-bigquery-storage/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-bigquery-storage)

@@ -190,3 +189,7 @@

| --------------------------- | --------------------------------- | ------ |
| Append_rows_pending | [source code](https://github.com/googleapis/nodejs-bigquery-storage/blob/main/samples/append_rows_pending.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery-storage&page=editor&open_in_editor=samples/append_rows_pending.js,samples/README.md) |
| Append_rows_proto2 | [source code](https://github.com/googleapis/nodejs-bigquery-storage/blob/main/samples/append_rows_proto2.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery-storage&page=editor&open_in_editor=samples/append_rows_proto2.js,samples/README.md) |
| Customer_record_pb | [source code](https://github.com/googleapis/nodejs-bigquery-storage/blob/main/samples/customer_record_pb.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery-storage&page=editor&open_in_editor=samples/customer_record_pb.js,samples/README.md) |
| BigQuery Storage Quickstart | [source code](https://github.com/googleapis/nodejs-bigquery-storage/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery-storage&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
| Sample_data_pb2 | [source code](https://github.com/googleapis/nodejs-bigquery-storage/blob/main/samples/sample_data_pb2.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery-storage&page=editor&open_in_editor=samples/sample_data_pb2.js,samples/README.md) |

@@ -203,18 +206,18 @@

Node.js.
If you are using an end-of-life version of Node.js, we recommend that you update
as soon as possible to an actively supported LTS version.
Google's client libraries support legacy versions of Node.js runtimes on a
best-efforts basis with the following warnings:
* Legacy versions are not tested in continuous integration.
* Some security patches and features cannot be backported.
* Dependencies cannot be kept up-to-date.
Client libraries targeting some end-of-life versions of Node.js are available, and
can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).
can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).
The dist-tags follow the naming convention `legacy-(version)`.
For example, `npm install @google-cloud/bigquery-storage@legacy-8` installs client libraries
for versions compatible with Node.js 8.
_Legacy Node.js versions are supported as a best effort:_
* Legacy versions will not be tested in continuous integration.
* Some security patches may not be able to be backported.
* Dependencies will not be kept up-to-date, and features will not be backported.
#### Legacy tags available
* `legacy-8`: install client libraries from this dist-tag for versions
compatible with Node.js 8.
## Versioning

@@ -225,6 +228,6 @@

This library is considered to be **General Availability (GA)**. This means it
is stable; the code surface will not change in backwards-incompatible ways
This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways
unless absolutely necessary (e.g. because of critical security issues) or with
an extensive deprecation period. Issues and requests against **GA** libraries
an extensive deprecation period. Issues and requests against **stable** libraries
are addressed with the highest priority.

@@ -237,3 +240,2 @@

More Information: [Google Cloud Platform Launch Stages][launch_stages]

@@ -240,0 +242,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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