public interface PreparedQuery
Modifier and Type | Method and Description |
---|---|
<R> PreparedQuery |
batch(List<Tuple> argsList,
java.util.stream.Collector<Row,?,R> collector,
Handler<AsyncResult<SqlResult<R>>> handler)
Execute a batch.
|
PreparedQuery |
batch(List<Tuple> argsList,
Handler<AsyncResult<RowSet<Row>>> handler)
Execute a batch.
|
void |
close()
Close the prepared query and release its resources.
|
void |
close(Handler<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(java.util.stream.Collector<Row,?,R> collector,
Handler<AsyncResult<SqlResult<R>>> handler)
Calls
execute(Tuple, Collector, Handler) with an empty tuple argument. |
default PreparedQuery |
execute(Handler<AsyncResult<RowSet<Row>>> handler)
Calls
execute(Tuple, Handler) with an empty tuple argument. |
<R> PreparedQuery |
execute(Tuple args,
java.util.stream.Collector<Row,?,R> collector,
Handler<AsyncResult<SqlResult<R>>> handler)
Create a cursor with the provided
arguments . |
PreparedQuery |
execute(Tuple args,
Handler<AsyncResult<RowSet<Row>>> handler)
Create a cursor with the provided
arguments . |
default PreparedQuery execute(Handler<AsyncResult<RowSet<Row>>> handler)
execute(Tuple, Handler)
with an empty tuple argument.default <R> PreparedQuery execute(java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)
execute(Tuple, Collector, Handler)
with an empty tuple argument.PreparedQuery execute(Tuple args, Handler<AsyncResult<RowSet<Row>>> handler)
arguments
.args
- the list of arguments<R> PreparedQuery execute(Tuple args, java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)
arguments
.
The collector will be providedargs
- 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, Handler<AsyncResult<RowSet<Row>>> handler)
argsList
- the list of tuple for the batch<R> PreparedQuery batch(List<Tuple> argsList, java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)
argsList
- the list of tuple for the batchcollector
- the collectorvoid close()
void close(Handler<AsyncResult<Void>> completionHandler)
close()
but notifies the completionHandler
when it's closed.Copyright © 2019 Eclipse. All rights reserved.