public interface PreparedQuery
Modifier and Type | Method and Description |
---|---|
<R> PreparedQuery |
batch(List<Tuple> argsList,
Collector<Row,?,R> collector,
io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
Execute a batch.
|
PreparedQuery |
batch(List<Tuple> argsList,
io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet>> handler)
Execute a batch.
|
void |
close()
Close the prepared query and release its resources.
|
void |
close(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> completionHandler)
Like
close() but notifies the completionHandler when it's closed. |
RowStream<Row> |
createStream(int fetch,
Tuple args)
Execute the prepared query with a cursor and createStream the result.
|
default Cursor |
cursor() |
Cursor |
cursor(Tuple args)
Create a cursor with the provided
arguments . |
default <R> PreparedQuery |
execute(Collector<Row,?,R> collector,
io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
Calls
execute(Tuple, Collector, Handler) with an empty tuple argument. |
default PreparedQuery |
execute(io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet>> handler)
Calls
execute(Tuple, Handler) with an empty tuple argument. |
<R> PreparedQuery |
execute(Tuple args,
Collector<Row,?,R> collector,
io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
Create a cursor with the provided
arguments . |
PreparedQuery |
execute(Tuple args,
io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet>> handler)
Create a cursor with the provided
arguments . |
default PreparedQuery execute(io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet>> handler)
execute(Tuple, Handler)
with an empty tuple argument.default <R> PreparedQuery execute(Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
execute(Tuple, Collector, Handler)
with an empty tuple argument.PreparedQuery execute(Tuple args, io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet>> handler)
arguments
.args
- the list of arguments<R> PreparedQuery execute(Tuple args, Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
arguments
.args
- the list of argumentscollector
- the collectordefault Cursor cursor()
fetch
size and empty argumentsCursor cursor(Tuple args)
arguments
.args
- the list of argumentsRowStream<Row> createStream(int fetch, Tuple args)
fetch
size to fetch the results.
Note: this requires to be in a transaction, since cursors require it.fetch
- the cursor fetch sizeargs
- the prepared query argumentsPreparedQuery batch(List<Tuple> argsList, io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet>> handler)
argsList
- the list of tuple for the batch<R> PreparedQuery batch(List<Tuple> argsList, Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
argsList
- the list of tuple for the batchcollector
- the collectorvoid close()
Copyright © 2019 Eclipse. All rights reserved.