public interface PgClient
Modifier and Type | Method and Description |
---|---|
static void |
connect(io.vertx.core.Vertx vertx,
io.vertx.core.Handler<io.vertx.core.AsyncResult<PgConnection>> handler)
Like
connect(Vertx, PgConnectOptions, Handler) with options build from the environment variables. |
static void |
connect(io.vertx.core.Vertx vertx,
PgConnectOptions options,
io.vertx.core.Handler<io.vertx.core.AsyncResult<PgConnection>> handler)
Connects to the database and returns the connection if that succeeds.
|
static void |
connect(io.vertx.core.Vertx vertx,
String connectionUri,
io.vertx.core.Handler<io.vertx.core.AsyncResult<PgConnection>> handler)
Like
connect(Vertx, PgConnectOptions, Handler) with options build from connectionUri . |
static PgPool |
pool()
Like
pool(PgPoolOptions) with options build from the environment variables. |
static PgPool |
pool(PgPoolOptions options)
Create a connection pool to the database configured with the given
options . |
static PgPool |
pool(String connectionUri)
Like
pool(PgPoolOptions) with options build from connectionUri . |
static PgPool |
pool(io.vertx.core.Vertx vertx)
Like
pool(Vertx, PgPoolOptions) with options build from the environment variables. |
static PgPool |
pool(io.vertx.core.Vertx vertx,
PgPoolOptions options)
Like
pool(PgPoolOptions) with a specific Vertx instance. |
static PgPool |
pool(io.vertx.core.Vertx vertx,
String connectionUri)
Like
pool(Vertx, PgPoolOptions) with options build from connectionUri . |
<R> PgClient |
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.
|
PgClient |
preparedBatch(String sql,
List<Tuple> batch,
io.vertx.core.Handler<io.vertx.core.AsyncResult<PgRowSet>> handler)
Prepare and execute a createBatch.
|
<R> PgClient |
preparedQuery(String sql,
Collector<Row,?,R> collector,
io.vertx.core.Handler<io.vertx.core.AsyncResult<PgResult<R>>> handler)
Prepare and execute a query.
|
PgClient |
preparedQuery(String sql,
io.vertx.core.Handler<io.vertx.core.AsyncResult<PgRowSet>> handler)
Prepare and execute a query.
|
<R> PgClient |
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.
|
PgClient |
preparedQuery(String sql,
Tuple arguments,
io.vertx.core.Handler<io.vertx.core.AsyncResult<PgRowSet>> handler)
Prepare and execute a query.
|
<R> PgClient |
query(String sql,
Collector<Row,?,R> collector,
io.vertx.core.Handler<io.vertx.core.AsyncResult<PgResult<R>>> handler)
Execute a simple query.
|
PgClient |
query(String sql,
io.vertx.core.Handler<io.vertx.core.AsyncResult<PgRowSet>> handler)
Execute a simple query.
|
static PgPool pool()
pool(PgPoolOptions)
with options build from the environment variables.static PgPool pool(String connectionUri)
pool(PgPoolOptions)
with options build from connectionUri
.static PgPool pool(io.vertx.core.Vertx vertx)
pool(Vertx, PgPoolOptions)
with options build from the environment variables.static PgPool pool(io.vertx.core.Vertx vertx, String connectionUri)
pool(Vertx, PgPoolOptions)
with options build from connectionUri
.static PgPool pool(PgPoolOptions options)
options
.options
- the options for creating the poolstatic PgPool pool(io.vertx.core.Vertx vertx, PgPoolOptions options)
pool(PgPoolOptions)
with a specific Vertx
instance.static void connect(io.vertx.core.Vertx vertx, PgConnectOptions options, io.vertx.core.Handler<io.vertx.core.AsyncResult<PgConnection>> handler)
vertx
- the vertx instanceoptions
- the connect optionshandler
- the handler called with the connection or the failurestatic void connect(io.vertx.core.Vertx vertx, io.vertx.core.Handler<io.vertx.core.AsyncResult<PgConnection>> handler)
connect(Vertx, PgConnectOptions, Handler)
with options build from the environment variables.static void connect(io.vertx.core.Vertx vertx, String connectionUri, io.vertx.core.Handler<io.vertx.core.AsyncResult<PgConnection>> handler)
connect(Vertx, PgConnectOptions, Handler)
with options build from connectionUri
.PgClient query(String sql, io.vertx.core.Handler<io.vertx.core.AsyncResult<PgRowSet>> handler)
sql
- the query SQLhandler
- the handler notified with the execution result<R> PgClient query(String sql, Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<PgResult<R>>> handler)
sql
- the query SQLcollector
- the collectorhandler
- the handler notified with the execution resultPgClient preparedQuery(String sql, io.vertx.core.Handler<io.vertx.core.AsyncResult<PgRowSet>> handler)
sql
- the prepared query SQLhandler
- the handler notified with the execution result<R> PgClient preparedQuery(String sql, Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<PgResult<R>>> handler)
sql
- the prepared query SQLcollector
- the collectorhandler
- the handler notified with the execution resultPgClient preparedQuery(String sql, Tuple arguments, io.vertx.core.Handler<io.vertx.core.AsyncResult<PgRowSet>> handler)
sql
- the prepared query SQLarguments
- the list of argumentshandler
- the handler notified with the execution result<R> PgClient preparedQuery(String sql, Tuple arguments, Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<PgResult<R>>> handler)
sql
- the prepared query SQLarguments
- the list of argumentscollector
- the collectorhandler
- the handler notified with the execution resultPgClient preparedBatch(String sql, List<Tuple> batch, io.vertx.core.Handler<io.vertx.core.AsyncResult<PgRowSet>> handler)
sql
- the prepared query SQLbatch
- the batch of tupleshandler
- the handler notified with the execution result<R> PgClient preparedBatch(String sql, List<Tuple> batch, Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<PgResult<R>>> handler)
sql
- the prepared query SQLbatch
- the batch of tuplescollector
- the collectorhandler
- the handler notified with the execution resultCopyright © 2019 Eclipse. All rights reserved.