public class PgConnection extends SqlConnection
original non RX-ified interface using Vert.x codegen.| Modifier and Type | Field and Description |
|---|---|
static TypeArg<PgConnection> |
__TYPE_ARG |
| Constructor and Description |
|---|
PgConnection(Object delegate) |
PgConnection(io.vertx.pgclient.PgConnection delegate) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
PgConnection |
closeHandler(io.vertx.core.Handler<Void> handler)
Set an handler called when the connection is closed.
|
static void |
connect(Vertx vertx,
io.vertx.core.Handler<io.vertx.core.AsyncResult<PgConnection>> handler)
Like
connect(io.vertx.reactivex.core.Vertx, io.vertx.pgclient.PgConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.pgclient.PgConnection>>) with options build from the environment variables. |
static void |
connect(Vertx vertx,
io.vertx.pgclient.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(Vertx vertx,
String connectionUri,
io.vertx.core.Handler<io.vertx.core.AsyncResult<PgConnection>> handler)
Like
connect(io.vertx.reactivex.core.Vertx, io.vertx.pgclient.PgConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.pgclient.PgConnection>>) with options build from connectionUri. |
boolean |
equals(Object o) |
PgConnection |
exceptionHandler(io.vertx.core.Handler<Throwable> handler)
Set an handler called with connection errors.
|
io.vertx.pgclient.PgConnection |
getDelegate() |
int |
hashCode() |
static PgConnection |
newInstance(io.vertx.pgclient.PgConnection arg) |
PgConnection |
notificationHandler(io.vertx.core.Handler<io.vertx.pgclient.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<PreparedStatement>> handler)
Create a prepared query.
|
int |
processId() |
static io.reactivex.Single<PgConnection> |
rxConnect(Vertx vertx)
Like
connect(io.vertx.reactivex.core.Vertx, io.vertx.pgclient.PgConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.pgclient.PgConnection>>) with options build from the environment variables. |
static io.reactivex.Single<PgConnection> |
rxConnect(Vertx vertx,
io.vertx.pgclient.PgConnectOptions options)
Connects to the database and returns the connection if that succeeds.
|
static io.reactivex.Single<PgConnection> |
rxConnect(Vertx vertx,
String connectionUri)
Like
connect(io.vertx.reactivex.core.Vertx, io.vertx.pgclient.PgConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.pgclient.PgConnection>>) with options build from connectionUri. |
io.reactivex.Single<PreparedStatement> |
rxPrepare(String sql)
Create a prepared query.
|
int |
secretKey() |
String |
toString() |
begin, close, databaseMetadata, isSSL, newInstancenewInstance, preparedQuery, querypublic static final TypeArg<PgConnection> __TYPE_ARG
public PgConnection(io.vertx.pgclient.PgConnection delegate)
public PgConnection(Object delegate)
public String toString()
toString in class SqlConnectionpublic boolean equals(Object o)
equals in class SqlConnectionpublic int hashCode()
hashCode in class SqlConnectionpublic io.vertx.pgclient.PgConnection getDelegate()
getDelegate in class SqlConnectionpublic static void connect(Vertx vertx, io.vertx.pgclient.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 failurepublic static io.reactivex.Single<PgConnection> rxConnect(Vertx vertx, io.vertx.pgclient.PgConnectOptions options)
vertx - the vertx instanceoptions - the connect optionspublic static void connect(Vertx vertx, io.vertx.core.Handler<io.vertx.core.AsyncResult<PgConnection>> handler)
connect(io.vertx.reactivex.core.Vertx, io.vertx.pgclient.PgConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.pgclient.PgConnection>>) with options build from the environment variables.vertx - handler - public static io.reactivex.Single<PgConnection> rxConnect(Vertx vertx)
connect(io.vertx.reactivex.core.Vertx, io.vertx.pgclient.PgConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.pgclient.PgConnection>>) with options build from the environment variables.vertx - public static void connect(Vertx vertx, String connectionUri, io.vertx.core.Handler<io.vertx.core.AsyncResult<PgConnection>> handler)
connect(io.vertx.reactivex.core.Vertx, io.vertx.pgclient.PgConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.pgclient.PgConnection>>) with options build from connectionUri.vertx - connectionUri - handler - public static io.reactivex.Single<PgConnection> rxConnect(Vertx vertx, String connectionUri)
connect(io.vertx.reactivex.core.Vertx, io.vertx.pgclient.PgConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.pgclient.PgConnection>>) with options build from connectionUri.vertx - connectionUri - public PgConnection notificationHandler(io.vertx.core.Handler<io.vertx.pgclient.PgNotification> handler)
PgNotification and has access to the channel name
and the notification payload.handler - the handlerpublic PgConnection cancelRequest(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
handler - the handler notified if cancelling request is sentpublic int processId()
public int secretKey()
public PgConnection prepare(String sql, io.vertx.core.Handler<io.vertx.core.AsyncResult<PreparedStatement>> handler)
SqlConnectionprepare in class SqlConnectionsql - handler - public io.reactivex.Single<PreparedStatement> rxPrepare(String sql)
SqlConnectionrxPrepare in class SqlConnectionsql - public PgConnection exceptionHandler(io.vertx.core.Handler<Throwable> handler)
SqlConnectionexceptionHandler in class SqlConnectionhandler - public PgConnection closeHandler(io.vertx.core.Handler<Void> handler)
SqlConnectioncloseHandler in class SqlConnectionhandler - the handlerpublic static PgConnection newInstance(io.vertx.pgclient.PgConnection arg)
Copyright © 2022 Eclipse. All rights reserved.