Constructor
new RowQueue(table, dup, options)
Parameters:
| Name | Type | Description | 
|---|---|---|
| table | Table | The table. | 
| dup | Duplex | Row stream. | 
| options | InsertStreamOptions | Insert and batch options. | 
Methods
_insert(rows, callbacks, callbackopt)
Accepts a batch of rows and inserts them into table.
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| rows | Array.<object> | The rows to insert. | |
| callbacks | Array.<InsertCallback> | The corresponding callback functions. | |
| callback | function | <optional> | Callback to be fired when insert is done. | 
add(row, callback)
Adds a row to the queue.
Parameters:
| Name | Type | Description | 
|---|---|---|
| row | RowMetadata | The row to insert. | 
| callback | InsertRowsCallback | The insert callback. | 
insert()
Cancels any pending inserts and calls _insert immediately.
setOptions(optionsopt)
Sets the batching options.
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| options | RowBatchOptions | <optional> | The batching options. |