public interface Pool extends SqlClient
Modifier and Type | Method and Description |
---|---|
void |
begin(io.vertx.core.Handler<io.vertx.core.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.
|
void |
getConnection(io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlConnection>> handler)
Get a connection from the pool.
|
<R> Pool |
preparedBatch(String sql,
List<Tuple> batch,
Collector<Row,?,R> collector,
io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
Prepare and execute a createBatch.
|
Pool |
preparedBatch(String sql,
List<Tuple> batch,
io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet>> handler)
Prepare and execute a createBatch.
|
<R> Pool |
preparedQuery(String sql,
Collector<Row,?,R> collector,
io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
Prepare and execute a query.
|
Pool |
preparedQuery(String sql,
io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet>> handler)
Prepare and execute a query.
|
<R> Pool |
preparedQuery(String sql,
Tuple arguments,
Collector<Row,?,R> collector,
io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
Prepare and execute a query.
|
Pool |
preparedQuery(String sql,
Tuple arguments,
io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet>> handler)
Prepare and execute a query.
|
<R> Pool |
query(String sql,
Collector<Row,?,R> collector,
io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
Execute a simple query.
|
Pool |
query(String sql,
io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet>> handler)
Execute a simple query.
|
Pool preparedQuery(String sql, io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet>> handler)
SqlClient
preparedQuery
in interface SqlClient
sql
- the prepared query SQLhandler
- the handler notified with the execution result<R> Pool preparedQuery(String sql, Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
SqlClient
preparedQuery
in interface SqlClient
sql
- the prepared query SQLcollector
- the collectorhandler
- the handler notified with the execution resultPool query(String sql, io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet>> handler)
SqlClient
<R> Pool query(String sql, Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
SqlClient
Pool preparedQuery(String sql, Tuple arguments, io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet>> handler)
SqlClient
preparedQuery
in interface SqlClient
sql
- the prepared query SQLarguments
- the list of argumentshandler
- the handler notified with the execution result<R> Pool preparedQuery(String sql, Tuple arguments, Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
SqlClient
preparedQuery
in interface SqlClient
sql
- the prepared query SQLarguments
- the list of argumentscollector
- the collectorhandler
- the handler notified with the execution resultPool preparedBatch(String sql, List<Tuple> batch, io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet>> handler)
SqlClient
preparedBatch
in interface SqlClient
sql
- the prepared query SQLbatch
- the batch of tupleshandler
- the handler notified with the execution result<R> Pool preparedBatch(String sql, List<Tuple> batch, Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
SqlClient
preparedBatch
in interface SqlClient
sql
- the prepared query SQLbatch
- the batch of tuplescollector
- the collectorhandler
- the handler notified with the execution resultvoid getConnection(io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlConnection>> handler)
handler
- the handler that will get the connection resultvoid begin(io.vertx.core.Handler<io.vertx.core.AsyncResult<Transaction>> handler)
Copyright © 2019 Eclipse. All rights reserved.