io.vertx.rxjava.ext.sql

## Class SQLClient

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

- All Implemented Interfaces:
    SQLOperations
  Direct Known Subclasses:
    AsyncSQLClient, JDBCClient

      public class SQLClient
      extends Object
      implements SQLOperations

  A common asynchronous client interface for interacting with SQL compliant database

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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<SQLClient>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SQLClient(SQLClient delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `SQLClient` | `call(String sql, Handler<AsyncResult<ResultSet>> handler)` Calls the given SQL `PROCEDURE` which returns the result from the procedure.
    `Observable<ResultSet>` | `callObservable(String sql)` Deprecated. use `rxCall(java.lang.String)` instead
    `SQLClient` | `callWithParams(String sql, JsonArray params, JsonArray outputs, Handler<AsyncResult<ResultSet>> handler)` Calls the given SQL `PROCEDURE` which returns the result from the procedure.
    `Observable<ResultSet>` | `callWithParamsObservable(String sql, JsonArray params, JsonArray outputs)` Deprecated. use `rxCallWithParams(java.lang.String, io.vertx.core.json.JsonArray, io.vertx.core.json.JsonArray)` instead
    `void` | `close()` Close the client
    `void` | `close(Handler<AsyncResult<Void>> handler)` Close the client and release all resources.
    `Observable<Void>` | `closeObservable()` Deprecated. use `rxClose()` instead
    `boolean` | `equals(Object o)`
    `SQLClient` | `getConnection(Handler<AsyncResult<SQLConnection>> handler)` Returns a connection that can be used to perform SQL operations on.
    `Observable<SQLConnection>` | `getConnectionObservable()` Deprecated. use `rxGetConnection()` instead
    `SQLClient` | `getDelegate()`
    `int` | `hashCode()`
    `static SQLClient` | `newInstance(SQLClient arg)`
    `SQLClient` | `query(String sql, Handler<AsyncResult<ResultSet>> handler)` Execute a single SQL statement, this method acquires a connection from the the pool and executes the SQL statement and returns it back after the execution.
    `Observable<ResultSet>` | `queryObservable(String sql)` Deprecated. use `rxQuery(java.lang.String)` instead
    `SQLOperations` | `querySingle(String sql, Handler<AsyncResult<JsonArray>> handler)` Execute a one shot SQL statement that returns a single SQL row.
    `Observable<JsonArray>` | `querySingleObservable(String sql)` Deprecated. use `rxQuerySingle(java.lang.String)` instead
    `SQLOperations` | `querySingleWithParams(String sql, JsonArray arguments, Handler<AsyncResult<JsonArray>> handler)` Execute a one shot SQL statement with arguments that returns a single SQL row.
    `Observable<JsonArray>` | `querySingleWithParamsObservable(String sql, JsonArray arguments)` Deprecated. use `rxQuerySingleWithParams(java.lang.String, io.vertx.core.json.JsonArray)` instead
    `SQLClient` | `queryStream(String sql, Handler<AsyncResult<SQLRowStream>> handler)` Executes the given SQL `SELECT` statement which returns the results of the query as a read stream.
    `Observable<SQLRowStream>` | `queryStreamObservable(String sql)` Deprecated. use `rxQueryStream(java.lang.String)` instead
    `SQLClient` | `queryStreamWithParams(String sql, JsonArray params, Handler<AsyncResult<SQLRowStream>> handler)` Executes the given SQL `SELECT` statement which returns the results of the query as a read stream.
    `Observable<SQLRowStream>` | `queryStreamWithParamsObservable(String sql, JsonArray params)` Deprecated. use `rxQueryStreamWithParams(java.lang.String, io.vertx.core.json.JsonArray)` instead
    `SQLClient` | `queryWithParams(String sql, JsonArray arguments, Handler<AsyncResult<ResultSet>> handler)` Execute a single SQL prepared statement, this method acquires a connection from the the pool and executes the SQL prepared statement and returns it back after the execution.
    `Observable<ResultSet>` | `queryWithParamsObservable(String sql, JsonArray arguments)` Deprecated. use `rxQueryWithParams(java.lang.String, io.vertx.core.json.JsonArray)` instead
    `Single<ResultSet>` | `rxCall(String sql)` Calls the given SQL `PROCEDURE` which returns the result from the procedure.
    `Single<ResultSet>` | `rxCallWithParams(String sql, JsonArray params, JsonArray outputs)` Calls the given SQL `PROCEDURE` which returns the result from the procedure.
    `Single<Void>` | `rxClose()` Close the client and release all resources.
    `Single<SQLConnection>` | `rxGetConnection()` Returns a connection that can be used to perform SQL operations on.
    `Single<ResultSet>` | `rxQuery(String sql)` Execute a single SQL statement, this method acquires a connection from the the pool and executes the SQL statement and returns it back after the execution.
    `Single<JsonArray>` | `rxQuerySingle(String sql)` Execute a one shot SQL statement that returns a single SQL row.
    `Single<JsonArray>` | `rxQuerySingleWithParams(String sql, JsonArray arguments)` Execute a one shot SQL statement with arguments that returns a single SQL row.
    `Single<SQLRowStream>` | `rxQueryStream(String sql)` Executes the given SQL `SELECT` statement which returns the results of the query as a read stream.
    `Single<SQLRowStream>` | `rxQueryStreamWithParams(String sql, JsonArray params)` Executes the given SQL `SELECT` statement which returns the results of the query as a read stream.
    `Single<ResultSet>` | `rxQueryWithParams(String sql, JsonArray arguments)` Execute a single SQL prepared statement, this method acquires a connection from the the pool and executes the SQL prepared statement and returns it back after the execution.
    `Single<UpdateResult>` | `rxUpdate(String sql)` Executes the given SQL statement which may be an `INSERT`, `UPDATE`, or `DELETE` statement.
    `Single<UpdateResult>` | `rxUpdateWithParams(String sql, JsonArray params)` Executes the given prepared statement which may be an `INSERT`, `UPDATE`, or `DELETE` statement with the given parameters
    `String` | `toString()`
    `SQLClient` | `update(String sql, Handler<AsyncResult<UpdateResult>> handler)` Executes the given SQL statement which may be an `INSERT`, `UPDATE`, or `DELETE` statement.
    `Observable<UpdateResult>` | `updateObservable(String sql)` Deprecated. use `rxUpdate(java.lang.String)` instead
    `SQLClient` | `updateWithParams(String sql, JsonArray params, Handler<AsyncResult<UpdateResult>> handler)` 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)` Deprecated. use `rxUpdateWithParams(java.lang.String, io.vertx.core.json.JsonArray)` instead

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface io.vertx.rxjava.ext.sql.SQLOperations

      `newInstance`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<SQLClient> __TYPE_ARG

  - ### Constructor Detail

    - #### SQLClient

          public SQLClient(SQLClient delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public SQLClient getDelegate()

      Specified by:
        `getDelegate` in interface `SQLOperations`

    - #### querySingle

          public SQLOperations querySingle(String sql,
                                           Handler<AsyncResult<JsonArray>> 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.
      Specified by:
        `querySingle` in interface `SQLOperations`
      Parameters:
        `sql` - the statement to execute
        `handler` - the result handler
      Returns:
        self

    - #### querySingleObservable

          @Deprecated
          public Observable<JsonArray> querySingleObservable(String sql)

      Deprecated. use `rxQuerySingle(java.lang.String)` instead
      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
      Returns:
        self

    - #### rxQuerySingle

          public Single<JsonArray> rxQuerySingle(String sql)

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

    - #### querySingleWithParams

          public SQLOperations querySingleWithParams(String sql,
                                                     JsonArray arguments,
                                                     Handler<AsyncResult<JsonArray>> 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.
      Specified by:
        `querySingleWithParams` in interface `SQLOperations`
      Parameters:
        `sql` - the statement to execute
        `arguments` - the arguments
        `handler` - the result handler
      Returns:
        self

    - #### querySingleWithParamsObservable

          @Deprecated
          public Observable<JsonArray> querySingleWithParamsObservable(String sql,
                                                                                   JsonArray arguments)

      Deprecated. use `rxQuerySingleWithParams(java.lang.String, io.vertx.core.json.JsonArray)` instead
      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
      Returns:
        self

    - #### rxQuerySingleWithParams

          public Single<JsonArray> rxQuerySingleWithParams(String sql,
                                                           JsonArray arguments)

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

    - #### getConnection

          public SQLClient getConnection(Handler<AsyncResult<SQLConnection>> handler)

      Returns a connection that can be used to perform SQL operations on. It's important to remember to close the connection when you are done, so it is returned to the pool.
      Parameters:
        `handler` - the handler which is called when the `JdbcConnection` object is ready for use.
      Returns:

    - #### getConnectionObservable

          @Deprecated
          public Observable<SQLConnection> getConnectionObservable()

      Deprecated. use `rxGetConnection()` instead
      Returns a connection that can be used to perform SQL operations on. It's important to remember to close the connection when you are done, so it is returned to the pool.
      Returns:

    - #### rxGetConnection

          public Single<SQLConnection> rxGetConnection()

      Returns a connection that can be used to perform SQL operations on. It's important to remember to close the connection when you are done, so it is returned to the pool.
      Returns:

    - #### close

          public void close(Handler<AsyncResult<Void>> handler)

      Close the client and release all resources. Call the handler when close is complete.
      Parameters:
        `handler` - the handler that will be called when close is complete

    - #### closeObservable

          @Deprecated
          public Observable<Void> closeObservable()

      Deprecated. use `rxClose()` instead
      Close the client and release all resources. Call the handler when close is complete.
      Returns:

    - #### rxClose

          public Single<Void> rxClose()

      Close the client and release all resources. Call the handler when close is complete.
      Returns:

    - #### close

          public void close()

      Close the client

    - #### query

          public SQLClient query(String sql,
                                 Handler<AsyncResult<ResultSet>> handler)

      Execute a single SQL statement, this method acquires a connection from the the pool and executes the SQL statement and returns it back after the execution.
      Specified by:
        `query` in interface `SQLOperations`
      Parameters:
        `sql` - the statement to execute
        `handler` - the result handler
      Returns:
        self

    - #### queryObservable

          @Deprecated
          public Observable<ResultSet> queryObservable(String sql)

      Deprecated. use `rxQuery(java.lang.String)` instead
      Execute a single SQL statement, this method acquires a connection from the the pool and executes the SQL statement and returns it back after the execution.
      Parameters:
        `sql` - the statement to execute
      Returns:
        self

    - #### rxQuery

          public Single<ResultSet> rxQuery(String sql)

      Execute a single SQL statement, this method acquires a connection from the the pool and executes the SQL statement and returns it back after the execution.
      Parameters:
        `sql` - the statement to execute
      Returns:
        self

    - #### queryStream

          public SQLClient queryStream(String sql,
                                       Handler<AsyncResult<SQLRowStream>> handler)

      Executes the given SQL `SELECT` statement which returns the results of the query as a read stream.
      Specified by:
        `queryStream` in interface `SQLOperations`
      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`.
      Returns:

    - #### queryStreamObservable

          @Deprecated
          public Observable<SQLRowStream> queryStreamObservable(String sql)

      Deprecated. use `rxQueryStream(java.lang.String)` instead
      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 ...`.
      Returns:

    - #### rxQueryStream

          public Single<SQLRowStream> rxQueryStream(String sql)

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

    - #### queryStreamWithParams

          public SQLClient queryStreamWithParams(String sql,
                                                 JsonArray params,
                                                 Handler<AsyncResult<SQLRowStream>> handler)

      Executes the given SQL `SELECT` statement which returns the results of the query as a read stream.
      Specified by:
        `queryStreamWithParams` in interface `SQLOperations`
      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`.
      Returns:

    - #### queryStreamWithParamsObservable

          @Deprecated
          public Observable<SQLRowStream> queryStreamWithParamsObservable(String sql,
                                                                                      JsonArray params)

      Deprecated. use `rxQueryStreamWithParams(java.lang.String, io.vertx.core.json.JsonArray)` instead
      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.
      Returns:

    - #### rxQueryStreamWithParams

          public Single<SQLRowStream> rxQueryStreamWithParams(String sql,
                                                              JsonArray params)

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

    - #### queryWithParams

          public SQLClient queryWithParams(String sql,
                                           JsonArray arguments,
                                           Handler<AsyncResult<ResultSet>> handler)

      Execute a single SQL prepared statement, this method acquires a connection from the the pool and executes the SQL prepared statement and returns it back after the execution.
      Specified by:
        `queryWithParams` in interface `SQLOperations`
      Parameters:
        `sql` - the statement to execute
        `arguments` - the arguments to the statement
        `handler` - the result handler
      Returns:
        self

    - #### queryWithParamsObservable

          @Deprecated
          public Observable<ResultSet> queryWithParamsObservable(String sql,
                                                                             JsonArray arguments)

      Deprecated. use `rxQueryWithParams(java.lang.String, io.vertx.core.json.JsonArray)` instead
      Execute a single SQL prepared statement, this method acquires a connection from the the pool and executes the SQL prepared statement and returns it back after the execution.
      Parameters:
        `sql` - the statement to execute
        `arguments` - the arguments to the statement
      Returns:
        self

    - #### rxQueryWithParams

          public Single<ResultSet> rxQueryWithParams(String sql,
                                                     JsonArray arguments)

      Execute a single SQL prepared statement, this method acquires a connection from the the pool and executes the SQL prepared statement and returns it back after the execution.
      Parameters:
        `sql` - the statement to execute
        `arguments` - the arguments to the statement
      Returns:
        self

    - #### update

          public SQLClient update(String sql,
                                  Handler<AsyncResult<UpdateResult>> handler)

      Executes the given SQL statement which may be an `INSERT`, `UPDATE`, or `DELETE` statement.
      Specified by:
        `update` in interface `SQLOperations`
      Parameters:
        `sql` - the SQL to execute. For example `INSERT INTO table ...`
        `handler` - the handler which is called once the operation completes.
      Returns:

    - #### updateObservable

          @Deprecated
          public Observable<UpdateResult> updateObservable(String sql)

      Deprecated. use `rxUpdate(java.lang.String)` instead
      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:

    - #### rxUpdate

          public Single<UpdateResult> rxUpdate(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 SQLClient updateWithParams(String sql,
                                            JsonArray params,
                                            Handler<AsyncResult<UpdateResult>> handler)

      Executes the given prepared statement which may be an `INSERT`, `UPDATE`, or `DELETE` statement with the given parameters
      Specified by:
        `updateWithParams` in interface `SQLOperations`
      Parameters:
        `sql` - the SQL to execute. For example `INSERT INTO table ...`
        `params` - these are the parameters to fill the statement.
        `handler` - the handler which is called once the operation completes.
      Returns:

    - #### updateWithParamsObservable

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

      Deprecated. use `rxUpdateWithParams(java.lang.String, io.vertx.core.json.JsonArray)` instead
      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:

    - #### rxUpdateWithParams

          public Single<UpdateResult> rxUpdateWithParams(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 SQLClient call(String sql,
                                Handler<AsyncResult<ResultSet>> handler)

      Calls the given SQL `PROCEDURE` which returns the result from the procedure.
      Specified by:
        `call` in interface `SQLOperations`
      Parameters:
        `sql` - the SQL to execute. For example `{call getEmpName}`.
        `handler` - the handler which is called once the operation completes. It will return a `ResultSet`.
      Returns:

    - #### callObservable

          @Deprecated
          public Observable<ResultSet> callObservable(String sql)

      Deprecated. use `rxCall(java.lang.String)` instead
      Calls the given SQL `PROCEDURE` which returns the result from the procedure.
      Parameters:
        `sql` - the SQL to execute. For example `{call getEmpName}`.
      Returns:

    - #### rxCall

          public Single<ResultSet> rxCall(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 SQLClient callWithParams(String sql,
                                          JsonArray params,
                                          JsonArray outputs,
                                          Handler<AsyncResult<ResultSet>> handler)

      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"]

      Specified by:
        `callWithParams` in interface `SQLOperations`
      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.
        `handler` - the handler which is called once the operation completes. It will return a `ResultSet`.
      Returns:

    - #### callWithParamsObservable

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

      Deprecated. use `rxCallWithParams(java.lang.String, io.vertx.core.json.JsonArray, io.vertx.core.json.JsonArray)` instead
      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:

    - #### rxCallWithParams

          public Single<ResultSet> rxCallWithParams(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:

    - #### newInstance

          public static SQLClient newInstance(SQLClient arg)

Copyright © 2019 Eclipse. All rights reserved.