io.vertx.rxjava3.sqlclient

## Class SqlConnection

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

- Direct Known Subclasses:
    DB2Connection, MSSQLConnection, MySQLConnection, PgConnection

      public class SqlConnection
      extends SqlClient

  A connection to the 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(Object delegate)`
    `SqlConnection(SqlConnection delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Single<Transaction>` | `begin()` Begin a transaction and returns a `Transaction` for controlling and tracking this transaction.
    `Completable` | `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.
    `DatabaseMetadata` | `databaseMetadata()`
    `boolean` | `equals(Object o)`
    `SqlConnection` | `exceptionHandler(Handler<Throwable> handler)` Set an handler called with connection errors.
    `SqlConnection` | `getDelegate()`
    `int` | `hashCode()`
    `boolean` | `isSSL()`
    `static SqlConnection` | `newInstance(SqlConnection arg)`
    `Single<PreparedStatement>` | `prepare(String sql)` Create a prepared statement using the given `sql` string.
    `Single<PreparedStatement>` | `prepare(String sql, PrepareOptions options)` Create a prepared statement using the given `sql` string.
    `Single<Transaction>` | `rxBegin()` Begin a transaction and returns a `Transaction` for controlling and tracking this transaction.
    `Completable` | `rxClose()` Close the current connection after all the pending commands have been processed.
    `Single<PreparedStatement>` | `rxPrepare(String sql)` Create a prepared statement using the given `sql` string.
    `Single<PreparedStatement>` | `rxPrepare(String sql, PrepareOptions options)` Create a prepared statement using the given `sql` string.
    `String` | `toString()`

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

      `newInstance, preparedQuery, preparedQuery, query`

    - ### 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(SqlConnection delegate)

    - #### SqlConnection

          public SqlConnection(Object 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 SqlConnection getDelegate()

      Overrides:
        `getDelegate` in class `SqlClient`

    - #### prepare

          public Single<PreparedStatement> prepare(String sql)

      Create a prepared statement using the given `sql` string.
      Parameters:
        `sql` - the sql
      Returns:

    - #### rxPrepare

          public Single<PreparedStatement> rxPrepare(String sql)

      Create a prepared statement using the given `sql` string.
      Parameters:
        `sql` - the sql
      Returns:

    - #### prepare

          public Single<PreparedStatement> prepare(String sql,
                                                   PrepareOptions options)

      Create a prepared statement using the given `sql` string.
      Parameters:
        `sql` - the sql
        `options` -
      Returns:

    - #### rxPrepare

          public Single<PreparedStatement> rxPrepare(String sql,
                                                     PrepareOptions options)

      Create a prepared statement using the given `sql` string.
      Parameters:
        `sql` - the sql
        `options` -
      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 Single<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:

    - #### rxBegin

          public Single<Transaction> rxBegin()

      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:

    - #### isSSL

          public boolean isSSL()

      Returns:
        whether the connection uses SSL

    - #### close

          public Completable close()

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

    - #### rxClose

          public Completable rxClose()

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

    - #### databaseMetadata

          public DatabaseMetadata databaseMetadata()

      Returns:
        The static metadata about the backend database server for this connection

    - #### newInstance

          public static SqlConnection newInstance(SqlConnection arg)

Copyright © 2022 Eclipse. All rights reserved.