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