Represents a connection to a SQL database

- `Anything`
  - `Object`
    - `Basic` ...and other supertypes
      - `SQLConnection` ...and other supertypes

- `SQLConnection`
  - `Basic`
    - `Identifiable`
    - `Object`
      - `Anything`
  - `SQLOperations`

no subtypes hierarchy

Initializer
`SQLConnection(SQLConnection unknown)`

Inherited Attributes
Attributes inherited from: `Object` `hash`, `string`

Methods
`batch` | `shared default SQLConnection batch(List<String> sqlStatements, Anything(Throwable|List<Integer>) handler)` Batch simple SQL strings and execute the batch where the async result contains a array of Integers. Parameters: `sqlStatements` sql statement `handler` the result handler
`batchCallableWithParams` | `shared default SQLConnection batchCallableWithParams(String sqlStatement, List<Array> inArgs, List<Array> outArgs, Anything(Throwable|List<Integer>) handler)` Batch a callable statement with all entries from the args list. Each entry is a batch. The size of the lists inArgs and outArgs MUST be the equal. The operation completes with the execution of the batch where the async result contains a array of Integers. Parameters: `sqlStatement` sql statement `inArgs` the callable statement input arguments `outArgs` the callable statement output arguments `handler` the result handler
`batchWithParams` | `shared default SQLConnection batchWithParams(String sqlStatement, List<Array> args, Anything(Throwable|List<Integer>) handler)` Batch a prepared statement with all entries from the args list. Each entry is a batch. The operation completes with the execution of the batch where the async result contains a array of Integers. Parameters: `sqlStatement` sql statement `args` the prepared statement arguments `handler` the result handler
`call` | `shared default SQLConnection call(String sql, Anything(Throwable|ResultSet) resultHandler)` Calls the given SQL `PROCEDURE` which returns the result from the procedure. Parameters: `sql` the SQL to execute. For example `{call getEmpName}`. `resultHandler` the handler which is called once the operation completes. It will return a `ResultSet`.
`callWithParams` | `shared default SQLConnection callWithParams(String sql, Array params, Array outputs, Anything(Throwable|ResultSet) resultHandler)` Calls the given SQL `PROCEDURE` which returns the result from the procedure. The index of params and outputs are important for both arrays, for example when dealing with a prodecure that takes the first 2 arguments as input values and the 3 arg as an output then the arrays should be like:
       params = [VALUE1, VALUE2, null]
       outputs = [null, null, "VARCHAR"]
Parameters: `sql` the SQL to execute. For example `{call getEmpName (?, ?)}`. `params` these are the parameters to fill the statement. `outputs` these are the outputs to fill the statement. `resultHandler` the handler which is called once the operation completes. It will return a `ResultSet`.
`close` | `shared default void close()` Closes the connection. Important to always close the connection when you are done so it's returned to the pool.
`close` | `shared default void close(Anything(Throwable?) handler)` Closes the connection. Important to always close the connection when you are done so it's returned to the pool. Parameters: `handler` the handler called when this operation completes.
`commit` | `shared default SQLConnection commit(Anything(Throwable?) handler)` Commits all changes made since the previous commit/rollback. Parameters: `handler` the handler called when this operation completes.
`execute` | `shared default SQLConnection execute(String sql, Anything(Throwable?) resultHandler)` Executes the given SQL statement Parameters: `sql` the SQL to execute. For example `CREATE TABLE IF EXISTS table …` `resultHandler` the handler which is called once this operation completes.
`getTransactionIsolation` | `shared default SQLConnection getTransactionIsolation(Anything(Throwable|TransactionIsolation) handler)` Attempts to return the transaction isolation level for this Connection object to the one given. Parameters: `handler` the handler called when this operation completes.
`query` | `shared actual default SQLConnection query(String sql, Anything(Throwable|ResultSet) resultHandler)` Executes the given SQL `SELECT` statement which returns the results of the query. Parameters: `sql` the SQL to execute. For example `SELECT * FROM table …`. `resultHandler` the handler which is called once the operation completes. It will return a `ResultSet`. Refines `SQLOperations.query`
`querySingle` | `shared actual default SQLOperations querySingle(String sql, Anything(Throwable|Array) handler)` 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: `sql` the statement to execute `handler` the result handler Refines `SQLOperations.querySingle`
`querySingleWithParams` | `shared actual default SQLOperations querySingleWithParams(String sql, Array arguments, Anything(Throwable|Array) handler)` 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: `sql` the statement to execute `arguments` the arguments `handler` the result handler Refines `SQLOperations.querySingleWithParams`
`queryStream` | `shared default SQLConnection queryStream(String sql, Anything(Throwable|SQLRowStream) handler)` Executes the given SQL `SELECT` statement which returns the results of the query as a read stream. Parameters: `sql` the SQL to execute. For example `SELECT * FROM table …`. `handler` the handler which is called once the operation completes. It will return a `SQLRowStream`.
`queryStreamWithParams` | `shared default SQLConnection queryStreamWithParams(String sql, Array params, Anything(Throwable|SQLRowStream) handler)` Executes the given SQL `SELECT` statement which returns the results of the query as a read stream. Parameters: `sql` the SQL to execute. For example `SELECT * FROM table …`. `params` these are the parameters to fill the statement. `handler` the handler which is called once the operation completes. It will return a `SQLRowStream`.
`queryWithParams` | `shared actual default SQLConnection queryWithParams(String sql, Array params, Anything(Throwable|ResultSet) resultHandler)` Executes the given SQL `SELECT` prepared statement which returns the results of the query. Parameters: `sql` the SQL to execute. For example `SELECT * FROM table …`. `params` these are the parameters to fill the statement. `resultHandler` the handler which is called once the operation completes. It will return a `ResultSet`. Refines `SQLOperations.queryWithParams`
`rollback` | `shared default SQLConnection rollback(Anything(Throwable?) handler)` Rolls back all changes made since the previous commit/rollback. Parameters: `handler` the handler called when this operation completes.
`setAutoCommit` | `shared default SQLConnection setAutoCommit(Boolean autoCommit, Anything(Throwable?) resultHandler)` Sets the auto commit flag for this connection. True by default. Parameters: `autoCommit` the autoCommit flag, true by default. `resultHandler` the handler which is called once this operation completes.
`setOptions` | `shared default SQLConnection setOptions(SQLOptions options)` Sets the desired options to be applied to the current connection when statements are executed. The options are not applied globally but applicable to the current connection. For example changing the transaction isolation level will only affect statements run on this connection and not future or current connections acquired from the connection pool. This method is not async in nature since the apply will only happen at the moment a query is run. Parameters: `options` the options to modify the unwrapped connection.
`setQueryTimeout` | `shared default SQLConnection setQueryTimeout(Integer timeoutInSeconds)` Sets a connection wide query timeout. It can be over written at any time and becomes active on the next query call. Parameters: `timeoutInSeconds` the max amount of seconds the query can take to execute.
`setTransactionIsolation` | `shared default SQLConnection setTransactionIsolation(TransactionIsolation isolation, Anything(Throwable?) handler)` Attempts to change the transaction isolation level for this Connection object to the one given. The constants defined in the interface Connection are the possible transaction isolation levels. Parameters: `isolation` the level of isolation `handler` the handler called when this operation completes.
`update` | `shared actual default SQLConnection update(String sql, Anything(Throwable|UpdateResult) resultHandler)` Executes the given SQL statement which may be an `INSERT`, `UPDATE`, or `DELETE` statement. Parameters: `sql` the SQL to execute. For example `INSERT INTO table …` `resultHandler` the handler which is called once the operation completes. Refines `SQLOperations.update`
`updateWithParams` | `shared actual default SQLConnection updateWithParams(String sql, Array params, Anything(Throwable|UpdateResult) resultHandler)` Executes the given prepared statement which may be an `INSERT`, `UPDATE`, or `DELETE` statement with the given parameters Parameters: `sql` the SQL to execute. For example `INSERT INTO table …` `params` these are the parameters to fill the statement. `resultHandler` the handler which is called once the operation completes. Refines `SQLOperations.updateWithParams`

Inherited Methods
Methods inherited from: `Object` `equals`
Methods inherited from: `SQLOperations` `query()`, `querySingle()`, `querySingleWithParams()`, `queryWithParams()`, `update()`, `updateWithParams()`