Methods
batch(argsList, handler) → {PreparedQuery}
Execute a batch.
Parameters:
| Name | Type | Description |
|---|---|---|
argsList |
Array.<Tuple> | the list of tuple for the batch |
handler |
function |
Returns:
the createBatch
- Type
- PreparedQuery
close(completionHandler)
Like PreparedQuery#close but notifies the
completionHandler when it's closed.
Parameters:
| Name | Type | Description |
|---|---|---|
completionHandler |
function |
createStream(fetch, args) → {RowStream}
Execute the prepared query with a cursor and createStream the result. The createStream opens a cursor
with a
fetch size to fetch the results.
Note: this requires to be in a transaction, since cursors require it.
Parameters:
| Name | Type | Description |
|---|---|---|
fetch |
number | the cursor fetch size |
args |
Tuple | the prepared query arguments |
Returns:
the createStream
- Type
- RowStream
cursor(args) → {Cursor}
Create a cursor with the provided
arguments.
Parameters:
| Name | Type | Description |
|---|---|---|
args |
Tuple | the list of arguments |
Returns:
the query
- Type
- Cursor
execute(args, handler) → {PreparedQuery}
Create a cursor with the provided
arguments.
Parameters:
| Name | Type | Description |
|---|---|---|
args |
Tuple | the list of arguments |
handler |
function |
Returns:
the query
- Type
- PreparedQuery