public interface SQLOperations
| Modifier and Type | Method and Description |
|---|---|
SQLOperations |
query(String sql,
Handler<AsyncResult<ResultSet>> resultHandler)
Executes the given SQL
SELECT statement which returns the results of the query. |
default SQLOperations |
querySingle(String sql,
Handler<AsyncResult<JsonArray>> handler)
Execute a one shot SQL statement that returns a single SQL row.
|
default SQLOperations |
querySingleWithParams(String sql,
JsonArray arguments,
Handler<AsyncResult<JsonArray>> handler)
Execute a one shot SQL statement with arguments that returns a single SQL row.
|
SQLOperations |
queryWithParams(String sql,
JsonArray params,
Handler<AsyncResult<ResultSet>> resultHandler)
Executes the given SQL
SELECT prepared statement which returns the results of the query. |
SQLOperations |
update(String sql,
Handler<AsyncResult<UpdateResult>> resultHandler)
Executes the given SQL statement which may be an
INSERT, UPDATE, or DELETE
statement. |
SQLOperations |
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 |
SQLOperations 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.Statement.executeQuery(String),
Statement.executeQuery(String)SQLOperations 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.Statement.executeQuery(String),
Statement.executeQuery(String)default SQLOperations querySingle(String sql, Handler<AsyncResult<JsonArray>> handler)
sql - the statement to executehandler - the result handlerdefault SQLOperations querySingleWithParams(String sql, JsonArray arguments, Handler<AsyncResult<JsonArray>> handler)
sql - the statement to executearguments - the argumentshandler - the result handlerSQLOperations 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.Statement.executeUpdate(String),
Statement.executeUpdate(String)SQLOperations 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.Statement.executeUpdate(String),
Statement.executeUpdate(String)Copyright © 2017. All rights reserved.