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(Object delegate)`
    `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<PreparedStatement>> handler)` Create a prepared 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<PreparedStatement>` | `rxPrepare(String sql)` Create a prepared 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, 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<Transaction> __TYPE_ARG

  - ### Constructor Detail

    - #### Transaction

          public Transaction(Transaction delegate)

    - #### Transaction

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

      Overrides:
        `getDelegate` in class `SqlClient`

    - #### prepare

          public Transaction prepare(String sql,
                                     Handler<AsyncResult<PreparedStatement>> handler)

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

    - #### rxPrepare

          public Single<PreparedStatement> 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:

    - #### 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 © 2021 Eclipse. All rights reserved.