getQueryExecutor() Get the QueryExecutor implementation for this connection.
public int
getSQLType(int oid) Look up the SQL typecode for a given type oid.
public int
getSQLType(String pgTypeName) Look up the SQL typecode for a given postgresql type name.
public boolean
getStandardConformingStrings() Returns whether the server treats string-literals according to the SQL
standard or if it uses traditional PostgreSQL escaping rules.
Encode a string using the database's client_encoding
(usually UNICODE, but can vary on older server versions).
This is used when constructing synthetic resultsets (for
example, in metadata methods).
Parameters: str - the string to encode an encoded representation of the string throws: SQLException - if something goes wrong.
Escapes a string for use as string-literal within an SQL command. The
method chooses the applicable escaping rules based on the value of
BaseConnection.getStandardConformingStrings() .
Parameters: str - a string value the escaped representation of the string throws: SQLException - if the string contains a \0 character
Execute a SQL query that returns a single resultset.
Never causes a new transaction to be started regardless of the autocommit setting.
Parameters: s - the query to execute the (non-null) returned resultset throws: SQLException - if something goes wrong.
Execute a SQL query that does not return results.
Never causes a new transaction to be started regardless of the autocommit setting.
Parameters: s - the query to execute throws: SQLException - if something goes wrong.
If no class is registered as handling the given type, then a generic
org.postgresql.util.PGobject instance is returned.
Parameters: type - the backend typename Parameters: value - the type-specific string representation of the value an appropriate object; never null. throws: SQLException - if something goes wrong
Look up the postgresql type name for a given oid. This is the
inverse of
BaseConnection.getPGType(String) .
Parameters: oid - the type's OID the server type name for that OID, or null if unknown throws: SQLException - if something goes wrong
Look up the oid for a given postgresql type name. This is the
inverse of
BaseConnection.getPGType(int) .
Parameters: pgTypeName - the server type name to look up oid the type's OID, or 0 if unknown throws: SQLException - if something goes wrong
Look up the SQL typecode for a given type oid.
Parameters: oid - the type's OID the SQL typecode (a constant from java.sql.Types) for the type throws: SQLException - if something goes wrong
Look up the SQL typecode for a given postgresql type name.
Parameters: pgTypeName - the server type name to look up the SQL typecode (a constant from java.sql.Types) for the type throws: SQLException - if something goes wrong
getStandardConformingStrings
public boolean getStandardConformingStrings()(Code)
Returns whether the server treats string-literals according to the SQL
standard or if it uses traditional PostgreSQL escaping rules. Versions
up to 8.1 always treated backslashes as escape characters in
string-literals. Since 8.2, this depends on the value of the
standard_conforming_strings server variable.
true if the server treats string literals according to the SQLstandard See Also:ProtocolConnection.getStandardConformingStrings
public boolean haveMinimumCompatibleVersion(String ver)(Code)
Check if we should use driver behaviour introduced in a particular
driver version. This defaults to behaving as the actual driver's version
but can be overridden by the "compatible" URL parameter.
Parameters: ver - the driver version to check true if the driver's behavioural version is at least "ver". throws: SQLException - if something goes wrong
haveMinimumServerVersion
public boolean haveMinimumServerVersion(String ver)(Code)
Check if we have at least a particular server version.
Parameters: ver - the server version to check true if the server version is at least "ver". throws: SQLException - if something goes wrong