Package io.vertx.mssqlclient
Interface MSSQLConnection
-
- All Superinterfaces:
SqlClient
,SqlConnection
public interface MSSQLConnection extends SqlConnection
A connection to Microsoft SQL Server.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static MSSQLConnection
cast(SqlConnection sqlConnection)
Cast aSqlConnection
toMSSQLConnection
.MSSQLConnection
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>
connect(Vertx vertx, String connectionUri)
Likeconnect(Vertx, MSSQLConnectOptions)
with options built fromconnectionUri
.MSSQLConnection
exceptionHandler(Handler<Throwable> handler)
Set an handler called with connection errors.MSSQLConnection
infoHandler(Handler<MSSQLInfo> handler)
Set a handler called when the connection receives an informational message from the server.-
Methods inherited from interface io.vertx.sqlclient.SqlClient
close, preparedQuery, preparedQuery, query
-
Methods inherited from interface io.vertx.sqlclient.SqlConnection
begin, databaseMetadata, isSSL, prepare, prepare, transaction
-
-
-
-
Method Detail
-
connect
static Future<MSSQLConnection> connect(Vertx vertx, MSSQLConnectOptions connectOptions)
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
static Future<MSSQLConnection> connect(Vertx vertx, String connectionUri)
Likeconnect(Vertx, MSSQLConnectOptions)
with options built fromconnectionUri
.
-
exceptionHandler
MSSQLConnection exceptionHandler(Handler<Throwable> handler)
Set an handler called with connection errors.- Specified by:
exceptionHandler
in interfaceSqlConnection
- Parameters:
handler
- the handler- Returns:
- a reference to this, so the API can be used fluently
-
closeHandler
MSSQLConnection closeHandler(Handler<Void> handler)
Set an handler called when the connection is closed.- Specified by:
closeHandler
in interfaceSqlConnection
- Parameters:
handler
- the handler- Returns:
- a reference to this, so the API can be used fluently
-
infoHandler
MSSQLConnection infoHandler(Handler<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
static MSSQLConnection cast(SqlConnection sqlConnection)
Cast aSqlConnection
toMSSQLConnection
. This is mostly useful for Vert.x generated APIs like RxJava/Mutiny.- Parameters:
sqlConnection
- the connection to cast- Returns:
- a
instance
-
-