public interface BaseConnection extends PGConnection, java.sql.Connection
| Modifier and Type | Method and Description |
|---|---|
void |
cancelQuery()
Cancel the current query executing on this connection.
|
byte[] |
encodeString(java.lang.String str)
Encode a string using the database's client_encoding
(usually UTF8, but can vary on older server versions).
|
java.lang.String |
escapeString(java.lang.String str)
Escapes a string for use as string-literal within an SQL command.
|
java.sql.ResultSet |
execSQLQuery(java.lang.String s)
Execute a SQL query that returns a single resultset.
|
java.sql.ResultSet |
execSQLQuery(java.lang.String s,
int resultSetType,
int resultSetConcurrency) |
void |
execSQLUpdate(java.lang.String s)
Execute a SQL query that does not return results.
|
Encoding |
getEncoding() |
Logger |
getLogger() |
java.lang.Object |
getObject(java.lang.String type,
java.lang.String value)
Construct and return an appropriate object for the given
type and value.
|
QueryExecutor |
getQueryExecutor()
Get the QueryExecutor implementation for this connection.
|
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() |
int |
getTransactionState()
Get the current transaction state of this connection.
|
TypeInfo |
getTypeInfo() |
boolean |
haveMinimumCompatibleVersion(java.lang.String ver)
Check if we should use driver behaviour introduced in a particular
driver version.
|
boolean |
haveMinimumServerVersion(java.lang.String ver)
Check if we have at least a particular server version.
|
addDataType, addDataType, getCopyAPI, getFastpathAPI, getLargeObjectAPI, getNotifications, getPrepareThreshold, setPrepareThresholdabort, clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setNetworkTimeout, setReadOnly, setSavepoint, setSavepoint, setSchema, setTransactionIsolation, setTypeMapvoid cancelQuery()
throws java.sql.SQLException
java.sql.SQLException - if something goes wrong.java.sql.ResultSet execSQLQuery(java.lang.String s)
throws java.sql.SQLException
s - the query to executejava.sql.SQLException - if something goes wrong.java.sql.ResultSet execSQLQuery(java.lang.String s,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
java.sql.SQLExceptionvoid execSQLUpdate(java.lang.String s)
throws java.sql.SQLException
s - the query to executejava.sql.SQLException - if something goes wrong.QueryExecutor getQueryExecutor()
java.lang.Object getObject(java.lang.String type,
java.lang.String value)
throws java.sql.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 valuejava.sql.SQLException - if something goes wrongEncoding getEncoding() throws java.sql.SQLException
java.sql.SQLExceptionTypeInfo getTypeInfo()
boolean haveMinimumCompatibleVersion(java.lang.String ver)
ver - the driver version to checkjava.sql.SQLException - if something goes wrongboolean haveMinimumServerVersion(java.lang.String ver)
ver - the server version to checkjava.sql.SQLException - if something goes wrongbyte[] encodeString(java.lang.String str)
throws java.sql.SQLException
str - the string to encodejava.sql.SQLException - if something goes wrong.java.lang.String escapeString(java.lang.String str)
throws java.sql.SQLException
getStandardConformingStrings().str - a string valuejava.sql.SQLException - if the string contains a \0 characterboolean getStandardConformingStrings()
ProtocolConnection.getStandardConformingStrings()TimestampUtils getTimestampUtils()
Logger getLogger()
boolean getStringVarcharFlag()
int getTransactionState()