Class MSSQLDriver

All Implemented Interfaces:
Driver<MSSQLConnectOptions>

public class MSSQLDriver extends DriverBase<MSSQLConnectOptions>
  • Field Details

  • Constructor Details

    • MSSQLDriver

      public MSSQLDriver()
  • Method Details

    • downcast

      public MSSQLConnectOptions downcast(SqlConnectOptions connectOptions)
      Description copied from interface: Driver
      Downcast the connect options to the specific driver options.
      Parameters:
      connectOptions - the options to downcast
      Returns:
      the downcasted options
    • createConnectionFactory

      public ConnectionFactory<MSSQLConnectOptions> createConnectionFactory(Vertx vertx, NetClientOptions transportOptions)
      Description copied from class: DriverBase
      Create a connection factory to the given database.
      Specified by:
      createConnectionFactory in class DriverBase<MSSQLConnectOptions>
      Parameters:
      vertx - the Vertx instance
      transportOptions - the options to configure the TCP client
      Returns:
      the connection factory
    • parseConnectionUri

      public MSSQLConnectOptions parseConnectionUri(String uri)
      Returns:
      true if the driver accepts the connectOptions, false otherwise
    • acceptsOptions

      public boolean acceptsOptions(SqlConnectOptions options)
      Returns:
      true if the driver accepts the connectOptions, false otherwise
    • appendQueryPlaceholder

      public int appendQueryPlaceholder(StringBuilder queryBuilder, int index, int current)
      Description copied from interface: Driver
      Append a parameter placeholder in the query.

      The index starts at 0.

      • When index == current indicates it is a new parameter and therefore the same * value should be returned.
      • When index < current indicates the builder wants to reuse a parameter. The implementation can either return the same value to indicate the parameter can be reused or return the next index to use (which is shall be the current value
      Parameters:
      queryBuilder - the builder to append to
      index - the parameter placeholder index
      Returns:
      the index at which the parameter placeholder could be added
    • wrapConnection

      public io.vertx.sqlclient.internal.SqlConnectionInternal wrapConnection(io.vertx.core.internal.ContextInternal context, ConnectionFactory<MSSQLConnectOptions> factory, Connection connection)
      Description copied from class: DriverBase
      Wrap a given connection into a SqlConnectionInternal. The default implementation wraps with a generic SqlConnectionBase.
      Overrides:
      wrapConnection in class DriverBase<MSSQLConnectOptions>
      Parameters:
      context - the connection context
      factory - the connection factory
      connection - the connection to wrap
      Returns:
      the wrapped connection