Class MSSQLDriver
- All Implemented Interfaces:
Driver<MSSQLConnectOptions>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptsOptions(SqlConnectOptions options) intappendQueryPlaceholder(StringBuilder queryBuilder, int index, int current) Append a parameter placeholder in thequery.createConnectionFactory(Vertx vertx, NetClientOptions transportOptions) Create a connection factory to the givendatabase.downcast(SqlConnectOptions connectOptions) Downcast the connect options to the specific driver options.parseConnectionUri(String uri) io.vertx.sqlclient.internal.SqlConnectionInternalwrapConnection(io.vertx.core.internal.ContextInternal context, ConnectionFactory<MSSQLConnectOptions> factory, Connection connection) Wrap a givenconnectioninto aSqlConnectionInternal.Methods inherited from class DriverBase
newPool, newPoolMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Driver
createPool
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
MSSQLDriver
public MSSQLDriver()
-
-
Method Details
-
downcast
Description copied from interface:DriverDowncast 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:DriverBaseCreate a connection factory to the givendatabase.- Specified by:
createConnectionFactoryin classDriverBase<MSSQLConnectOptions>- Parameters:
vertx- the Vertx instancetransportOptions- the options to configure the TCP client- Returns:
- the connection factory
-
parseConnectionUri
- Returns:
trueif the driver accepts theconnectOptions,falseotherwise
-
acceptsOptions
- Returns:
- true if the driver accepts the
connectOptions, false otherwise
-
appendQueryPlaceholder
Description copied from interface:DriverAppend a parameter placeholder in thequery.The index starts at
0.- When
index == currentindicates it is a new parameter and therefore the same * value should be returned. - When
index < currentindicates 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 thecurrentvalue
- Parameters:
queryBuilder- the builder to append toindex- the parameter placeholder index- Returns:
- the index at which the parameter placeholder could be added
- When
-
wrapConnection
public io.vertx.sqlclient.internal.SqlConnectionInternal wrapConnection(io.vertx.core.internal.ContextInternal context, ConnectionFactory<MSSQLConnectOptions> factory, Connection connection) Description copied from class:DriverBaseWrap a givenconnectioninto aSqlConnectionInternal. The default implementation wraps with a genericSqlConnectionBase.- Overrides:
wrapConnectionin classDriverBase<MSSQLConnectOptions>- Parameters:
context- the connection contextfactory- the connection factoryconnection- the connection to wrap- Returns:
- the wrapped connection
-