public class PgConnectionImpl extends SqlConnectionImpl<PgConnectionImpl> implements PgConnection
conn, contextmetrics, tracer| Modifier and Type | Method and Description |
|---|---|
int |
appendQueryPlaceholder(StringBuilder queryBuilder,
int index,
int current)
Append a parameter placeholder in the
query. |
PgConnection |
cancelRequest(Handler<AsyncResult<Void>> handler)
Send a request cancellation message to tell the server to cancel processing request in this connection.
|
static Future<PgConnection> |
connect(ContextInternal context,
PgConnectOptions options) |
void |
handleEvent(Object event) |
PgConnection |
notificationHandler(Handler<PgNotification> handler)
Set an handler called when the connection receives notification on a channel.
|
int |
processId() |
int |
secretKey() |
begin, begin, close, close, closeHandler, databaseMetadata, exceptionHandler, handleClosed, handleException, isSSL, promise, promise, scheduleprepare, preparepreparedQuery, queryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcast, closeHandler, connect, connect, connect, connect, connect, connect, exceptionHandler, preparebegin, begin, close, databaseMetadata, isSSL, prepareclose, preparedQuery, querypublic static Future<PgConnection> connect(ContextInternal context, PgConnectOptions options)
public int appendQueryPlaceholder(StringBuilder queryBuilder, int index, int current)
SqlClientInternalquery.
The index starts at 0.
index == current indicates it is a new parameter and therefore the same
* value should be returned.index < current indicates the builder wants to reuse a parameter.
The implementation can either return the same value to indicate the parameter can be reused or
return the next index to use (which is shall be the current valueappendQueryPlaceholder in interface SqlClientInternalappendQueryPlaceholder in class SqlClientBase<PgConnectionImpl>queryBuilder - the builder to append toindex - the parameter placeholder indexpublic PgConnection notificationHandler(Handler<PgNotification> handler)
PgConnectionPgNotification and has access to the channel name
and the notification payload.notificationHandler in interface PgConnectionhandler - the handlerpublic void handleEvent(Object event)
handleEvent in interface Connection.HolderhandleEvent in class SqlConnectionImpl<PgConnectionImpl>public int processId()
processId in interface PgConnectionpublic int secretKey()
secretKey in interface PgConnectionpublic PgConnection cancelRequest(Handler<AsyncResult<Void>> handler)
PgConnectioncancelRequest in interface PgConnectionhandler - the handler notified if cancelling request is sentCopyright © 2021. All rights reserved.