/** * 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 * @return self * @deprecated use {@link #rxQuerySingleWithParams} instead */ @Deprecated() public Observable<JsonArray> querySingleWithParamsObservable(String sql, JsonArray arguments) { io.vertx.rx.java.ObservableFuture<JsonArray> handler = io.vertx.rx.java.RxHelper.observableFuture(); querySingleWithParams(sql, arguments, handler.toHandler()); return 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 * @return self */ public Single<JsonArray> rxQuerySingleWithParams(String sql, JsonArray arguments) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { querySingleWithParams(sql, arguments, fut); })); }
/** * 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 * @return self */ public Single<JsonArray> rxQuerySingleWithParams(String sql, JsonArray arguments) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { querySingleWithParams(sql, arguments, fut); })); }