|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BaseConnection
Driver-internal connection interface. Application code should not use this interface.
| Field Summary |
|---|
| Fields inherited from interface java.sql.Connection |
|---|
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
| Method Summary | |
|---|---|
void |
addTimerTask(TimerTask timerTask,
long milliSeconds)
Schedule a TimerTask for later execution. |
boolean |
binaryTransferSend(int oid)
Returns true if value for the given oid should be sent using binary transfer. |
void |
cancelQuery()
Cancel the current query executing on this connection. |
CachedQuery |
createQuery(String sql,
boolean escapeProcessing,
boolean isParameterized,
String... columnNames)
|
byte[] |
encodeString(String str)
Encode a string using the database's client_encoding (usually UTF8, but can vary on older server versions). |
String |
escapeString(String str)
Escapes a string for use as string-literal within an SQL command. |
ResultSet |
execSQLQuery(String s)
Execute a SQL query that returns a single resultset. |
ResultSet |
execSQLQuery(String s,
int resultSetType,
int resultSetConcurrency)
|
void |
execSQLUpdate(String s)
Execute a SQL query that does not return results. |
Encoding |
getEncoding()
|
LruCache<FieldMetadata.Key,FieldMetadata> |
getFieldMetadataCache()
Return metadata cache for given connection |
Logger |
getLogger()
|
Object |
getObject(String type,
String value,
byte[] byteValue)
Construct and return an appropriate object for the given type and value. |
QueryExecutor |
getQueryExecutor()
Get the QueryExecutor implementation for this connection. |
ReplicationProtocol |
getReplicationProtocol()
Internal protocol for work with physical and logical replication. |
boolean |
getStandardConformingStrings()
Returns whether the server treats string-literals according to the SQL standard or if it uses traditional PostgreSQL escaping rules. |
boolean |
getStringVarcharFlag()
|
TimestampUtils |
getTimestampUtils()
|
TransactionState |
getTransactionState()
Get the current transaction state of this connection. |
TypeInfo |
getTypeInfo()
|
boolean |
haveMinimumServerVersion(int ver)
Check if we have at least a particular server version. |
boolean |
haveMinimumServerVersion(Version ver)
Check if we have at least a particular server version. |
boolean |
isColumnSanitiserDisabled()
Return whether to disable column name sanitation. |
void |
purgeTimerTasks()
Invoke purge() on the underlying shared Timer so that internal resources will be released. |
void |
setFlushCacheOnDeallocate(boolean flushCacheOnDeallocate)
By default, the connection resets statement cache in case deallocate all/discard all message is observed. |
| Methods inherited from interface org.postgresql.PGConnection |
|---|
addDataType, addDataType, escapeIdentifier, escapeLiteral, getAutosave, getBackendPID, getCopyAPI, getDefaultFetchSize, getFastpathAPI, getLargeObjectAPI, getNotifications, getPreferQueryMode, getPrepareThreshold, getReplicationAPI, setAutosave, setDefaultFetchSize, setPrepareThreshold |
| Methods inherited from interface java.sql.Wrapper |
|---|
isWrapperFor, unwrap |
| Method Detail |
|---|
void cancelQuery()
throws SQLException
SQLException - if something goes wrong.
ResultSet execSQLQuery(String s)
throws SQLException
s - the query to execute
SQLException - if something goes wrong.
ResultSet execSQLQuery(String s,
int resultSetType,
int resultSetConcurrency)
throws SQLException
SQLException
void execSQLUpdate(String s)
throws SQLException
s - the query to execute
SQLException - if something goes wrong.QueryExecutor getQueryExecutor()
ReplicationProtocol getReplicationProtocol()
Object getObject(String type,
String value,
byte[] byteValue)
throws SQLException
PGConnection.addDataType(String, Class) and
PGConnection.addDataType(String, String).
If no class is registered as handling the given type, then a generic
PGobject instance is returned.
type - the backend typenamevalue - the type-specific string representation of the valuebyteValue - the type-specific binary representation of the value
SQLException - if something goes wrong
Encoding getEncoding()
throws SQLException
SQLExceptionTypeInfo getTypeInfo()
boolean haveMinimumServerVersion(int ver)
ver - the server version to check, of the form xxyyzz eg 90401
boolean haveMinimumServerVersion(Version ver)
ver - the server version to check
byte[] encodeString(String str)
throws SQLException
str - the string to encode
SQLException - if something goes wrong.
String escapeString(String str)
throws SQLException
getStandardConformingStrings().
str - a string value
SQLException - if the string contains a \0 characterboolean getStandardConformingStrings()
QueryExecutor.getStandardConformingStrings()TimestampUtils getTimestampUtils()
Logger getLogger()
boolean getStringVarcharFlag()
TransactionState getTransactionState()
boolean binaryTransferSend(int oid)
oid - The oid to check.
boolean isColumnSanitiserDisabled()
void addTimerTask(TimerTask timerTask,
long milliSeconds)
timerTask - timer task to schedulemilliSeconds - delay in millisecondsvoid purgeTimerTasks()
LruCache<FieldMetadata.Key,FieldMetadata> getFieldMetadataCache()
CachedQuery createQuery(String sql,
boolean escapeProcessing,
boolean isParameterized,
String... columnNames)
throws SQLException
SQLExceptionvoid setFlushCacheOnDeallocate(boolean flushCacheOnDeallocate)
flushCacheOnDeallocate - true if statement cache should be reset when "deallocate/discard" message observed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||