Call used to help batch rows.
Package
@google-cloud/bigqueryConstructors
(constructor)(options)
constructor
(
options
:
RowBatchOptions
);
Constructs a new instance of the RowBatch
class
Name | Description |
---|---|
options | RowBatchOptions
|
Properties
batchOptions
batchOptions
:
RowBatchOptions
;
bytes
bytes
:
number
;
callbacks
callbacks
:
InsertRowsCallback
[];
created
created
:
number
;
rows
rows
:
RowMetadata
[];
Methods
add(row, callback)
add
(
row
:
RowMetadata
,
callback
?:
InsertRowsCallback
)
:
void
;
Adds a row to the current batch.
Name | Description |
row | RowMetadata
The row to insert. |
callback | InsertRowsCallback
The callback function. |
Type | Description |
---|---|
void |
canFit(row)
canFit
(
row
:
RowMetadata
)
:
boolean
;
Indicates if a given row can fit in the batch.
Name | Description |
row | RowMetadata
The row in question. |
Type | Description |
---|---|
boolean | {boolean} |
isAtMax()
isAtMax
()
:
boolean
;
Checks to see if this batch is at the maximum allowed payload size.
Type | Description |
---|---|
boolean | {boolean} |
isFull()
isFull
()
:
boolean
;
Indicates if the batch is at capacity.
Type | Description |
---|---|
boolean | {boolean} |