public interface ProtocolConnection
Modifier and Type | Field and Description |
---|---|
static int |
TRANSACTION_FAILED
Constant returned by
getTransactionState() indicating that a transaction is currently
open, but it has seen errors and will refuse subsequent queries until a ROLLBACK. |
static int |
TRANSACTION_IDLE
Constant returned by
getTransactionState() indicating that no transaction is currently
open. |
static int |
TRANSACTION_OPEN
Constant returned by
getTransactionState() indicating that a transaction is currently
open. |
Modifier and Type | Method and Description |
---|---|
void |
abort()
Abort at network level without sending the Terminate message to the backend.
|
void |
close()
Close this connection cleanly.
|
String |
getApplicationName()
Returns application_name connection property.
|
int |
getBackendPID()
Return the process ID (PID) of the backend server process handling this connection.
|
String |
getDatabase() |
Encoding |
getEncoding() |
HostSpec |
getHostSpec() |
boolean |
getIntegerDateTimes()
Returns true if server uses integer instead of double for binary date and time encodings.
|
PGNotification[] |
getNotifications()
Retrieve and clear the set of asynchronous notifications pending on this connection.
|
int |
getProtocolVersion() |
QueryExecutor |
getQueryExecutor() |
String |
getServerVersion()
Return the server version from the server_version GUC.
|
int |
getServerVersionNum()
Get a machine-readable server version.
|
boolean |
getStandardConformingStrings()
Returns whether the server treats string-literals according to the SQL standard or if it uses
traditional PostgreSQL escaping rules.
|
TimeZone |
getTimeZone()
Returns backend timezone in java format.
|
int |
getTransactionState()
Get the current transaction state of this connection.
|
String |
getUser() |
SQLWarning |
getWarnings()
Retrieve and clear the chain of warnings accumulated on this connection.
|
boolean |
isClosed()
Check if this connection is closed.
|
void |
sendQueryCancel()
Sends a query cancellation for this connection.
|
void |
setBinaryReceiveOids(Set<Integer> useBinaryForOids)
Sets the oids that should be received using binary encoding.
|
static final int TRANSACTION_IDLE
getTransactionState()
indicating that no transaction is currently
open.static final int TRANSACTION_OPEN
getTransactionState()
indicating that a transaction is currently
open.static final int TRANSACTION_FAILED
getTransactionState()
indicating that a transaction is currently
open, but it has seen errors and will refuse subsequent queries until a ROLLBACK.HostSpec getHostSpec()
String getUser()
String getDatabase()
String getServerVersion()
int getServerVersionNum()
Encoding getEncoding()
boolean getStandardConformingStrings()
int getTransactionState()
PGNotification[] getNotifications() throws SQLException
SQLException
- if and error occurs while fetching notificationsSQLWarning getWarnings()
QueryExecutor getQueryExecutor()
void sendQueryCancel() throws SQLException
SQLException
- if something goes wrong.void close()
boolean isClosed()
int getProtocolVersion()
void setBinaryReceiveOids(Set<Integer> useBinaryForOids)
useBinaryForOids
- The oids to request with binary encoding.boolean getIntegerDateTimes()
int getBackendPID()
void abort()
TimeZone getTimeZone()
String getApplicationName()
Copyright © 2016 PostgreSQL Global Development Group. All rights reserved.