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