new JDBCClient()
An asynchronous client interface for interacting with a JDBC compliant database
- Source:
Methods
querySingle(sql, handler) → {SQLOperations}
Execute a one shot SQL statement that returns a single SQL row. This method will reduce the boilerplate code by
getting a connection from the pool (this object) and return it back after the execution. Only the first result
from the result set is returned.
Parameters:
| Name | Type | Description |
|---|---|---|
sql |
string | the statement to execute |
handler |
function | the result handler |
- Source:
Returns:
self
- Type
- SQLOperations
querySingleWithParams(sql, arguments, handler) → {SQLOperations}
Execute a one shot SQL statement with arguments that returns a single SQL row. This method will reduce the
boilerplate code by getting a connection from the pool (this object) and return it back after the execution.
Only the first result from the result set is returned.
Parameters:
| Name | Type | Description |
|---|---|---|
sql |
string | the statement to execute |
arguments |
Array | the arguments |
handler |
function | the result handler |
- Source:
Returns:
self
- Type
- SQLOperations