io.vertx.rxjava.ext.sql

## Class SQLConnection

- java.lang.Object
- - io.vertx.rxjava.ext.sql.SQLConnection

-     public class SQLConnection
      extends Object

  Represents a connection to a SQL database

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SQLConnection(SQLConnection delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SQLConnection` | `batch(List<String> sqlStatements, Handler<AsyncResult<List<Integer>>> handler)` Batch simple SQL strings and execute the batch where the async result contains a array of Integers.
    `SQLConnection` | `batchCallableWithParams(String sqlStatement, List<JsonArray> inArgs, List<JsonArray> outArgs, Handler<AsyncResult<List<Integer>>> handler)` Batch a callable statement with all entries from the args list.
    `Observable<List<Integer>>` | `batchCallableWithParamsObservable(String sqlStatement, List<JsonArray> inArgs, List<JsonArray> outArgs)` Batch a callable statement with all entries from the args list.
    `Observable<List<Integer>>` | `batchObservable(List<String> sqlStatements)` Batch simple SQL strings and execute the batch where the async result contains a array of Integers.
    `SQLConnection` | `batchWithParams(String sqlStatement, List<JsonArray> args, Handler<AsyncResult<List<Integer>>> handler)` Batch a prepared statement with all entries from the args list.
    `Observable<List<Integer>>` | `batchWithParamsObservable(String sqlStatement, List<JsonArray> args)` Batch a prepared statement with all entries from the args list.
    `SQLConnection` | `call(String sql, Handler<AsyncResult<ResultSet>> resultHandler)` Calls the given SQL `PROCEDURE` which returns the result from the procedure.
    `Observable<ResultSet>` | `callObservable(String sql)` Calls the given SQL `PROCEDURE` which returns the result from the procedure.
    `SQLConnection` | `callWithParams(String sql, JsonArray params, JsonArray outputs, Handler<AsyncResult<ResultSet>> resultHandler)` Calls the given SQL `PROCEDURE` which returns the result from the procedure.
    `Observable<ResultSet>` | `callWithParamsObservable(String sql, JsonArray params, JsonArray outputs)` Calls the given SQL `PROCEDURE` which returns the result from the procedure.
    `void` | `close()` Closes the connection.
    `void` | `close(Handler<AsyncResult<Void>> handler)` Closes the connection.
    `Observable<Void>` | `closeObservable()` Closes the connection.
    `SQLConnection` | `commit(Handler<AsyncResult<Void>> handler)` Commits all changes made since the previous commit/rollback.
    `Observable<Void>` | `commitObservable()` Commits all changes made since the previous commit/rollback.
    `SQLConnection` | `execute(String sql, Handler<AsyncResult<Void>> resultHandler)` Executes the given SQL statement
    `Observable<Void>` | `executeObservable(String sql)` Executes the given SQL statement
    `Object` | `getDelegate()`
    `SQLConnection` | `getTransactionIsolation(Handler<AsyncResult<TransactionIsolation>> handler)` Attempts to return the transaction isolation level for this Connection object to the one given.
    `Observable<TransactionIsolation>` | `getTransactionIsolationObservable()` Attempts to return the transaction isolation level for this Connection object to the one given.
    `static SQLConnection` | `newInstance(SQLConnection arg)`
    `SQLConnection` | `query(String sql, Handler<AsyncResult<ResultSet>> resultHandler)` Executes the given SQL `SELECT` statement which returns the results of the query.
    `Observable<ResultSet>` | `queryObservable(String sql)` Executes the given SQL `SELECT` statement which returns the results of the query.
    `SQLConnection` | `queryWithParams(String sql, JsonArray params, Handler<AsyncResult<ResultSet>> resultHandler)` Executes the given SQL `SELECT` prepared statement which returns the results of the query.
    `Observable<ResultSet>` | `queryWithParamsObservable(String sql, JsonArray params)` Executes the given SQL `SELECT` prepared statement which returns the results of the query.
    `SQLConnection` | `rollback(Handler<AsyncResult<Void>> handler)` Rolls back all changes made since the previous commit/rollback.
    `Observable<Void>` | `rollbackObservable()` Rolls back all changes made since the previous commit/rollback.
    `SQLConnection` | `setAutoCommit(boolean autoCommit, Handler<AsyncResult<Void>> resultHandler)` Sets the auto commit flag for this connection.
    `Observable<Void>` | `setAutoCommitObservable(boolean autoCommit)` Sets the auto commit flag for this connection.
    `SQLConnection` | `setQueryTimeout(int timeoutInSeconds)` Sets a connection wide query timeout.
    `SQLConnection` | `setTransactionIsolation(TransactionIsolation isolation, Handler<AsyncResult<Void>> handler)` Attempts to change the transaction isolation level for this Connection object to the one given.
    `Observable<Void>` | `setTransactionIsolationObservable(TransactionIsolation isolation)` Attempts to change the transaction isolation level for this Connection object to the one given.
    `SQLConnection` | `update(String sql, Handler<AsyncResult<UpdateResult>> resultHandler)` Executes the given SQL statement which may be an `INSERT`, `UPDATE`, or `DELETE` statement.
    `Observable<UpdateResult>` | `updateObservable(String sql)` Executes the given SQL statement which may be an `INSERT`, `UPDATE`, or `DELETE` statement.
    `SQLConnection` | `updateWithParams(String sql, JsonArray params, Handler<AsyncResult<UpdateResult>> resultHandler)` Executes the given prepared statement which may be an `INSERT`, `UPDATE`, or `DELETE` statement with the given parameters
    `Observable<UpdateResult>` | `updateWithParamsObservable(String sql, JsonArray params)` Executes the given prepared statement which may be an `INSERT`, `UPDATE`, or `DELETE` statement with the given parameters

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SQLConnection

          public SQLConnection(SQLConnection delegate)

  - ### Method Detail

    - #### getDelegate

          public Object getDelegate()

    - #### setAutoCommit

          public SQLConnection setAutoCommit(boolean autoCommit,
                                             Handler<AsyncResult<Void>> 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.
      Returns:

    - #### setAutoCommitObservable

          public Observable<Void> setAutoCommitObservable(boolean autoCommit)

      Sets the auto commit flag for this connection. True by default.
      Parameters:
        `autoCommit` - the autoCommit flag, true by default.
      Returns:

    - #### execute

          public SQLConnection execute(String sql,
                                       Handler<AsyncResult<Void>> 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.
      Returns:

    - #### executeObservable

          public Observable<Void> executeObservable(String sql)

      Executes the given SQL statement
      Parameters:
        `sql` - the SQL to execute. For example `CREATE TABLE IF EXISTS table ...`
      Returns:

    - #### query

          public SQLConnection query(String sql,
                                     Handler<AsyncResult<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`.
      Returns:

    - #### queryObservable

          public Observable<ResultSet> queryObservable(String sql)

      Executes the given SQL `SELECT` statement which returns the results of the query.
      Parameters:
        `sql` - the SQL to execute. For example `SELECT * FROM table ...`.
      Returns:

    - #### queryWithParams

          public SQLConnection queryWithParams(String sql,
                                               JsonArray params,
                                               Handler<AsyncResult<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`.
      Returns:

    - #### queryWithParamsObservable

          public Observable<ResultSet> queryWithParamsObservable(String sql,
                                                                 JsonArray params)

      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.
      Returns:

    - #### update

          public SQLConnection update(String sql,
                                      Handler<AsyncResult<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.
      Returns:

    - #### updateObservable

          public Observable<UpdateResult> updateObservable(String sql)

      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 ...`
      Returns:

    - #### updateWithParams

          public SQLConnection updateWithParams(String sql,
                                                JsonArray params,
                                                Handler<AsyncResult<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.
      Returns:

    - #### updateWithParamsObservable

          public Observable<UpdateResult> updateWithParamsObservable(String sql,
                                                                     JsonArray params)

      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.
      Returns:

    - #### call

          public SQLConnection call(String sql,
                                    Handler<AsyncResult<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`.
      Returns:

    - #### callObservable

          public Observable<ResultSet> callObservable(String sql)

      Calls the given SQL `PROCEDURE` which returns the result from the procedure.
      Parameters:
        `sql` - the SQL to execute. For example `{call getEmpName (?, ?)}`.
      Returns:

    - #### callWithParams

          public SQLConnection callWithParams(String sql,
                                              JsonArray params,
                                              JsonArray outputs,
                                              Handler<AsyncResult<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`.
      Returns:

    - #### callWithParamsObservable

          public Observable<ResultSet> callWithParamsObservable(String sql,
                                                                JsonArray params,
                                                                JsonArray outputs)

      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.
      Returns:

    - #### close

          public void close(Handler<AsyncResult<Void>> 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.

    - #### closeObservable

          public Observable<Void> closeObservable()

      Closes the connection. Important to always close the connection when you are done so it's returned to the pool.
      Returns:

    - #### close

          public void close()

      Closes the connection. Important to always close the connection when you are done so it's returned to the pool.

    - #### commit

          public SQLConnection commit(Handler<AsyncResult<Void>> handler)

      Commits all changes made since the previous commit/rollback.
      Parameters:
        `handler` - the handler called when this operation completes.
      Returns:

    - #### commitObservable

          public Observable<Void> commitObservable()

      Commits all changes made since the previous commit/rollback.
      Returns:

    - #### rollback

          public SQLConnection rollback(Handler<AsyncResult<Void>> handler)

      Rolls back all changes made since the previous commit/rollback.
      Parameters:
        `handler` - the handler called when this operation completes.
      Returns:

    - #### rollbackObservable

          public Observable<Void> rollbackObservable()

      Rolls back all changes made since the previous commit/rollback.
      Returns:

    - #### setQueryTimeout

          public SQLConnection setQueryTimeout(int 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.
      Returns:

    - #### batch

          public SQLConnection batch(List<String> sqlStatements,
                                     Handler<AsyncResult<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
      Returns:

    - #### batchObservable

          public Observable<List<Integer>> batchObservable(List<String> sqlStatements)

      Batch simple SQL strings and execute the batch where the async result contains a array of Integers.
      Parameters:
        `sqlStatements` - sql statement
      Returns:

    - #### batchWithParams

          public SQLConnection batchWithParams(String sqlStatement,
                                               List<JsonArray> args,
                                               Handler<AsyncResult<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
      Returns:

    - #### batchWithParamsObservable

          public Observable<List<Integer>> batchWithParamsObservable(String sqlStatement,
                                                                     List<JsonArray> args)

      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
      Returns:

    - #### batchCallableWithParams

          public SQLConnection batchCallableWithParams(String sqlStatement,
                                                       List<JsonArray> inArgs,
                                                       List<JsonArray> outArgs,
                                                       Handler<AsyncResult<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
      Returns:

    - #### batchCallableWithParamsObservable

          public Observable<List<Integer>> batchCallableWithParamsObservable(String sqlStatement,
                                                                             List<JsonArray> inArgs,
                                                                             List<JsonArray> outArgs)

      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
      Returns:

    - #### setTransactionIsolation

          public SQLConnection setTransactionIsolation(TransactionIsolation isolation,
                                                       Handler<AsyncResult<Void>> 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.
      Returns:

    - #### setTransactionIsolationObservable

          public Observable<Void> setTransactionIsolationObservable(TransactionIsolation isolation)

      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
      Returns:

    - #### getTransactionIsolation

          public SQLConnection getTransactionIsolation(Handler<AsyncResult<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.
      Returns:

    - #### getTransactionIsolationObservable

          public Observable<TransactionIsolation> getTransactionIsolationObservable()

      Attempts to return the transaction isolation level for this Connection object to the one given.
      Returns:

    - #### newInstance

          public static SQLConnection newInstance(SQLConnection arg)

Copyright © 2016. All rights reserved.