Interface SqlConnection

    • Method Detail

      • prepare

        Future<PreparedStatement> prepare​(String sql)
        Create a prepared statement using the given sql string.
        Parameters:
        sql - the sql
        Returns:
        a future notified with the prepared statement
      • prepare

        Future<PreparedStatement> prepare​(String sql,
                                          PrepareOptions options)
        Create a prepared statement using the given sql string.
        Parameters:
        sql - the sql
        Returns:
        a future notified with the prepared statement
      • exceptionHandler

        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

        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

        Future<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:
        a future notified with the transactino
      • transaction

        Transaction transaction()
        Returns:
        the current transaction if it exists, otherwise null
      • isSSL

        boolean isSSL()
        Returns:
        whether the connection uses SSL
      • databaseMetadata

        DatabaseMetadata databaseMetadata()
        Returns:
        The static metadata about the backend database server for this connection