public class SQLClient extends Object implements SQLOperations
original non RX-ified interface using Vert.x codegen.| Modifier and Type | Field and Description |
|---|---|
static TypeArg<SQLClient> |
__TYPE_ARG |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the client
|
void |
close(Handler<AsyncResult<Void>> handler)
Close the client and release all resources.
|
Observable<Void> |
closeObservable()
Deprecated.
use
rxClose() instead |
boolean |
equals(Object o) |
SQLClient |
getConnection(Handler<AsyncResult<SQLConnection>> handler)
Returns a connection that can be used to perform SQL operations on.
|
Observable<SQLConnection> |
getConnectionObservable()
Deprecated.
use
rxGetConnection() instead |
SQLClient |
getDelegate() |
int |
hashCode() |
static SQLClient |
newInstance(SQLClient arg) |
SQLClient |
query(String sql,
Handler<AsyncResult<ResultSet>> handler)
Execute a single SQL statement, this method acquires a connection from the the pool and executes the SQL
statement and returns it back after the execution.
|
Observable<ResultSet> |
queryObservable(String sql)
Deprecated.
use
rxQuery(java.lang.String) instead |
SQLOperations |
querySingle(String sql,
Handler<AsyncResult<JsonArray>> handler)
Execute a one shot SQL statement that returns a single SQL row.
|
Observable<JsonArray> |
querySingleObservable(String sql)
Deprecated.
use
rxQuerySingle(java.lang.String) instead |
SQLOperations |
querySingleWithParams(String sql,
JsonArray arguments,
Handler<AsyncResult<JsonArray>> handler)
Execute a one shot SQL statement with arguments that returns a single SQL row.
|
Observable<JsonArray> |
querySingleWithParamsObservable(String sql,
JsonArray arguments)
Deprecated.
|
SQLClient |
queryWithParams(String sql,
JsonArray arguments,
Handler<AsyncResult<ResultSet>> handler)
Execute a single SQL prepared statement, this method acquires a connection from the the pool and executes the SQL
prepared statement and returns it back after the execution.
|
Observable<ResultSet> |
queryWithParamsObservable(String sql,
JsonArray arguments)
Deprecated.
|
Single<Void> |
rxClose()
Close the client and release all resources.
|
Single<SQLConnection> |
rxGetConnection()
Returns a connection that can be used to perform SQL operations on.
|
Single<ResultSet> |
rxQuery(String sql)
Execute a single SQL statement, this method acquires a connection from the the pool and executes the SQL
statement and returns it back after the execution.
|
Single<JsonArray> |
rxQuerySingle(String sql)
Execute a one shot SQL statement that returns a single SQL row.
|
Single<JsonArray> |
rxQuerySingleWithParams(String sql,
JsonArray arguments)
Execute a one shot SQL statement with arguments that returns a single SQL row.
|
Single<ResultSet> |
rxQueryWithParams(String sql,
JsonArray arguments)
Execute a single SQL prepared statement, this method acquires a connection from the the pool and executes the SQL
prepared statement and returns it back after the execution.
|
Single<UpdateResult> |
rxUpdate(String sql)
Executes the given SQL statement which may be an
INSERT, UPDATE, or DELETE
statement. |
Single<UpdateResult> |
rxUpdateWithParams(String sql,
JsonArray params)
Executes the given prepared statement which may be an
INSERT, UPDATE, or DELETE
statement with the given parameters |
String |
toString() |
SQLClient |
update(String sql,
Handler<AsyncResult<UpdateResult>> handler)
Executes the given SQL statement which may be an
INSERT, UPDATE, or DELETE
statement. |
Observable<UpdateResult> |
updateObservable(String sql)
Deprecated.
use
rxUpdate(java.lang.String) instead |
SQLClient |
updateWithParams(String sql,
JsonArray params,
Handler<AsyncResult<UpdateResult>> handler)
Executes the given prepared statement which may be an
INSERT, UPDATE, or DELETE
statement with the given parameters |
Observable<UpdateResult> |
updateWithParamsObservable(String sql,
JsonArray params)
Deprecated.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitnewInstancepublic SQLClient(SQLClient delegate)
public SQLClient getDelegate()
getDelegate in interface SQLOperationspublic SQLOperations querySingle(String sql, Handler<AsyncResult<JsonArray>> handler)
querySingle in interface SQLOperationssql - the statement to executehandler - the result handler@Deprecated public Observable<JsonArray> querySingleObservable(String sql)
rxQuerySingle(java.lang.String) insteadsql - the statement to executepublic Single<JsonArray> rxQuerySingle(String sql)
sql - the statement to executepublic SQLOperations querySingleWithParams(String sql, JsonArray arguments, Handler<AsyncResult<JsonArray>> handler)
querySingleWithParams in interface SQLOperationssql - the statement to executearguments - the argumentshandler - the result handler@Deprecated public Observable<JsonArray> querySingleWithParamsObservable(String sql, JsonArray arguments)
rxQuerySingleWithParams(java.lang.String, io.vertx.core.json.JsonArray) insteadsql - the statement to executearguments - the argumentspublic Single<JsonArray> rxQuerySingleWithParams(String sql, JsonArray arguments)
sql - the statement to executearguments - the argumentspublic SQLClient getConnection(Handler<AsyncResult<SQLConnection>> handler)
handler - the handler which is called when the JdbcConnection object is ready for use.@Deprecated public Observable<SQLConnection> getConnectionObservable()
rxGetConnection() insteadpublic Single<SQLConnection> rxGetConnection()
public void close(Handler<AsyncResult<Void>> handler)
handler - the handler that will be called when close is complete@Deprecated public Observable<Void> closeObservable()
rxClose() insteadpublic Single<Void> rxClose()
public void close()
public SQLClient query(String sql, Handler<AsyncResult<ResultSet>> handler)
query in interface SQLOperationssql - the statement to executehandler - the result handler@Deprecated public Observable<ResultSet> queryObservable(String sql)
rxQuery(java.lang.String) insteadsql - the statement to executepublic Single<ResultSet> rxQuery(String sql)
sql - the statement to executepublic SQLClient queryWithParams(String sql, JsonArray arguments, Handler<AsyncResult<ResultSet>> handler)
queryWithParams in interface SQLOperationssql - the statement to executearguments - the arguments to the statementhandler - the result handler@Deprecated public Observable<ResultSet> queryWithParamsObservable(String sql, JsonArray arguments)
rxQueryWithParams(java.lang.String, io.vertx.core.json.JsonArray) insteadsql - the statement to executearguments - the arguments to the statementpublic Single<ResultSet> rxQueryWithParams(String sql, JsonArray arguments)
sql - the statement to executearguments - the arguments to the statementpublic SQLClient update(String sql, Handler<AsyncResult<UpdateResult>> handler)
INSERT, UPDATE, or DELETE
statement.update in interface SQLOperationssql - the SQL to execute. For example INSERT INTO table ...handler - the handler which is called once the operation completes.@Deprecated public Observable<UpdateResult> updateObservable(String sql)
rxUpdate(java.lang.String) insteadINSERT, UPDATE, or DELETE
statement.sql - the SQL to execute. For example INSERT INTO table ...public Single<UpdateResult> rxUpdate(String sql)
INSERT, UPDATE, or DELETE
statement.sql - the SQL to execute. For example INSERT INTO table ...public SQLClient updateWithParams(String sql, JsonArray params, Handler<AsyncResult<UpdateResult>> handler)
INSERT, UPDATE, or DELETE
statement with the given parametersupdateWithParams in interface SQLOperationssql - the SQL to execute. For example INSERT INTO table ...params - these are the parameters to fill the statement.handler - the handler which is called once the operation completes.@Deprecated public Observable<UpdateResult> updateWithParamsObservable(String sql, JsonArray params)
rxUpdateWithParams(java.lang.String, io.vertx.core.json.JsonArray) insteadINSERT, UPDATE, or DELETE
statement with the given parameterssql - the SQL to execute. For example INSERT INTO table ...params - these are the parameters to fill the statement.public Single<UpdateResult> rxUpdateWithParams(String sql, JsonArray params)
INSERT, UPDATE, or DELETE
statement with the given parameterssql - the SQL to execute. For example INSERT INTO table ...params - these are the parameters to fill the statement.Copyright © 2017. All rights reserved.