public class MySQLClient extends AsyncSQLClient
original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<MySQLClient> |
__TYPE_ARG |
static String |
DEFAULT_CHARSET
The default charset.
|
static long |
DEFAULT_CONNECT_TIMEOUT
The default timeout for connect.
|
static String |
DEFAULT_DATABASE
The default database.
|
static String |
DEFAULT_HOST
The default host.
|
static String |
DEFAULT_PASSWORD
The default database password.
|
static String |
DEFAULT_POOL_NAME
The default name used for the MySQL pool.
|
static int |
DEFAULT_PORT
The default port.
|
static long |
DEFAULT_TEST_TIMEOUT
The default timeout for tests.
|
static String |
DEFAULT_USER
The default database user.
|
Constructor and Description |
---|
MySQLClient(MySQLClient delegate) |
MySQLClient(Object delegate) |
Modifier and Type | Method and Description |
---|---|
static AsyncSQLClient |
createNonShared(Vertx vertx,
JsonObject config)
Create a MySQL client which maintains its own pool.
|
static AsyncSQLClient |
createShared(Vertx vertx,
JsonObject config)
Like
createShared(io.vertx.reactivex.core.Vertx, io.vertx.core.json.JsonObject, java.lang.String) but with the default pool name |
static AsyncSQLClient |
createShared(Vertx vertx,
JsonObject config,
String poolName)
Create a MySQL client which shares its data source with any other MySQL clients created with the same
data source name
|
boolean |
equals(Object o) |
MySQLClient |
getDelegate() |
int |
hashCode() |
static MySQLClient |
newInstance(MySQLClient arg) |
SQLOperations |
querySingle(String sql,
Handler<AsyncResult<JsonArray>> handler)
Execute a one shot SQL statement that returns a single SQL row.
|
SQLOperations |
querySingleWithParams(String sql,
JsonArray arguments,
Handler<AsyncResult<JsonArray>> handler)
Execute a one shot SQL statement with arguments that returns a single SQL row.
|
Maybe<JsonArray> |
rxQuerySingle(String sql)
Execute a one shot SQL statement that returns a single SQL row.
|
Maybe<JsonArray> |
rxQuerySingleWithParams(String sql,
JsonArray arguments)
Execute a one shot SQL statement with arguments that returns a single SQL row.
|
String |
toString() |
newInstance
call, callWithParams, close, close, getConnection, newInstance, query, queryStream, queryStreamWithParams, queryWithParams, rxCall, rxCallWithParams, rxClose, rxGetConnection, rxQuery, rxQueryStream, rxQueryStreamWithParams, rxQueryWithParams, rxUpdate, rxUpdateWithParams, update, updateWithParams
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
newInstance
public static final io.vertx.lang.rx.TypeArg<MySQLClient> __TYPE_ARG
public static final String DEFAULT_POOL_NAME
public static final String DEFAULT_HOST
public static final int DEFAULT_PORT
public static final String DEFAULT_DATABASE
public static final String DEFAULT_USER
public static final String DEFAULT_PASSWORD
public static final String DEFAULT_CHARSET
public static final long DEFAULT_CONNECT_TIMEOUT
public static final long DEFAULT_TEST_TIMEOUT
public MySQLClient(MySQLClient delegate)
public MySQLClient(Object delegate)
public String toString()
toString
in class AsyncSQLClient
public boolean equals(Object o)
equals
in class AsyncSQLClient
public int hashCode()
hashCode
in class AsyncSQLClient
public MySQLClient getDelegate()
getDelegate
in interface SQLOperations
getDelegate
in class AsyncSQLClient
public SQLOperations querySingle(String sql, Handler<AsyncResult<JsonArray>> handler)
querySingle
in interface SQLOperations
querySingle
in class AsyncSQLClient
sql
- the statement to executehandler
- the result handlerpublic Maybe<JsonArray> rxQuerySingle(String sql)
rxQuerySingle
in class AsyncSQLClient
sql
- the statement to executepublic SQLOperations querySingleWithParams(String sql, JsonArray arguments, Handler<AsyncResult<JsonArray>> handler)
querySingleWithParams
in interface SQLOperations
querySingleWithParams
in class AsyncSQLClient
sql
- the statement to executearguments
- the argumentshandler
- the result handlerpublic Maybe<JsonArray> rxQuerySingleWithParams(String sql, JsonArray arguments)
rxQuerySingleWithParams
in class AsyncSQLClient
sql
- the statement to executearguments
- the argumentspublic static AsyncSQLClient createNonShared(Vertx vertx, JsonObject config)
vertx
- the Vert.x instanceconfig
- the configurationpublic static AsyncSQLClient createShared(Vertx vertx, JsonObject config, String poolName)
vertx
- the Vert.x instanceconfig
- the configurationpoolName
- the pool namepublic static AsyncSQLClient createShared(Vertx vertx, JsonObject config)
createShared(io.vertx.reactivex.core.Vertx, io.vertx.core.json.JsonObject, java.lang.String)
but with the default pool namevertx
- the Vert.x instanceconfig
- the configurationpublic static MySQLClient newInstance(MySQLClient arg)
Copyright © 2023 Eclipse. All rights reserved.