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(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,
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.
|
PgConnection |
getDelegate() |
int |
hashCode() |
static PgConnection |
newInstance(PgConnection arg) |
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<PreparedQuery>> handler)
Create a prepared query.
|
PgConnection |
preparedBatch(String sql,
List<Tuple> batch,
io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
Prepare and execute a createBatch.
|
PgConnection |
preparedQuery(String sql,
io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
Prepare and execute a query.
|
PgConnection |
preparedQuery(String sql,
Tuple arguments,
io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
Prepare and execute a query.
|
int |
processId() |
PgConnection |
query(String sql,
io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
Execute a simple query.
|
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,
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<PreparedQuery> |
rxPrepare(String sql)
Create a prepared query.
|
io.reactivex.Single<RowSet<Row>> |
rxPreparedBatch(String sql,
List<Tuple> batch)
Prepare and execute a createBatch.
|
io.reactivex.Single<RowSet<Row>> |
rxPreparedQuery(String sql)
Prepare and execute a query.
|
io.reactivex.Single<RowSet<Row>> |
rxPreparedQuery(String sql,
Tuple arguments)
Prepare and execute a query.
|
io.reactivex.Single<RowSet<Row>> |
rxQuery(String sql)
Execute a simple query.
|
int |
secretKey() |
String |
toString() |
begin, close, isSSL, newInstancenewInstancepublic static final TypeArg<PgConnection> __TYPE_ARG
public PgConnection(PgConnection delegate)
public String toString()
toString in class SqlConnectionpublic boolean equals(Object o)
equals in class SqlConnectionpublic int hashCode()
hashCode in class SqlConnectionpublic PgConnection getDelegate()
getDelegate in class SqlConnectionpublic static void connect(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 failurepublic static io.reactivex.Single<PgConnection> rxConnect(Vertx vertx, 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<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<PreparedQuery>> handler)
SqlConnectionprepare in class SqlConnectionsql - the sqlhandler - the handler notified with the prepared query asynchronouslypublic io.reactivex.Single<PreparedQuery> rxPrepare(String sql)
SqlConnectionrxPrepare in class SqlConnectionsql - the sqlpublic PgConnection exceptionHandler(io.vertx.core.Handler<Throwable> handler)
SqlConnectionexceptionHandler in class SqlConnectionhandler - the handlerpublic PgConnection closeHandler(io.vertx.core.Handler<Void> handler)
SqlConnectioncloseHandler in class SqlConnectionhandler - the handlerpublic PgConnection preparedQuery(String sql, io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
SqlClientpreparedQuery in class SqlConnectionsql - the prepared query SQLhandler - the handler notified with the execution resultpublic io.reactivex.Single<RowSet<Row>> rxPreparedQuery(String sql)
SqlClientrxPreparedQuery in class SqlConnectionsql - the prepared query SQLpublic PgConnection query(String sql, io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
SqlClientquery in class SqlConnectionsql - the query SQLhandler - the handler notified with the execution resultpublic io.reactivex.Single<RowSet<Row>> rxQuery(String sql)
SqlClientrxQuery in class SqlConnectionsql - the query SQLpublic PgConnection preparedQuery(String sql, Tuple arguments, io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
SqlClientpreparedQuery in class SqlConnectionsql - the prepared query SQLarguments - the list of argumentshandler - the handler notified with the execution resultpublic io.reactivex.Single<RowSet<Row>> rxPreparedQuery(String sql, Tuple arguments)
SqlClientrxPreparedQuery in class SqlConnectionsql - the prepared query SQLarguments - the list of argumentspublic PgConnection preparedBatch(String sql, List<Tuple> batch, io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
SqlClientpreparedBatch in class SqlConnectionsql - the prepared query SQLbatch - the batch of tupleshandler - the handler notified with the execution resultpublic io.reactivex.Single<RowSet<Row>> rxPreparedBatch(String sql, List<Tuple> batch)
SqlClientrxPreparedBatch in class SqlConnectionsql - the prepared query SQLbatch - the batch of tuplespublic static PgConnection newInstance(PgConnection arg)
Copyright © 2019 Eclipse. All rights reserved.