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, newInstance
newInstance, preparedQuery, query
public static final TypeArg<PgConnection> __TYPE_ARG
public PgConnection(io.vertx.pgclient.PgConnection delegate)
public PgConnection(Object delegate)
public String toString()
toString
in class SqlConnection
public boolean equals(Object o)
equals
in class SqlConnection
public int hashCode()
hashCode
in class SqlConnection
public io.vertx.pgclient.PgConnection getDelegate()
getDelegate
in class SqlConnection
public 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)
SqlConnection
prepare
in class SqlConnection
sql
- handler
- public io.reactivex.Single<PreparedStatement> rxPrepare(String sql)
SqlConnection
rxPrepare
in class SqlConnection
sql
- public PgConnection exceptionHandler(io.vertx.core.Handler<Throwable> handler)
SqlConnection
exceptionHandler
in class SqlConnection
handler
- public PgConnection closeHandler(io.vertx.core.Handler<Void> handler)
SqlConnection
closeHandler
in class SqlConnection
handler
- the handlerpublic static PgConnection newInstance(io.vertx.pgclient.PgConnection arg)
Copyright © 2021 Eclipse. All rights reserved.