Class SqlClient

java.lang.Object
io.vertx.mutiny.sqlclient.SqlClient
All Implemented Interfaces:
MutinyDelegate
Direct Known Subclasses:
Pool, SqlConnection

public class SqlClient extends Object implements MutinyDelegate
Defines common SQL client operations with a database server.

NOTE: This class has been automatically generated from the original non Mutiny-ified interface using Vert.x codegen.

  • Field Details

  • Constructor Details

    • SqlClient

      public SqlClient(io.vertx.sqlclient.SqlClient delegate)
    • SqlClient

      public SqlClient(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.sqlclient.SqlClient getDelegate()
      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate used by this Mutiny object of generated type
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • query

      public Query<RowSet<Row>> query(String sql)
      Parameters:
      sql -
      Returns:
      the query
    • preparedQuery

      public PreparedQuery<RowSet<Row>> preparedQuery(String sql)
      Parameters:
      sql -
      Returns:
      the prepared query
    • preparedQuery

      public PreparedQuery<RowSet<Row>> preparedQuery(String sql, io.vertx.sqlclient.PrepareOptions options)
      Parameters:
      sql -
      options -
      Returns:
      the prepared query
    • close

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> close()
      Close the client and release the associated resources.

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • closeAndAwait

      public Void closeAndAwait()
      Blocking variant of close().

      This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      Returns:
      the Void instance produced by the operation.
    • closeAndForget

      public void closeAndForget()
      Variant of close() that ignores the result of the operation.

      This method subscribes on the result of close(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from close() but you don't need to compose it with other operations.

    • newInstance

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