io.vertx.rxjava.sqlclient

## Class Transaction

- java.lang.Object
- - io.vertx.rxjava.sqlclient.SqlClient
  - - io.vertx.rxjava.sqlclient.Transaction

-     public class Transaction
      extends SqlClient

  A transaction that allows to control the transaction and receive events.

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Transaction(Transaction delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Transaction` | `abortHandler(Handler<Void> handler)` Set an handler to be called when the transaction is aborted.
    `void` | `close()` Rollback the transaction and release the associated resources.
    `void` | `commit()` Commit the current transaction.
    `void` | `commit(Handler<AsyncResult<Void>> handler)` Like `commit()` with an handler to be notified when the transaction commit has completed
    `boolean` | `equals(Object o)`
    `Transaction` | `getDelegate()`
    `int` | `hashCode()`
    `static Transaction` | `newInstance(Transaction arg)`
    `Transaction` | `prepare(String sql, Handler<AsyncResult<PreparedQuery>> handler)` Create a prepared query.
    `Transaction` | `preparedBatch(String sql, List<Tuple> batch, Handler<AsyncResult<RowSet<Row>>> handler)` Prepare and execute a createBatch.
    `Transaction` | `preparedQuery(String sql, Handler<AsyncResult<RowSet<Row>>> handler)` Prepare and execute a query.
    `Transaction` | `preparedQuery(String sql, Tuple arguments, Handler<AsyncResult<RowSet<Row>>> handler)` Prepare and execute a query.
    `Transaction` | `query(String sql, Handler<AsyncResult<RowSet<Row>>> handler)` Execute a simple query.
    `void` | `rollback()` Rollback the current transaction.
    `void` | `rollback(Handler<AsyncResult<Void>> handler)` Like `rollback()` with an handler to be notified when the transaction rollback has completed
    `Single<Void>` | `rxCommit()` Like `commit()` with an handler to be notified when the transaction commit has completed
    `Single<PreparedQuery>` | `rxPrepare(String sql)` Create a prepared query.
    `Single<RowSet<Row>>` | `rxPreparedBatch(String sql, List<Tuple> batch)` Prepare and execute a createBatch.
    `Single<RowSet<Row>>` | `rxPreparedQuery(String sql)` Prepare and execute a query.
    `Single<RowSet<Row>>` | `rxPreparedQuery(String sql, Tuple arguments)` Prepare and execute a query.
    `Single<RowSet<Row>>` | `rxQuery(String sql)` Execute a simple query.
    `Single<Void>` | `rxRollback()` Like `rollback()` with an handler to be notified when the transaction rollback has completed
    `String` | `toString()`

    - ### Methods inherited from class io.vertx.rxjava.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<Transaction> __TYPE_ARG

  - ### Constructor Detail

    - #### Transaction

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

      Overrides:
        `getDelegate` in class `SqlClient`

    - #### prepare

          public Transaction 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:

    - #### commit

          public void commit()

      Commit the current transaction.

    - #### commit

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

      Like `commit()` with an handler to be notified when the transaction commit has completed
      Parameters:
        `handler` -

    - #### rxCommit

          public Single<Void> rxCommit()

      Like `commit()` with an handler to be notified when the transaction commit has completed
      Returns:

    - #### rollback

          public void rollback()

      Rollback the current transaction.

    - #### rollback

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

      Like `rollback()` with an handler to be notified when the transaction rollback has completed
      Parameters:
        `handler` -

    - #### rxRollback

          public Single<Void> rxRollback()

      Like `rollback()` with an handler to be notified when the transaction rollback has completed
      Returns:

    - #### abortHandler

          public Transaction abortHandler(Handler<Void> handler)

      Set an handler to be called when the transaction is aborted.
      Parameters:
        `handler` - the handler
      Returns:

    - #### query

          public Transaction query(String sql,
                                   Handler<AsyncResult<RowSet<Row>>> 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<Row>> 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 Transaction preparedQuery(String sql,
                                           Handler<AsyncResult<RowSet<Row>>> 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<Row>> 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

    - #### preparedQuery

          public Transaction preparedQuery(String sql,
                                           Tuple arguments,
                                           Handler<AsyncResult<RowSet<Row>>> 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<Row>> 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 Transaction preparedBatch(String sql,
                                           List<Tuple> batch,
                                           Handler<AsyncResult<RowSet<Row>>> 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<Row>> 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

    - #### close

          public void close()

      Rollback the transaction and release the associated resources.
      Overrides:
        `close` in class `SqlClient`

    - #### newInstance

          public static Transaction newInstance(Transaction arg)

Copyright © 2019 Eclipse. All rights reserved.