public interface PgConnection extends SqlConnection
| Modifier and Type | Method and Description |
|---|---|
PgConnection |
cancelRequest(Handler<AsyncResult<Void>> handler)
Send a request cancellation message to tell the server to cancel processing request in this connection.
|
PgConnection |
closeHandler(Handler<Void> handler)
Set an handler called when the connection is closed.
|
static void |
connect(Vertx vertx,
Handler<AsyncResult<PgConnection>> handler)
Like
connect(Vertx, PgConnectOptions, Handler) with options build from the environment variables. |
static void |
connect(Vertx vertx,
PgConnectOptions options,
Handler<AsyncResult<PgConnection>> handler)
Connects to the database and returns the connection if that succeeds.
|
static void |
connect(Vertx vertx,
String connectionUri,
Handler<AsyncResult<PgConnection>> handler)
Like
connect(Vertx, PgConnectOptions, Handler) with options build from connectionUri. |
PgConnection |
exceptionHandler(Handler<Throwable> handler)
Set an handler called with connection errors.
|
PgConnection |
notificationHandler(Handler<PgNotification> handler)
Set an handler called when the connection receives notification on a channel.
|
PgConnection |
prepare(String sql,
Handler<AsyncResult<PreparedQuery>> handler)
Create a prepared query.
|
<R> PgConnection |
preparedBatch(String sql,
List<Tuple> batch,
java.util.stream.Collector<Row,?,R> collector,
Handler<AsyncResult<SqlResult<R>>> handler)
Prepare and execute a createBatch.
|
PgConnection |
preparedBatch(String sql,
List<Tuple> batch,
Handler<AsyncResult<RowSet<Row>>> handler)
Prepare and execute a createBatch.
|
<R> PgConnection |
preparedQuery(String sql,
java.util.stream.Collector<Row,?,R> collector,
Handler<AsyncResult<SqlResult<R>>> handler)
Prepare and execute a query.
|
PgConnection |
preparedQuery(String sql,
Handler<AsyncResult<RowSet<Row>>> handler)
Prepare and execute a query.
|
<R> PgConnection |
preparedQuery(String sql,
Tuple arguments,
java.util.stream.Collector<Row,?,R> collector,
Handler<AsyncResult<SqlResult<R>>> handler)
Prepare and execute a query.
|
PgConnection |
preparedQuery(String sql,
Tuple arguments,
Handler<AsyncResult<RowSet<Row>>> handler)
Prepare and execute a query.
|
int |
processId() |
<R> PgConnection |
query(String sql,
java.util.stream.Collector<Row,?,R> collector,
Handler<AsyncResult<SqlResult<R>>> handler)
Execute a simple query.
|
PgConnection |
query(String sql,
Handler<AsyncResult<RowSet<Row>>> handler)
Execute a simple query.
|
int |
secretKey() |
begin, close, isSSLstatic void connect(Vertx vertx, PgConnectOptions options, Handler<AsyncResult<PgConnection>> handler)
vertx - the vertx instanceoptions - the connect optionshandler - the handler called with the connection or the failurestatic void connect(Vertx vertx, Handler<AsyncResult<PgConnection>> handler)
connect(Vertx, PgConnectOptions, Handler) with options build from the environment variables.static void connect(Vertx vertx, String connectionUri, Handler<AsyncResult<PgConnection>> handler)
connect(Vertx, PgConnectOptions, Handler) with options build from connectionUri.PgConnection notificationHandler(Handler<PgNotification> handler)
PgNotification and has access to the channel name
and the notification payload.handler - the handlerPgConnection cancelRequest(Handler<AsyncResult<Void>> handler)
handler - the handler notified if cancelling request is sentint processId()
int secretKey()
PgConnection prepare(String sql, Handler<AsyncResult<PreparedQuery>> handler)
SqlConnectionprepare in interface SqlConnectionsql - the sqlhandler - the handler notified with the prepared query asynchronouslyPgConnection exceptionHandler(Handler<Throwable> handler)
SqlConnectionexceptionHandler in interface SqlConnectionhandler - the handlerPgConnection closeHandler(Handler<Void> handler)
SqlConnectioncloseHandler in interface SqlConnectionhandler - the handlerPgConnection preparedQuery(String sql, Handler<AsyncResult<RowSet<Row>>> handler)
SqlClientpreparedQuery in interface SqlClientpreparedQuery in interface SqlConnectionsql - the prepared query SQLhandler - the handler notified with the execution result<R> PgConnection preparedQuery(String sql, java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)
SqlClientpreparedQuery in interface SqlClientpreparedQuery in interface SqlConnectionsql - the prepared query SQLcollector - the collectorhandler - the handler notified with the execution resultPgConnection query(String sql, Handler<AsyncResult<RowSet<Row>>> handler)
SqlClientquery in interface SqlClientquery in interface SqlConnectionsql - the query SQLhandler - the handler notified with the execution result<R> PgConnection query(String sql, java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)
SqlClientquery in interface SqlClientquery in interface SqlConnectionsql - the query SQLcollector - the collectorhandler - the handler notified with the execution resultPgConnection preparedQuery(String sql, Tuple arguments, Handler<AsyncResult<RowSet<Row>>> handler)
SqlClientpreparedQuery in interface SqlClientpreparedQuery in interface SqlConnectionsql - the prepared query SQLarguments - the list of argumentshandler - the handler notified with the execution result<R> PgConnection preparedQuery(String sql, Tuple arguments, java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)
SqlClientpreparedQuery in interface SqlClientpreparedQuery in interface SqlConnectionsql - the prepared query SQLarguments - the list of argumentscollector - the collectorhandler - the handler notified with the execution resultPgConnection preparedBatch(String sql, List<Tuple> batch, Handler<AsyncResult<RowSet<Row>>> handler)
SqlClientpreparedBatch in interface SqlClientpreparedBatch in interface SqlConnectionsql - the prepared query SQLbatch - the batch of tupleshandler - the handler notified with the execution result<R> PgConnection preparedBatch(String sql, List<Tuple> batch, java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)
SqlClientpreparedBatch in interface SqlClientpreparedBatch in interface SqlConnectionsql - the prepared query SQLbatch - the batch of tuplescollector - the collectorhandler - the handler notified with the execution resultCopyright © 2019 Eclipse. All rights reserved.