Methods
batch(argsList, handler) → {PgPreparedQuery}
Execute a batch.
Parameters:
Name | Type | Description |
---|---|---|
argsList |
Array.<Tuple> | the list of tuple for the batch |
handler |
function |
- Source:
Returns:
the createBatch
- Type
- PgPreparedQuery
close(completionHandler)
Like PgPreparedQuery#close but notifies the
completionHandler
when it's closed.
Parameters:
Name | Type | Description |
---|---|---|
completionHandler |
function |
- Source:
createStream(fetch, args) → {PgStream}
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 |
- Source:
Returns:
the createStream
- Type
- PgStream
cursor(args) → {PgCursor}
Create a cursor with the provided
arguments
.
Parameters:
Name | Type | Description |
---|---|---|
args |
Tuple | the list of arguments |
- Source:
Returns:
the query
- Type
- PgCursor
execute(args, handler) → {PgPreparedQuery}
Create a cursor with the provided
arguments
.
Parameters:
Name | Type | Description |
---|---|---|
args |
Tuple | the list of arguments |
handler |
function |
- Source:
Returns:
the query
- Type
- PgPreparedQuery