Standard row queue used for inserting rows.
Package
@google-cloud/bigqueryConstructors
(constructor)(table, dup, options)
constructor(table: Table, dup: Stream, options?: InsertStreamOptions);Constructs a new instance of the RowQueue class
| Name | Description |
| table |
Table
|
| dup |
Stream
|
| options |
InsertStreamOptions
|
Properties
batch
batch: RowBatch;batchOptions
batchOptions?: RowBatchOptions;inFlight
inFlight: boolean;insertRowsOptions
insertRowsOptions: InsertRowsOptions;pending
pending?: ReturnType<typeof setTimeout>;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.
| Name | Description |
| rows |
RowMetadata | RowMetadata[]
The rows to insert. |
| callbacks |
InsertRowsCallback[]
The corresponding callback functions. |
| cb |
InsertRowsCallback
|
| Type | Description |
| void |
add(row, callback)
add(row: RowMetadata, callback: InsertRowsCallback): void;Adds a row to the queue.
| Name | Description |
| row |
RowMetadata
The row to insert. |
| callback |
InsertRowsCallback
The insert callback. |
| Type | Description |
| void |
getOptionDefaults()
getOptionDefaults(): RowBatchOptions;| Type | Description |
| RowBatchOptions |
insert(callback)
insert(callback?: InsertRowsCallback): void;Cancels any pending inserts and calls _insert immediately.
| Name | Description |
| callback |
InsertRowsCallback
|
| Type | Description |
| void |
setOptions(options)
setOptions(options?: RowBatchOptions): void;Sets the batching options.
| Name | Description |
| options |
RowBatchOptions
The batching options. |
| Type | Description |
| void |