Constructor and Description |
---|
SQLConnection(SQLConnection delegate) |
Modifier and Type | Method and Description |
---|---|
SQLConnection |
call(String sql,
Handler<AsyncResult<ResultSet>> resultHandler)
Calls the given SQL
PROCEDURE which returns the result from the procedure. |
rx.Observable<ResultSet> |
callObservable(String sql)
Calls the given SQL
PROCEDURE which returns the result from the procedure. |
SQLConnection |
callWithParams(String sql,
JsonArray params,
JsonArray outputs,
Handler<AsyncResult<ResultSet>> resultHandler)
Calls the given SQL
PROCEDURE which returns the result from the procedure. |
rx.Observable<ResultSet> |
callWithParamsObservable(String sql,
JsonArray params,
JsonArray outputs)
Calls the given SQL
PROCEDURE which returns the result from the procedure. |
void |
close()
Closes the connection.
|
void |
close(Handler<AsyncResult<Void>> handler)
Closes the connection.
|
rx.Observable<Void> |
closeObservable()
Closes the connection.
|
SQLConnection |
commit(Handler<AsyncResult<Void>> handler)
Commits all changes made since the previous commit/rollback.
|
rx.Observable<Void> |
commitObservable()
Commits all changes made since the previous commit/rollback.
|
SQLConnection |
execute(String sql,
Handler<AsyncResult<Void>> resultHandler)
Executes the given SQL statement
|
rx.Observable<Void> |
executeObservable(String sql)
Executes the given SQL statement
|
Object |
getDelegate() |
static SQLConnection |
newInstance(SQLConnection arg) |
SQLConnection |
query(String sql,
Handler<AsyncResult<ResultSet>> resultHandler)
Executes the given SQL
SELECT statement which returns the results of the query. |
rx.Observable<ResultSet> |
queryObservable(String sql)
Executes the given SQL
SELECT statement which returns the results of the query. |
SQLConnection |
queryWithParams(String sql,
JsonArray params,
Handler<AsyncResult<ResultSet>> resultHandler)
Executes the given SQL
SELECT prepared statement which returns the results of the query. |
rx.Observable<ResultSet> |
queryWithParamsObservable(String sql,
JsonArray params)
Executes the given SQL
SELECT prepared statement which returns the results of the query. |
SQLConnection |
rollback(Handler<AsyncResult<Void>> handler)
Rolls back all changes made since the previous commit/rollback.
|
rx.Observable<Void> |
rollbackObservable()
Rolls back all changes made since the previous commit/rollback.
|
SQLConnection |
setAutoCommit(boolean autoCommit,
Handler<AsyncResult<Void>> resultHandler)
Sets the auto commit flag for this connection.
|
rx.Observable<Void> |
setAutoCommitObservable(boolean autoCommit)
Sets the auto commit flag for this connection.
|
SQLConnection |
update(String sql,
Handler<AsyncResult<UpdateResult>> resultHandler)
Executes the given SQL statement which may be an
INSERT , UPDATE , or DELETE
statement. |
rx.Observable<UpdateResult> |
updateObservable(String sql)
Executes the given SQL statement which may be an
INSERT , UPDATE , or DELETE
statement. |
SQLConnection |
updateWithParams(String sql,
JsonArray params,
Handler<AsyncResult<UpdateResult>> resultHandler)
Executes the given prepared statement which may be an
INSERT , UPDATE , or DELETE
statement with the given parameters |
rx.Observable<UpdateResult> |
updateWithParamsObservable(String sql,
JsonArray params)
Executes the given prepared statement which may be an
INSERT , UPDATE , or DELETE
statement with the given parameters |
public SQLConnection(SQLConnection delegate)
public Object getDelegate()
public SQLConnection setAutoCommit(boolean autoCommit, Handler<AsyncResult<Void>> resultHandler)
autoCommit
- the autoCommit flag, true by default.resultHandler
- the handler which is called once this operation completes.public rx.Observable<Void> setAutoCommitObservable(boolean autoCommit)
autoCommit
- the autoCommit flag, true by default.public SQLConnection execute(String sql, Handler<AsyncResult<Void>> resultHandler)
sql
- the SQL to execute. For example CREATE TABLE IF EXISTS table ...
resultHandler
- the handler which is called once this operation completes.public rx.Observable<Void> executeObservable(String sql)
sql
- the SQL to execute. For example CREATE TABLE IF EXISTS table ...
public SQLConnection query(String sql, Handler<AsyncResult<ResultSet>> resultHandler)
SELECT
statement which returns the results of the query.sql
- the SQL to execute. For example SELECT * FROM table ...
.resultHandler
- the handler which is called once the operation completes. It will return a ResultSet
.public rx.Observable<ResultSet> queryObservable(String sql)
SELECT
statement which returns the results of the query.sql
- the SQL to execute. For example SELECT * FROM table ...
.public SQLConnection queryWithParams(String sql, JsonArray params, Handler<AsyncResult<ResultSet>> resultHandler)
SELECT
prepared statement which returns the results of the query.sql
- the SQL to execute. For example SELECT * FROM table ...
.params
- these are the parameters to fill the statement.resultHandler
- the handler which is called once the operation completes. It will return a ResultSet
.public rx.Observable<ResultSet> queryWithParamsObservable(String sql, JsonArray params)
SELECT
prepared statement which returns the results of the query.sql
- the SQL to execute. For example SELECT * FROM table ...
.params
- these are the parameters to fill the statement.public SQLConnection update(String sql, Handler<AsyncResult<UpdateResult>> resultHandler)
INSERT
, UPDATE
, or DELETE
statement.sql
- the SQL to execute. For example INSERT INTO table ...
resultHandler
- the handler which is called once the operation completes.public rx.Observable<UpdateResult> updateObservable(String sql)
INSERT
, UPDATE
, or DELETE
statement.sql
- the SQL to execute. For example INSERT INTO table ...
public SQLConnection updateWithParams(String sql, JsonArray params, Handler<AsyncResult<UpdateResult>> resultHandler)
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.resultHandler
- the handler which is called once the operation completes.public rx.Observable<UpdateResult> updateWithParamsObservable(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 SQLConnection call(String sql, Handler<AsyncResult<ResultSet>> resultHandler)
PROCEDURE
which returns the result from the procedure.sql
- the SQL to execute. For example {call getEmpName (?, ?)}
.resultHandler
- the handler which is called once the operation completes. It will return a ResultSet
.public rx.Observable<ResultSet> callObservable(String sql)
PROCEDURE
which returns the result from the procedure.sql
- the SQL to execute. For example {call getEmpName (?, ?)}
.public SQLConnection callWithParams(String sql, JsonArray params, JsonArray outputs, Handler<AsyncResult<ResultSet>> resultHandler)
PROCEDURE
which returns the result from the procedure.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.resultHandler
- the handler which is called once the operation completes. It will return a ResultSet
.public rx.Observable<ResultSet> callWithParamsObservable(String sql, JsonArray params, JsonArray outputs)
PROCEDURE
which returns the result from the procedure.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 void close(Handler<AsyncResult<Void>> handler)
handler
- the handler called when this operation completes.public rx.Observable<Void> closeObservable()
public void close()
public SQLConnection commit(Handler<AsyncResult<Void>> handler)
handler
- the handler called when this operation completes.public rx.Observable<Void> commitObservable()
public SQLConnection rollback(Handler<AsyncResult<Void>> handler)
handler
- the handler called when this operation completes.public rx.Observable<Void> rollbackObservable()
public static SQLConnection newInstance(SQLConnection arg)
Copyright © 2015. All rights reserved.