Class RowQueue (8.0.0)

Standard row queue used for inserting rows.

Package

@google-cloud/bigquery

Constructors

(constructor)(table, dup, options)

constructor(table:Table,dup:Stream,options?:InsertStreamOptions);

Constructs a new instance of theRowQueue class

Parameters
NameDescription
tableTable
dupStream
optionsInsertStreamOptions

Properties

batch

batch:RowBatch;

batchOptions

batchOptions?:RowBatchOptions;

inFlight

inFlight:boolean;

insertRowsOptions

insertRowsOptions:InsertRowsOptions;

pending

pending?:ReturnType<typeofsetTimeout>;

stream

stream:Stream;

table

table:Table;

Methods

_insert(rows, callbacks, cb)

_insert(rows:RowMetadata|RowMetadata[],callbacks:InsertRowsCallback[],cb?:InsertRowsCallback):void;

Accepts a batch of rows and inserts them into table.

Parameters
NameDescription
rowsRowMetadata |RowMetadata[]

The rows to insert.

callbacksInsertRowsCallback_2[]

The corresponding callback functions.

cbInsertRowsCallback
Returns
TypeDescription
void

add(row, callback)

add(row:RowMetadata,callback:InsertRowsCallback):void;

Adds a row to the queue.

Parameters
NameDescription
rowRowMetadata

The row to insert.

callbackInsertRowsCallback

The insert callback.

Returns
TypeDescription
void

getOptionDefaults()

getOptionDefaults():RowBatchOptions;
Returns
TypeDescription
RowBatchOptions

insert(callback)

insert(callback?:InsertRowsCallback):void;

Cancels any pending inserts and calls _insert immediately.

Parameter
NameDescription
callbackInsertRowsCallback
Returns
TypeDescription
void

setOptions(options)

setOptions(options?:RowBatchOptions):void;

Sets the batching options.

Parameter
NameDescription
optionsRowBatchOptions

The batching options.

Returns
TypeDescription
void

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-30 UTC.