Interface MSSQLConnection
- All Superinterfaces:
SqlClient, SqlConnection
A connection to Microsoft SQL Server.
-
Method Summary
Modifier and TypeMethodDescriptionstatic MSSQLConnectioncast(SqlConnection sqlConnection) Cast aSqlConnectiontoMSSQLConnection.closeHandler(Handler<Void> handler) Set an handler called when the connection is closed.static Future<MSSQLConnection> connect(Vertx vertx, MSSQLConnectOptions connectOptions) Create a connection to SQL Server with the givenconnectOptions.static Future<MSSQLConnection> Likeconnect(Vertx, MSSQLConnectOptions)with options built fromconnectionUri.exceptionHandler(Handler<Throwable> handler) Set an handler called with connection errors.infoHandler(Handler<MSSQLInfo> handler) Set a handler called when the connection receives an informational message from the server.Methods inherited from interface SqlClient
close, preparedQuery, preparedQuery, queryMethods inherited from interface SqlConnection
begin, databaseMetadata, isSSL, prepare, prepare, transaction
-
Method Details
-
connect
Create a connection to SQL Server with the givenconnectOptions.- Parameters:
vertx- the vertx instanceconnectOptions- the options for the connection- Returns:
- a future notified with the connection or the failure
-
connect
Likeconnect(Vertx, MSSQLConnectOptions)with options built fromconnectionUri. -
exceptionHandler
Set an handler called with connection errors.- Specified by:
exceptionHandlerin interfaceSqlConnection- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
closeHandler
Set an handler called when the connection is closed.- Specified by:
closeHandlerin interfaceSqlConnection- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
infoHandler
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
Cast aSqlConnectiontoMSSQLConnection. This is mostly useful for Vert.x generated APIs like RxJava/Mutiny.- Parameters:
sqlConnection- the connection to cast- Returns:
- a
instance
-