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.

Author:
Julien Viet
See Also:
  • SqlClient
  • Field Details

  • Constructor Details

    • SqlClient

      public SqlClient(io.vertx.sqlclient.SqlClient delegate)
      Create a new instance of SqlClient delegating to the given (non-null) instance of SqlClient.
    • SqlClient

      public SqlClient(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.sqlclient.SqlClient getDelegate()
      Get the delegate instance.

      This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.

      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate instance
    • 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. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • SqlClient.close()
    • closeAndAwait

      public void closeAndAwait()
      Close the client and release the associated resources.

      Unlike the bare Vert.x variant, this method returns a Void. This method awaits indefinitely 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).

      See Also:
      • SqlClient.close()
    • closeAndForget

      public SqlClient closeAndForget()
      Close the client and release the associated resources.

      Unlike the bare Vert.x variant, this method ignores the Void result or any failure.

      Returns:
      The current instance to chain operations if needed.
      See Also:
      • SqlClient.close()
    • query

      public Query<RowSet<Row>> query(String sql)
      Create a query, the Query.execute() method must be called to execute the query.
      Returns:
      the query
    • preparedQuery

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

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

      public static SqlClient newInstance(io.vertx.sqlclient.SqlClient delegate)
      Creates a new instance of the SqlClient.
    • hashCode

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

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

      public String toString()
      Overrides:
      toString in class Object