Call used to help batch rows.
Package
@google-cloud/bigqueryConstructors
(constructor)(options)
constructor
(
options
:
RowBatchOptions
);
Constructs a new instance of the RowBatch
class
Parameter
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.
Parameters
Name
Description
row
callback
Returns
Type
Description
void
canFit(row)
canFit
(
row
:
RowMetadata
)
:
boolean
;
Indicates if a given row can fit in the batch.
Returns
Type
Description
boolean
{boolean}
isAtMax()
isAtMax
()
:
boolean
;
Checks to see if this batch is at the maximum allowed payload size.
Returns
Type
Description
boolean
{boolean}
isFull()
isFull
()
:
boolean
;
Indicates if the batch is at capacity.
Returns
Type
Description
boolean
{boolean}