public interface MySQLConnection extends SqlConnection
Modifier and Type | Method and Description |
---|---|
MySQLConnection |
changeUser(MySQLAuthOptions options,
Handler<AsyncResult<Void>> handler)
Send a CHANGE_USER command to change the user of the current connection, this operation will also reset connection state.
|
MySQLConnection |
closeHandler(Handler<Void> handler)
Set an handler called when the connection is closed.
|
static void |
connect(Vertx vertx,
MySQLConnectOptions connectOptions,
Handler<AsyncResult<MySQLConnection>> handler)
Create a connection to MySQL server with the given
connectOptions . |
static void |
connect(Vertx vertx,
String connectionUri,
Handler<AsyncResult<MySQLConnection>> handler)
Like
connect(Vertx, MySQLConnectOptions, Handler) with options build from connectionUri . |
MySQLConnection |
debug(Handler<AsyncResult<Void>> handler)
Send a DEBUG command to dump debug information to the server's stdout.
|
MySQLConnection |
exceptionHandler(Handler<Throwable> handler)
Set an handler called with connection errors.
|
MySQLConnection |
getInternalStatistics(Handler<AsyncResult<String>> handler)
Send a STATISTICS command to get a human readable string of the server internal status.
|
MySQLConnection |
ping(Handler<AsyncResult<Void>> handler)
Send a PING command to check if the server is alive.
|
MySQLConnection |
prepare(String sql,
Handler<AsyncResult<PreparedStatement>> handler)
Create a prepared query.
|
MySQLConnection |
resetConnection(Handler<AsyncResult<Void>> handler)
Send a RESET_CONNECTION command to reset the session state.
|
MySQLConnection |
setOption(MySQLSetOption option,
Handler<AsyncResult<Void>> handler)
Send a SET_OPTION command to set options for the current connection.
|
MySQLConnection |
specifySchema(String schemaName,
Handler<AsyncResult<Void>> handler)
Send a INIT_DB command to change the default schema of the connection.
|
begin, close, databaseMetadata, isSSL
preparedQuery, query
static void connect(Vertx vertx, MySQLConnectOptions connectOptions, Handler<AsyncResult<MySQLConnection>> handler)
connectOptions
.vertx
- the vertx instanceconnectOptions
- the options for the connectionhandler
- the handler called with the connection or the failurestatic void connect(Vertx vertx, String connectionUri, Handler<AsyncResult<MySQLConnection>> handler)
connect(Vertx, MySQLConnectOptions, Handler)
with options build from connectionUri
.MySQLConnection prepare(String sql, Handler<AsyncResult<PreparedStatement>> handler)
SqlConnection
prepare
in interface SqlConnection
sql
- the sqlhandler
- the handler notified with the prepared query asynchronouslyMySQLConnection exceptionHandler(Handler<Throwable> handler)
SqlConnection
exceptionHandler
in interface SqlConnection
handler
- the handlerMySQLConnection closeHandler(Handler<Void> handler)
SqlConnection
closeHandler
in interface SqlConnection
handler
- the handlerMySQLConnection ping(Handler<AsyncResult<Void>> handler)
handler
- the handler notified when the server responses to clientMySQLConnection specifySchema(String schemaName, Handler<AsyncResult<Void>> handler)
schemaName
- name of the schema to change tohandler
- the handler notified with the execution resultMySQLConnection getInternalStatistics(Handler<AsyncResult<String>> handler)
handler
- the handler notified with the execution resultMySQLConnection setOption(MySQLSetOption option, Handler<AsyncResult<Void>> handler)
option
- the options to sethandler
- the handler notified with the execution resultMySQLConnection resetConnection(Handler<AsyncResult<Void>> handler)
handler
- the handler notified with the execution resultMySQLConnection debug(Handler<AsyncResult<Void>> handler)
handler
- the handler notified with the execution resultMySQLConnection changeUser(MySQLAuthOptions options, Handler<AsyncResult<Void>> handler)
options
- authentication optionshandler
- the handlerCopyright © 2023 Eclipse. All rights reserved.