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, isSSLpreparedQuery, querystatic 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)
SqlConnectionprepare in interface SqlConnectionsql - the sqlhandler - the handler notified with the prepared query asynchronouslyMySQLConnection exceptionHandler(Handler<Throwable> handler)
SqlConnectionexceptionHandler in interface SqlConnectionhandler - the handlerMySQLConnection closeHandler(Handler<Void> handler)
SqlConnectioncloseHandler in interface SqlConnectionhandler - 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 © 2021 Eclipse. All rights reserved.