io.vertx.reactivex.sqlclient

## Class SqlConnection

- java.lang.Object
- - io.vertx.reactivex.sqlclient.SqlClient
  - - io.vertx.reactivex.sqlclient.SqlConnection

- Direct Known Subclasses:
    MySQLConnection, PgConnection

      public class SqlConnection
      extends SqlClient

  A connection to database server.

  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<SqlConnection>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SqlConnection(io.vertx.sqlclient.SqlConnection delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Transaction` | `begin()` Begin a transaction and returns a `Transaction` for controlling and tracking this transaction.
    `void` | `close()` Close the current connection after all the pending commands have been processed.
    `SqlConnection` | `closeHandler(Handler<Void> handler)` Set an handler called when the connection is closed.
    `boolean` | `equals(Object o)`
    `SqlConnection` | `exceptionHandler(Handler<Throwable> handler)` Set an handler called with connection errors.
    `io.vertx.sqlclient.SqlConnection` | `getDelegate()`
    `int` | `hashCode()`
    `boolean` | `isSSL()`
    `static SqlConnection` | `newInstance(io.vertx.sqlclient.SqlConnection arg)`
    `SqlConnection` | `prepare(String sql, Handler<AsyncResult<PreparedQuery>> handler)` Create a prepared query.
    `SqlConnection` | `preparedBatch(String sql, List<Tuple> batch, Handler<AsyncResult<RowSet>> handler)` Prepare and execute a createBatch.
    `SqlConnection` | `preparedQuery(String sql, Handler<AsyncResult<RowSet>> handler)` Prepare and execute a query.
    `SqlConnection` | `preparedQuery(String sql, Tuple arguments, Handler<AsyncResult<RowSet>> handler)` Prepare and execute a query.
    `SqlConnection` | `query(String sql, Handler<AsyncResult<RowSet>> handler)` Execute a simple query.
    `Single<PreparedQuery>` | `rxPrepare(String sql)` Create a prepared query.
    `Single<RowSet>` | `rxPreparedBatch(String sql, List<Tuple> batch)` Prepare and execute a createBatch.
    `Single<RowSet>` | `rxPreparedQuery(String sql)` Prepare and execute a query.
    `Single<RowSet>` | `rxPreparedQuery(String sql, Tuple arguments)` Prepare and execute a query.
    `Single<RowSet>` | `rxQuery(String sql)` Execute a simple query.
    `String` | `toString()`

    - ### Methods inherited from class io.vertx.reactivex.sqlclient.SqlClient

      `newInstance`

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

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

- - ### Field Detail

    - #### __TYPE_ARG

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

  - ### Constructor Detail

    - #### SqlConnection

          public SqlConnection(io.vertx.sqlclient.SqlConnection delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `SqlClient`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `SqlClient`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `SqlClient`

    - #### getDelegate

          public io.vertx.sqlclient.SqlConnection getDelegate()

      Overrides:
        `getDelegate` in class `SqlClient`

    - #### prepare

          public SqlConnection prepare(String sql,
                                       Handler<AsyncResult<PreparedQuery>> handler)

      Create a prepared query.
      Parameters:
        `sql` - the sql
        `handler` - the handler notified with the prepared query asynchronously
      Returns:

    - #### rxPrepare

          public Single<PreparedQuery> rxPrepare(String sql)

      Create a prepared query.
      Parameters:
        `sql` - the sql
      Returns:

    - #### exceptionHandler

          public SqlConnection exceptionHandler(Handler<Throwable> handler)

      Set an handler called with connection errors.
      Parameters:
        `handler` - the handler
      Returns:
        a reference to this, so the API can be used fluently

    - #### closeHandler

          public SqlConnection closeHandler(Handler<Void> handler)

      Set an handler called when the connection is closed.
      Parameters:
        `handler` - the handler
      Returns:
        a reference to this, so the API can be used fluently

    - #### begin

          public Transaction begin()

      Begin a transaction and returns a `Transaction` for controlling and tracking this transaction.

      When the connection is explicitely closed, any inflight transaction is rollbacked.
      Returns:
        the transaction instance

    - #### isSSL

          public boolean isSSL()

      Returns:
        whether the connection uses SSL

    - #### close

          public void close()

      Close the current connection after all the pending commands have been processed.
      Overrides:
        `close` in class `SqlClient`

    - #### preparedQuery

          public SqlConnection preparedQuery(String sql,
                                             Handler<AsyncResult<RowSet>> handler)

      Description copied from class: `SqlClient`
      Prepare and execute a query.
      Overrides:
        `preparedQuery` in class `SqlClient`
      Parameters:
        `sql` - the prepared query SQL
        `handler` - the handler notified with the execution result
      Returns:
        a reference to this, so the API can be used fluently

    - #### rxPreparedQuery

          public Single<RowSet> rxPreparedQuery(String sql)

      Description copied from class: `SqlClient`
      Prepare and execute a query.
      Overrides:
        `rxPreparedQuery` in class `SqlClient`
      Parameters:
        `sql` - the prepared query SQL
      Returns:
        a reference to this, so the API can be used fluently

    - #### query

          public SqlConnection query(String sql,
                                     Handler<AsyncResult<RowSet>> handler)

      Description copied from class: `SqlClient`
      Execute a simple query.
      Overrides:
        `query` in class `SqlClient`
      Parameters:
        `sql` - the query SQL
        `handler` - the handler notified with the execution result
      Returns:
        a reference to this, so the API can be used fluently

    - #### rxQuery

          public Single<RowSet> rxQuery(String sql)

      Description copied from class: `SqlClient`
      Execute a simple query.
      Overrides:
        `rxQuery` in class `SqlClient`
      Parameters:
        `sql` - the query SQL
      Returns:
        a reference to this, so the API can be used fluently

    - #### preparedQuery

          public SqlConnection preparedQuery(String sql,
                                             Tuple arguments,
                                             Handler<AsyncResult<RowSet>> handler)

      Description copied from class: `SqlClient`
      Prepare and execute a query.
      Overrides:
        `preparedQuery` in class `SqlClient`
      Parameters:
        `sql` - the prepared query SQL
        `arguments` - the list of arguments
        `handler` - the handler notified with the execution result
      Returns:
        a reference to this, so the API can be used fluently

    - #### rxPreparedQuery

          public Single<RowSet> rxPreparedQuery(String sql,
                                                Tuple arguments)

      Description copied from class: `SqlClient`
      Prepare and execute a query.
      Overrides:
        `rxPreparedQuery` in class `SqlClient`
      Parameters:
        `sql` - the prepared query SQL
        `arguments` - the list of arguments
      Returns:
        a reference to this, so the API can be used fluently

    - #### preparedBatch

          public SqlConnection preparedBatch(String sql,
                                             List<Tuple> batch,
                                             Handler<AsyncResult<RowSet>> handler)

      Description copied from class: `SqlClient`
      Prepare and execute a createBatch.
      Overrides:
        `preparedBatch` in class `SqlClient`
      Parameters:
        `sql` - the prepared query SQL
        `batch` - the batch of tuples
        `handler` - the handler notified with the execution result
      Returns:
        a reference to this, so the API can be used fluently

    - #### rxPreparedBatch

          public Single<RowSet> rxPreparedBatch(String sql,
                                                List<Tuple> batch)

      Description copied from class: `SqlClient`
      Prepare and execute a createBatch.
      Overrides:
        `rxPreparedBatch` in class `SqlClient`
      Parameters:
        `sql` - the prepared query SQL
        `batch` - the batch of tuples
      Returns:
        a reference to this, so the API can be used fluently

    - #### newInstance

          public static SqlConnection newInstance(io.vertx.sqlclient.SqlConnection arg)

Copyright © 2019 Eclipse. All rights reserved.