new Cursor(conn, stmt)
Class representing a cursor to a resultset
Parameters:
Name | Type | Description |
---|---|---|
conn |
Connection | Connection object |
stmt |
Statement | Statement object |
- Source:
Methods
close() → {Promise.<string, Error>}
Close the results cursor
- Source:
Returns:
- A promise to string which would contain
the ID of the closed cursor or an Error if rejected.
- Type
- Promise.<string, Error>
context() → {string}
Return the context ID associated with this cursor
- Source:
Returns:
- Context ID
- Type
- string
fetch() → {Promise.<(Array|null), Error>}
Fetch a result
- Source:
Returns:
A promise to a results array (or null
if no more results) or an Error if rejected.
- Type
- Promise.<(Array|null), Error>
fetchAll(optsopt) → {Promise.<Array, Error>}
Fetch all results
Parameters:
Name | Type | Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object |
<optional> |
Options
Properties
|
- Source:
Returns:
A promise to an array of results or an
Error if rejected.
- Type
- Promise.<Array, Error>
id() → {string}
Return cursor ID
- Source:
Returns:
- ID generated for this cursor object.
- Type
- string
serial() → {number}
Return the serial value generated after executing an insert statement.
- Source:
Returns:
- Generated serial value
- Type
- number