/** * Execute a one shot SQL statement 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 handler the result handler * @return self */ @Fluent default SQLOperations querySingle(String sql, Handler<AsyncResult<@Nullable JsonArray>> handler) { return query(sql, HandlerUtil.handleResultSetSingleRow(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)); }