io.vertx.rxjava.ext.sql

## Interface SQLOperations

- All Known Implementing Classes:
    AsyncSQLClient, JDBCClient, MySQLClient, PostgreSQLClient, SQLClient, SQLConnection

      public interface SQLOperations

  Represents a SQL query interface to a database

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

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `SQLOperations` | `call(String sql, Handler<AsyncResult<io.vertx.ext.sql.ResultSet>> resultHandler)` Calls the given SQL `PROCEDURE` which returns the result from the procedure.
    `SQLOperations` | `callWithParams(String sql, JsonArray params, JsonArray outputs, Handler<AsyncResult<io.vertx.ext.sql.ResultSet>> resultHandler)` Calls the given SQL `PROCEDURE` which returns the result from the procedure.
    `io.vertx.ext.sql.SQLOperations` | `getDelegate()`
    `static SQLOperations` | `newInstance(io.vertx.ext.sql.SQLOperations arg)`
    `SQLOperations` | `query(String sql, Handler<AsyncResult<io.vertx.ext.sql.ResultSet>> resultHandler)` Executes the given SQL `SELECT` statement which returns the results of the query.
    `SQLOperations` | `querySingle(String sql, Handler<AsyncResult<JsonArray>> handler)` Execute a one shot SQL statement that returns a single SQL row.
    `SQLOperations` | `querySingleWithParams(String sql, JsonArray arguments, Handler<AsyncResult<JsonArray>> handler)` Execute a one shot SQL statement with arguments that returns a single SQL row.
    `SQLOperations` | `queryStream(String sql, Handler<AsyncResult<SQLRowStream>> handler)` Executes the given SQL `SELECT` statement which returns the results of the query as a read stream.
    `SQLOperations` | `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.
    `SQLOperations` | `queryWithParams(String sql, JsonArray params, Handler<AsyncResult<io.vertx.ext.sql.ResultSet>> resultHandler)` Executes the given SQL `SELECT` prepared statement which returns the results of the query.
    `SQLOperations` | `update(String sql, Handler<AsyncResult<io.vertx.ext.sql.UpdateResult>> resultHandler)` Executes the given SQL statement which may be an `INSERT`, `UPDATE`, or `DELETE` statement.
    `SQLOperations` | `updateWithParams(String sql, JsonArray params, Handler<AsyncResult<io.vertx.ext.sql.UpdateResult>> resultHandler)` Executes the given prepared statement which may be an `INSERT`, `UPDATE`, or `DELETE` statement with the given parameters

- - ### Method Detail

    - #### getDelegate

          io.vertx.ext.sql.SQLOperations getDelegate()

    - #### query

          SQLOperations query(String sql,
                              Handler<AsyncResult<io.vertx.ext.sql.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:

    - #### queryWithParams

          SQLOperations queryWithParams(String sql,
                                        JsonArray params,
                                        Handler<AsyncResult<io.vertx.ext.sql.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:

    - #### queryStream

          SQLOperations queryStream(String sql,
                                    Handler<AsyncResult<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`.
      Returns:

    - #### queryStreamWithParams

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

    - #### querySingle

          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.
      Parameters:
        `sql` - the statement to execute
        `handler` - the result handler
      Returns:
        self

    - #### querySingleWithParams

          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.
      Parameters:
        `sql` - the statement to execute
        `arguments` - the arguments
        `handler` - the result handler
      Returns:
        self

    - #### update

          SQLOperations update(String sql,
                               Handler<AsyncResult<io.vertx.ext.sql.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:

    - #### updateWithParams

          SQLOperations updateWithParams(String sql,
                                         JsonArray params,
                                         Handler<AsyncResult<io.vertx.ext.sql.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:

    - #### call

          SQLOperations call(String sql,
                             Handler<AsyncResult<io.vertx.ext.sql.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:

    - #### callWithParams

          SQLOperations callWithParams(String sql,
                                       JsonArray params,
                                       JsonArray outputs,
                                       Handler<AsyncResult<io.vertx.ext.sql.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:

    - #### newInstance

          static SQLOperations newInstance(io.vertx.ext.sql.SQLOperations arg)

Copyright © 2018 Eclipse. All rights reserved.