/** * Executes the given SQL <code>SELECT</code> prepared statement which returns the results of the query. * @param sql the SQL to execute. For example <code>SELECT * FROM table ...</code>. * @param params these are the parameters to fill the statement. * @param resultHandler the handler which is called once the operation completes. It will return a <code>ResultSet</code>. * @return */ public io.vertx.rxjava.ext.sql.SQLOperations queryWithParams(String sql, JsonArray params, Handler<AsyncResult<ResultSet>> resultHandler) { delegate.queryWithParams(sql, params, resultHandler); return this; }
/** * Executes the given SQL <code>SELECT</code> prepared statement which returns the results of the query. * @param sql the SQL to execute. For example <code>SELECT * FROM table ...</code>. * @param params these are the parameters to fill the statement. * @param resultHandler the handler which is called once the operation completes. It will return a <code>ResultSet</code>. * @return */ public io.vertx.rxjava.ext.sql.SQLOperations queryWithParams(String sql, JsonArray params, Handler<AsyncResult<ResultSet>> resultHandler) { delegate.queryWithParams(sql, params, resultHandler); return this; }
public static io.vertx.ext.sql.SQLOperations queryWithParams(io.vertx.ext.sql.SQLOperations j_receiver, java.lang.String sql, java.util.List<Object> params, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) { io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.queryWithParams(sql, params != null ? io.vertx.core.impl.ConversionHelper.toJsonArray(params) : null, resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.sql.ResultSet>>() { public void handle(io.vertx.core.AsyncResult<io.vertx.ext.sql.ResultSet> ar) { resultHandler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null)); } } : null)); return j_receiver; } public static io.vertx.ext.sql.SQLOperations queryStreamWithParams(io.vertx.ext.sql.SQLOperations j_receiver, java.lang.String sql, java.util.List<Object> params, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.sql.SQLRowStream>> handler) {
/** * Execute a one shot SQL statement with arguments that returns a single SQL row. This method will reduce the * boilerplate code by getting a connection from the pool (this object) and return it back after the execution. * Only the first result from the result set is returned. * * @param sql the statement to execute * @param arguments the arguments * @param handler the result handler * @return self */ @Fluent default SQLOperations querySingleWithParams(String sql, JsonArray arguments, Handler<AsyncResult<@Nullable JsonArray>> handler) { return queryWithParams(sql, arguments, HandlerUtil.handleResultSetSingleRow(handler)); }