public interface Pool extends SqlClient
| Modifier and Type | Method and Description |
|---|---|
Future<Transaction> |
begin()
Like
begin(Handler) but returns a Future of the asynchronous result |
void |
begin(Handler<AsyncResult<Transaction>> handler)
Borrow a connection from the pool and begin a transaction, the underlying connection will be returned
to the pool when the transaction ends.
|
void |
close()
Close the pool and release the associated resources.
|
Future<SqlConnection> |
getConnection()
Like
getConnection(Handler) but returns a Future of the asynchronous result |
void |
getConnection(Handler<AsyncResult<SqlConnection>> handler)
Get a connection from the pool.
|
<R> Pool |
preparedBatch(String sql,
List<Tuple> batch,
java.util.stream.Collector<Row,?,R> collector,
Handler<AsyncResult<SqlResult<R>>> handler)
Prepare and execute a createBatch.
|
Pool |
preparedBatch(String sql,
List<Tuple> batch,
Handler<AsyncResult<RowSet<Row>>> handler)
Prepare and execute a createBatch.
|
<R> Pool |
preparedQuery(String sql,
java.util.stream.Collector<Row,?,R> collector,
Handler<AsyncResult<SqlResult<R>>> handler)
Prepare and execute a query.
|
Pool |
preparedQuery(String sql,
Handler<AsyncResult<RowSet<Row>>> handler)
Prepare and execute a query.
|
<R> Pool |
preparedQuery(String sql,
Tuple arguments,
java.util.stream.Collector<Row,?,R> collector,
Handler<AsyncResult<SqlResult<R>>> handler)
Prepare and execute a query.
|
Pool |
preparedQuery(String sql,
Tuple arguments,
Handler<AsyncResult<RowSet<Row>>> handler)
Prepare and execute a query.
|
<R> Pool |
query(String sql,
java.util.stream.Collector<Row,?,R> collector,
Handler<AsyncResult<SqlResult<R>>> handler)
Execute a simple query.
|
Pool |
query(String sql,
Handler<AsyncResult<RowSet<Row>>> handler)
Execute a simple query.
|
preparedBatch, preparedBatch, preparedQuery, preparedQuery, preparedQuery, preparedQuery, query, queryPool preparedQuery(String sql, Handler<AsyncResult<RowSet<Row>>> handler)
SqlClientpreparedQuery in interface SqlClientsql - the prepared query SQLhandler - the handler notified with the execution result<R> Pool preparedQuery(String sql, java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)
SqlClientpreparedQuery in interface SqlClientsql - the prepared query SQLcollector - the collectorhandler - the handler notified with the execution resultPool query(String sql, Handler<AsyncResult<RowSet<Row>>> handler)
SqlClient<R> Pool query(String sql, java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)
SqlClientPool preparedQuery(String sql, Tuple arguments, Handler<AsyncResult<RowSet<Row>>> handler)
SqlClientpreparedQuery in interface SqlClientsql - the prepared query SQLarguments - the list of argumentshandler - the handler notified with the execution result<R> Pool preparedQuery(String sql, Tuple arguments, java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)
SqlClientpreparedQuery in interface SqlClientsql - the prepared query SQLarguments - the list of argumentscollector - the collectorhandler - the handler notified with the execution resultPool preparedBatch(String sql, List<Tuple> batch, Handler<AsyncResult<RowSet<Row>>> handler)
SqlClientpreparedBatch in interface SqlClientsql - the prepared query SQLbatch - the batch of tupleshandler - the handler notified with the execution result<R> Pool preparedBatch(String sql, List<Tuple> batch, java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)
SqlClientpreparedBatch in interface SqlClientsql - the prepared query SQLbatch - the batch of tuplescollector - the collectorhandler - the handler notified with the execution resultvoid getConnection(Handler<AsyncResult<SqlConnection>> handler)
handler - the handler that will get the connection resultFuture<SqlConnection> getConnection()
getConnection(Handler) but returns a Future of the asynchronous resultvoid begin(Handler<AsyncResult<Transaction>> handler)
Future<Transaction> begin()
begin(Handler) but returns a Future of the asynchronous resultCopyright © 2019 Eclipse. All rights reserved.