public class SQLClient extends Object implements SQLOperations
original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<SQLClient> |
__TYPE_ARG |
Constructor and Description |
---|
SQLClient(Object delegate) |
SQLClient(SQLClient delegate) |
Modifier and Type | Method and Description |
---|---|
SQLClient |
call(String sql,
Handler<AsyncResult<ResultSet>> handler)
Calls the given SQL
PROCEDURE which returns the result from the procedure. |
Observable<ResultSet> |
callObservable(String sql)
Deprecated.
use
rxCall(java.lang.String) instead |
SQLClient |
callWithParams(String sql,
JsonArray params,
JsonArray outputs,
Handler<AsyncResult<ResultSet>> handler)
Calls the given SQL
PROCEDURE which returns the result from the procedure. |
Observable<ResultSet> |
callWithParamsObservable(String sql,
JsonArray params,
JsonArray outputs)
Deprecated.
|
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 |
queryStream(String sql,
Handler<AsyncResult<SQLRowStream>> handler)
Executes the given SQL
SELECT statement which returns the results of the query as a read stream. |
Observable<SQLRowStream> |
queryStreamObservable(String sql)
Deprecated.
use
rxQueryStream(java.lang.String) instead |
SQLClient |
queryStreamWithParams(String sql,
JsonArray params,
Handler<AsyncResult<SQLRowStream>> handler)
Executes the given SQL
SELECT statement which returns the results of the query as a read stream. |
Observable<SQLRowStream> |
queryStreamWithParamsObservable(String sql,
JsonArray params)
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<ResultSet> |
rxCall(String sql)
Calls the given SQL
PROCEDURE which returns the result from the procedure. |
Single<ResultSet> |
rxCallWithParams(String sql,
JsonArray params,
JsonArray outputs)
Calls the given SQL
PROCEDURE which returns the result from the procedure. |
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<SQLRowStream> |
rxQueryStream(String sql)
Executes the given SQL
SELECT statement which returns the results of the query as a read stream. |
Single<SQLRowStream> |
rxQueryStreamWithParams(String sql,
JsonArray params)
Executes the given SQL
SELECT statement which returns the results of the query as a read stream. |
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, wait
newInstance
public static final io.vertx.lang.rx.TypeArg<SQLClient> __TYPE_ARG
public SQLClient(SQLClient delegate)
public SQLClient(Object delegate)
public SQLClient getDelegate()
getDelegate
in interface SQLOperations
public SQLOperations querySingle(String sql, Handler<AsyncResult<JsonArray>> handler)
querySingle
in interface SQLOperations
sql
- 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 SQLOperations
sql
- 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 SQLOperations
sql
- 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 queryStream(String sql, Handler<AsyncResult<SQLRowStream>> handler)
SELECT
statement which returns the results of the query as a read stream.queryStream
in interface SQLOperations
sql
- the SQL to execute. For example SELECT * FROM table ...
.handler
- the handler which is called once the operation completes. It will return a SQLRowStream
.@Deprecated public Observable<SQLRowStream> queryStreamObservable(String sql)
rxQueryStream(java.lang.String)
insteadSELECT
statement which returns the results of the query as a read stream.sql
- the SQL to execute. For example SELECT * FROM table ...
.public Single<SQLRowStream> rxQueryStream(String sql)
SELECT
statement which returns the results of the query as a read stream.sql
- the SQL to execute. For example SELECT * FROM table ...
.public SQLClient queryStreamWithParams(String sql, JsonArray params, Handler<AsyncResult<SQLRowStream>> handler)
SELECT
statement which returns the results of the query as a read stream.queryStreamWithParams
in interface SQLOperations
sql
- the SQL to execute. For example SELECT * FROM table ...
.params
- these are the parameters to fill the statement.handler
- the handler which is called once the operation completes. It will return a SQLRowStream
.@Deprecated public Observable<SQLRowStream> queryStreamWithParamsObservable(String sql, JsonArray params)
rxQueryStreamWithParams(java.lang.String, io.vertx.core.json.JsonArray)
insteadSELECT
statement which returns the results of the query as a read stream.sql
- the SQL to execute. For example SELECT * FROM table ...
.params
- these are the parameters to fill the statement.public Single<SQLRowStream> rxQueryStreamWithParams(String sql, JsonArray params)
SELECT
statement which returns the results of the query as a read stream.sql
- the SQL to execute. For example SELECT * FROM table ...
.params
- these are the parameters to fill the statement.public SQLClient queryWithParams(String sql, JsonArray arguments, Handler<AsyncResult<ResultSet>> handler)
queryWithParams
in interface SQLOperations
sql
- 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 SQLOperations
sql
- 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 SQLOperations
sql
- 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.public SQLClient call(String sql, Handler<AsyncResult<ResultSet>> handler)
PROCEDURE
which returns the result from the procedure.call
in interface SQLOperations
sql
- the SQL to execute. For example {call getEmpName}
.handler
- the handler which is called once the operation completes. It will return a ResultSet
.@Deprecated public Observable<ResultSet> callObservable(String sql)
rxCall(java.lang.String)
insteadPROCEDURE
which returns the result from the procedure.sql
- the SQL to execute. For example {call getEmpName}
.public Single<ResultSet> rxCall(String sql)
PROCEDURE
which returns the result from the procedure.sql
- the SQL to execute. For example {call getEmpName}
.public SQLClient callWithParams(String sql, JsonArray params, JsonArray outputs, Handler<AsyncResult<ResultSet>> handler)
PROCEDURE
which returns the result from the procedure.
The index of params and outputs are important for both arrays, for example when dealing with a prodecure that
takes the first 2 arguments as input values and the 3 arg as an output then the arrays should be like:
params = [VALUE1, VALUE2, null] outputs = [null, null, "VARCHAR"]
callWithParams
in interface SQLOperations
sql
- the SQL to execute. For example {call getEmpName (?, ?)}
.params
- these are the parameters to fill the statement.outputs
- these are the outputs to fill the statement.handler
- the handler which is called once the operation completes. It will return a ResultSet
.@Deprecated public Observable<ResultSet> callWithParamsObservable(String sql, JsonArray params, JsonArray outputs)
rxCallWithParams(java.lang.String, io.vertx.core.json.JsonArray, io.vertx.core.json.JsonArray)
insteadPROCEDURE
which returns the result from the procedure.
The index of params and outputs are important for both arrays, for example when dealing with a prodecure that
takes the first 2 arguments as input values and the 3 arg as an output then the arrays should be like:
params = [VALUE1, VALUE2, null] outputs = [null, null, "VARCHAR"]
sql
- the SQL to execute. For example {call getEmpName (?, ?)}
.params
- these are the parameters to fill the statement.outputs
- these are the outputs to fill the statement.public Single<ResultSet> rxCallWithParams(String sql, JsonArray params, JsonArray outputs)
PROCEDURE
which returns the result from the procedure.
The index of params and outputs are important for both arrays, for example when dealing with a prodecure that
takes the first 2 arguments as input values and the 3 arg as an output then the arrays should be like:
params = [VALUE1, VALUE2, null] outputs = [null, null, "VARCHAR"]
sql
- the SQL to execute. For example {call getEmpName (?, ?)}
.params
- these are the parameters to fill the statement.outputs
- these are the outputs to fill the statement.Copyright © 2023 Eclipse. All rights reserved.