Class MSSQLConnection

All Implemented Interfaces:
MutinyDelegate

public class MSSQLConnection extends SqlConnection implements MutinyDelegate
A connection to Microsoft SQL Server.

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

See Also:
  • MSSQLConnection
  • Field Details

  • Constructor Details

    • MSSQLConnection

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

      public MSSQLConnection(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.mssqlclient.MSSQLConnection 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
      Overrides:
      getDelegate in class SqlConnection
      Returns:
      the delegate instance
    • connect

      @CheckReturnValue public static io.smallrye.mutiny.Uni<MSSQLConnection> connect(Vertx vertx, io.vertx.mssqlclient.MSSQLConnectOptions connectOptions)
      Create a connection to SQL Server with the given connectOptions.

      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.

      Parameters:
      vertx - the vertx instance
      connectOptions - the options for the connection
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • io.vertx.mssqlclient.MSSQLConnection#connect(Vertx, MSSQLConnectOptions)
    • connectAndAwait

      public static MSSQLConnection connectAndAwait(Vertx vertx, io.vertx.mssqlclient.MSSQLConnectOptions connectOptions)
      Create a connection to SQL Server with the given connectOptions.

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

      Parameters:
      vertx - the vertx instance
      connectOptions - the options for the connection
      Returns:
      The operation result
      See Also:
      • io.vertx.mssqlclient.MSSQLConnection#connect(Vertx, MSSQLConnectOptions)
    • connectAndForget

      public static void connectAndForget(Vertx vertx, io.vertx.mssqlclient.MSSQLConnectOptions connectOptions)
      Create a connection to SQL Server with the given connectOptions.

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

      Parameters:
      vertx - the vertx instance
      connectOptions - the options for the connection
      See Also:
      • io.vertx.mssqlclient.MSSQLConnection#connect(Vertx, MSSQLConnectOptions)
    • connect

      @CheckReturnValue public static io.smallrye.mutiny.Uni<MSSQLConnection> connect(Vertx vertx, String connectionUri)
      Like connect(Vertx, MSSQLConnectOptions) with options built from connectionUri.

      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:
      • io.vertx.mssqlclient.MSSQLConnection#connect(Vertx, String)
    • connectAndAwait

      public static MSSQLConnection connectAndAwait(Vertx vertx, String connectionUri)
      Like connect(Vertx, MSSQLConnectOptions) with options built from connectionUri.

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

      Returns:
      The operation result
      See Also:
      • io.vertx.mssqlclient.MSSQLConnection#connect(Vertx, String)
    • connectAndForget

      public static void connectAndForget(Vertx vertx, String connectionUri)
      Like connect(Vertx, MSSQLConnectOptions) with options built from connectionUri.

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

      See Also:
      • io.vertx.mssqlclient.MSSQLConnection#connect(Vertx, String)
    • 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.

      Overrides:
      close in class SqlConnection
      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).

      Overrides:
      closeAndAwait in class SqlConnection
      See Also:
      • SqlClient.close()
    • closeAndForget

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

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

      Overrides:
      closeAndForget in class SqlConnection
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • SqlClient.close()
    • prepare

      @CheckReturnValue public io.smallrye.mutiny.Uni<PreparedStatement> prepare(String sql)
      Create a prepared statement using the given sql string.

      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.

      Overrides:
      prepare in class SqlConnection
      Parameters:
      sql - the sql
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • SqlConnection.prepare(String)
    • prepareAndAwait

      public PreparedStatement prepareAndAwait(String sql)
      Create a prepared statement using the given sql string.

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

      Overrides:
      prepareAndAwait in class SqlConnection
      Parameters:
      sql - the sql
      Returns:
      The operation result
      See Also:
      • SqlConnection.prepare(String)
    • prepareAndForget

      public MSSQLConnection prepareAndForget(String sql)
      Create a prepared statement using the given sql string.

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

      Overrides:
      prepareAndForget in class SqlConnection
      Parameters:
      sql - the sql
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • SqlConnection.prepare(String)
    • prepare

      @CheckReturnValue public io.smallrye.mutiny.Uni<PreparedStatement> prepare(String sql, io.vertx.sqlclient.PrepareOptions options)
      Create a prepared statement using the given sql string.

      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.

      Overrides:
      prepare in class SqlConnection
      Parameters:
      sql - the sql
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • SqlConnection.prepare(String, PrepareOptions)
    • prepareAndAwait

      public PreparedStatement prepareAndAwait(String sql, io.vertx.sqlclient.PrepareOptions options)
      Create a prepared statement using the given sql string.

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

      Overrides:
      prepareAndAwait in class SqlConnection
      Parameters:
      sql - the sql
      Returns:
      The operation result
      See Also:
      • SqlConnection.prepare(String, PrepareOptions)
    • prepareAndForget

      public MSSQLConnection prepareAndForget(String sql, io.vertx.sqlclient.PrepareOptions options)
      Create a prepared statement using the given sql string.

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

      Overrides:
      prepareAndForget in class SqlConnection
      Parameters:
      sql - the sql
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • SqlConnection.prepare(String, PrepareOptions)
    • begin

      @CheckReturnValue public io.smallrye.mutiny.Uni<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.

      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.

      Overrides:
      begin in class SqlConnection
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • SqlConnection.begin()
    • beginAndAwait

      public Transaction beginAndAwait()
      Begin a transaction and returns a Transaction for controlling and tracking this transaction.

      When the connection is explicitely closed, any inflight transaction is rollbacked.

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

      Overrides:
      beginAndAwait in class SqlConnection
      Returns:
      The operation result
      See Also:
      • SqlConnection.begin()
    • beginAndForget

      public MSSQLConnection beginAndForget()
      Begin a transaction and returns a Transaction for controlling and tracking this transaction.

      When the connection is explicitely closed, any inflight transaction is rollbacked.

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

      Overrides:
      beginAndForget in class SqlConnection
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • SqlConnection.begin()
    • exceptionHandler

      public MSSQLConnection exceptionHandler(Consumer<Throwable> handler)
      Set an handler called with connection errors.
      Overrides:
      exceptionHandler in class SqlConnection
      Parameters:
      handler - the handler
      Returns:
      a reference to this, so the API can be used fluently
    • closeHandler

      public MSSQLConnection closeHandler(Runnable handler)
      Set an handler called when the connection is closed.
      Overrides:
      closeHandler in class SqlConnection
      Parameters:
      handler - the handler
      Returns:
      a reference to this, so the API can be used fluently
    • infoHandler

      public MSSQLConnection infoHandler(Consumer<io.vertx.mssqlclient.MSSQLInfo> handler)
      Set a handler called when the connection receives an informational message from the server.
      Parameters:
      handler - the handler
      Returns:
      a reference to this, so the API can be used fluently
    • cast

      public static MSSQLConnection cast(SqlConnection sqlConnection)
      Cast a SqlConnection to MSSQLConnection. This is mostly useful for Vert.x generated APIs like RxJava/Mutiny.
      Parameters:
      sqlConnection - the connection to cast
      Returns:
      a instance
    • newInstance

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

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

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

      public String toString()
      Overrides:
      toString in class SqlConnection