new SqlClient()
Defines the client operations with a database server.
- Source:
Methods
close()
Close the client and release the associated resources.
preparedBatch(sql, batch, handler) → {SqlClient}
Prepare and execute a createBatch.
Parameters:
| Name | Type | Description |
|---|---|---|
sql |
string | the prepared query SQL |
batch |
Array.<Tuple> | the batch of tuples |
handler |
function | the handler notified with the execution result |
Returns:
a reference to this, so the API can be used fluently
- Type
- SqlClient
preparedQuery(sql, arguments, handler) → {SqlClient}
Prepare and execute a query.
Parameters:
| Name | Type | Description |
|---|---|---|
sql |
string | the prepared query SQL |
arguments |
Tuple | the list of arguments |
handler |
function | the handler notified with the execution result |
- Source:
Returns:
a reference to this, so the API can be used fluently
- Type
- SqlClient
query(sql, handler) → {SqlClient}
Execute a simple query.
Parameters:
| Name | Type | Description |
|---|---|---|
sql |
string | the query SQL |
handler |
function | the handler notified with the execution result |
- Source:
Returns:
a reference to this, so the API can be used fluently
- Type
- SqlClient