public interface PgConnection extends PgClient
| Modifier and Type | Method and Description |
|---|---|
PgTransaction |
begin()
Begin a transaction and returns a
PgTransaction for controlling and tracking
this transaction. |
PgConnection |
cancelRequest(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
Send a request cancellation message to tell the server to cancel processing request in this connection.
|
void |
close()
Close the current connection after all the pending commands have been processed.
|
PgConnection |
closeHandler(io.vertx.core.Handler<Void> handler)
Set an handler called when the connection is closed.
|
PgConnection |
exceptionHandler(io.vertx.core.Handler<Throwable> handler)
Set an handler called with connection errors.
|
boolean |
isSSL() |
PgConnection |
notificationHandler(io.vertx.core.Handler<PgNotification> handler)
Set an handler called when the connection receives notification on a channel.
|
PgConnection |
prepare(String sql,
io.vertx.core.Handler<io.vertx.core.AsyncResult<PgPreparedQuery>> handler)
Create a prepared query.
|
<R> PgConnection |
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.
|
PgConnection |
preparedBatch(String sql,
List<Tuple> batch,
io.vertx.core.Handler<io.vertx.core.AsyncResult<PgRowSet>> handler)
Prepare and execute a createBatch.
|
<R> PgConnection |
preparedQuery(String sql,
Collector<Row,?,R> collector,
io.vertx.core.Handler<io.vertx.core.AsyncResult<PgResult<R>>> handler)
Prepare and execute a query.
|
PgConnection |
preparedQuery(String sql,
io.vertx.core.Handler<io.vertx.core.AsyncResult<PgRowSet>> handler)
Prepare and execute a query.
|
<R> PgConnection |
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.
|
PgConnection |
preparedQuery(String sql,
Tuple arguments,
io.vertx.core.Handler<io.vertx.core.AsyncResult<PgRowSet>> handler)
Prepare and execute a query.
|
int |
processId() |
<R> PgConnection |
query(String sql,
Collector<Row,?,R> collector,
io.vertx.core.Handler<io.vertx.core.AsyncResult<PgResult<R>>> handler)
Execute a simple query.
|
PgConnection |
query(String sql,
io.vertx.core.Handler<io.vertx.core.AsyncResult<PgRowSet>> handler)
Execute a simple query.
|
int |
secretKey() |
PgConnection prepare(String sql, io.vertx.core.Handler<io.vertx.core.AsyncResult<PgPreparedQuery>> handler)
sql - the sqlhandler - the handler notified with the prepared query asynchronouslyPgConnection exceptionHandler(io.vertx.core.Handler<Throwable> handler)
handler - the handlerPgConnection closeHandler(io.vertx.core.Handler<Void> handler)
handler - the handlerPgTransaction begin()
PgTransaction for controlling and tracking
this transaction.
When the connection is explicitely closed, any inflight transaction is rollbacked.PgConnection notificationHandler(io.vertx.core.Handler<PgNotification> handler)
PgNotification and has access to the channel name
and the notification payload.handler - the handlerint processId()
int secretKey()
PgConnection cancelRequest(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
handler - the handler notified if cancelling request is sentboolean isSSL()
void close()
PgConnection preparedQuery(String sql, io.vertx.core.Handler<io.vertx.core.AsyncResult<PgRowSet>> handler)
PgClientpreparedQuery in interface PgClientsql - the prepared query SQLhandler - the handler notified with the execution result<R> PgConnection preparedQuery(String sql, Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<PgResult<R>>> handler)
PgClientpreparedQuery in interface PgClientsql - the prepared query SQLcollector - the collectorhandler - the handler notified with the execution resultPgConnection query(String sql, io.vertx.core.Handler<io.vertx.core.AsyncResult<PgRowSet>> handler)
PgClient<R> PgConnection query(String sql, Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<PgResult<R>>> handler)
PgClientPgConnection preparedQuery(String sql, Tuple arguments, io.vertx.core.Handler<io.vertx.core.AsyncResult<PgRowSet>> handler)
PgClientpreparedQuery in interface PgClientsql - the prepared query SQLarguments - the list of argumentshandler - the handler notified with the execution result<R> PgConnection preparedQuery(String sql, Tuple arguments, Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<PgResult<R>>> handler)
PgClientpreparedQuery in interface PgClientsql - the prepared query SQLarguments - the list of argumentscollector - the collectorhandler - the handler notified with the execution resultPgConnection preparedBatch(String sql, List<Tuple> batch, io.vertx.core.Handler<io.vertx.core.AsyncResult<PgRowSet>> handler)
PgClientpreparedBatch in interface PgClientsql - the prepared query SQLbatch - the batch of tupleshandler - the handler notified with the execution result<R> PgConnection preparedBatch(String sql, List<Tuple> batch, Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<PgResult<R>>> handler)
PgClientpreparedBatch in interface PgClientsql - the prepared query SQLbatch - the batch of tuplescollector - the collectorhandler - the handler notified with the execution resultCopyright © 2019 Eclipse. All rights reserved.