Top Inners Fields Constructors Methods
org.postgresql.jdbc

public Class PgConnection

extends Object
implements BaseConnection
Class Inheritance
All Implemented Interfaces
org.postgresql.core.BaseConnection, java.sql.Connection, java.lang.AutoCloseable, java.sql.Wrapper, org.postgresql.PGConnection
Static Imports
org.postgresql.util.internal.Nullness.castNonNull

Nested and Inner Type Summary

Modifier and TypeClass and Description
public class
private static enum
private class
PgConnection.TransactionCommandHandler

Handler for transaction queries.

Field Summary

Modifier and TypeField and Description
private boolean
private final Set<? extends Integer>
binaryDisabledOids

Oids for which binary transfer should be disabled.

private final boolean
private final LazyCleaner.Cleanable<IOException>
private final Properties
private final Query
private @Nullable CopyManager
private final String
protected int
defaultFetchSize

Default fetch size for statement.

private boolean
private @Nullable Fastpath
fastpath

References Deprecated Fastpath is deprecated or references (maybe indirectly) at least one deprecated element.
private final LruCache<FieldMetadata.Key, FieldMetadata>
private final PgConnectionCleaningAction
finalizeAction

This field keeps finalize action alive, so its .finalize() method is called only when the connection itself becomes unreachable.

private @Nullable SQLWarning
protected boolean
private final boolean
private @Nullable LargeObjectManager
private final Object
private final ResourceLock
private final Condition
private static final Logger
private final boolean
protected @Nullable DatabaseMetaData
private @Nullable Throwable
protected int
private final QueryExecutor
private boolean
private final PgConnection.ReadOnlyBehavior
private final boolean
replicationConnection

Replication protocol in current version postgresql(10devel) supports a limited number of commands.

private final Query
private int
private int
private static final @Nullable MethodHandle
private final CachedQuery
private final CachedQuery
private static final SQLPermission
private static final SQLPermission
private static final Set<Integer>
private static final @Nullable MethodHandle
private final TimestampUtils
private final TypeInfo
protected Map<String, Class<?>>
typemap

The current type mappings.

private @Nullable PGXmlFactoryFactory
private final @Nullable String

Constructor Summary

AccessConstructor and Description
public
PgConnection(HostSpec[] hostSpecs, Properties info, String url)

Method Summary

Modifier and TypeMethod and Description
protected void
public void
abort(Executor
The Executor implementation which will be used by abort.
executor
)

Implements java.sql.Connection.abort.

Terminates an open connection.

public void
addDataType(String
JDBC type name
type
,
String
class name
name
)

Implements org.postgresql.PGConnection.addDataType.

This allows client code to add a handler for one of org.postgresql's more unique data types.

public void
addDataType(String
the PostgreSQL type to register
type
,
Class<? extends PGobject>
the class implementing the Java representation of the type; this class must implement org.postgresql.util.PGobject).
klass
)

Implements org.postgresql.PGConnection.addDataType.

This allows client code to add a handler for one of org.postgresql's more unique data types.

public void
addTimerTask(TimerTask
timer task to schedule
timerTask
,
long
delay in milliseconds
milliSeconds
)

Implements org.postgresql.core.BaseConnection.addTimerTask.

Schedule a TimerTask for later execution.

public void
addWarning(SQLWarning
warning to add
warn
)

This adds a warning to the warning chain.

public boolean
binaryTransferSend(int
The oid to check.
oid
)

Implements org.postgresql.core.BaseConnection.binaryTransferSend.

Returns true if value for the given oid should be sent using binary transfer.

pack-priv final CachedQuery
pack-priv final CachedQuery
private CachedQuery
public void
cancelQuery()

Implements org.postgresql.core.BaseConnection.cancelQuery.

Cancel the current query executing on this connection.

protected void
private void
checkPermission(SQLPermission sqlPermissionNetworkTimeout)

public void
clearWarnings()

Implements java.sql.Connection.clearWarnings.

Clears all warnings reported for this Connection object.

public void
close()

Implements java.sql.Connection.close.

Releases this Connection object's database and JDBC resources immediately instead of waiting for them to be automatically released.

public void
commit()

Implements java.sql.Connection.commit.

Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by this Connection object.

public Array
createArrayOf(String typeName, @Nullable Object elements)

public Array
createArrayOf(String
the SQL name of the type the elements of the array map to. The typeName is a database-specific name which may be the name of a built-in type, a user-defined type or a standard SQL type supported by this database. This is the value returned by Array.getBaseTypeName
typeName
,
@Nullable @Nullable Object[]
the elements that populate the returned object
elements
)

Implements java.sql.Connection.createArrayOf.

Factory method for creating Array objects.

public Blob
createBlob()

Implements java.sql.Connection.createBlob.

Constructs an object that implements the Blob interface.

public Clob
createClob()

Implements java.sql.Connection.createClob.

Constructs an object that implements the Clob interface.

public NClob
createNClob()

Implements java.sql.Connection.createNClob.

Constructs an object that implements the NClob interface.

public CachedQuery
createQuery(String sql, boolean escapeProcessing, boolean isParameterized, String... columnNames)

Implements org.postgresql.core.BaseConnection.createQuery.

public <T> T
public SQLXML
createSQLXML()

Implements java.sql.Connection.createSQLXML.

Constructs an object that implements the SQLXML interface.

public Statement
createStatement()

Implements java.sql.Connection.createStatement.

Creates a Statement object for sending SQL statements to the database.

public Statement
createStatement(int
one of the following ResultSet constants: ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
resultSetType
,
int
one of the following ResultSet constants: ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
resultSetConcurrency
,
int
one of the following ResultSet constants: ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
resultSetHoldability
)

Implements java.sql.Connection.createStatement.

Creates a Statement object that will generate ResultSet objects with the given type, concurrency, and holdability.

public Statement
createStatement(int
a result set type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
resultSetType
,
int
a concurrency type; one of ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
resultSetConcurrency
)

Implements java.sql.Connection.createStatement.

Creates a Statement object that will generate ResultSet objects with the given type and concurrency.

public Struct
createStruct(String
the SQL type name of the SQL structured type that this Struct object maps to. The typeName is the name of a user-defined type that has been defined for this database. It is the value returned by Struct.getSQLTypeName.
typeName
,
Object[]
the attributes that populate the returned object
attributes
)

Implements java.sql.Connection.createStruct.

Factory method for creating Struct objects.

protected TypeInfo
createTypeInfo(BaseConnection conn, int unknownLength)

public @PolyNull byte[]
public String
escapeIdentifier(String
input identifier
identifier
)

Implements org.postgresql.PGConnection.escapeIdentifier.

Return the given string suitably quoted to be used as an identifier in an SQL statement string.

public String
escapeLiteral(String
input literal
literal
)

Implements org.postgresql.PGConnection.escapeLiteral.

Return the given string suitably quoted to be used as a string literal in an SQL statement string.

public String
escapeString(String
a string value
str
)

Implements org.postgresql.core.BaseConnection.escapeString.

Escapes a string for use as string-literal within an SQL command.

public ResultSet
execSQLQuery(String
the query to execute
s
)

Implements org.postgresql.core.BaseConnection.execSQLQuery.

Execute a SQL query that returns a single resultset.

public ResultSet
execSQLQuery(String s, int resultSetType, int resultSetConcurrency)

Implements org.postgresql.core.BaseConnection.execSQLQuery.

public void
execSQLUpdate(String
the query to execute
s
)

Implements org.postgresql.core.BaseConnection.execSQLUpdate.

Execute a SQL query that does not return results.

pack-priv void
private void
public boolean
getAdaptiveFetch()

Implements org.postgresql.PGConnection.getAdaptiveFetch.

Get state of adaptive fetch for connection.

public boolean
getAutoCommit()

Implements java.sql.Connection.getAutoCommit.

Retrieves the current auto-commit mode for this Connection object.

public AutoSave
getAutosave()

Implements org.postgresql.PGConnection.getAutosave.

Connection configuration regarding automatic per-query savepoints.

public int
getBackendPID()

Implements org.postgresql.PGConnection.getBackendPID.

Return the process ID (PID) of the backend server process handling this connection.

private static Set<? extends Integer>

Returns:

oids for which binary transfer should be disabled
getBinaryDisabledOids
(Properties
properties
info
)

Gets all oids for which binary transfer should be disabled.

private static Set<Integer>

Returns:

oids for which binary transfer can be enabled
getBinaryEnabledOids
(Properties
properties
info
)

Gets all oids for which binary transfer can be enabled.

public String
getCatalog()

Implements java.sql.Connection.getCatalog.

Retrieves this Connection object's current catalog name.

public @Nullable String
getClientInfo(String
The name of the client info property to retrieve
name
)

Implements java.sql.Connection.getClientInfo.

Returns the value of the client info property specified by name.

public Properties
getClientInfo()

Implements java.sql.Connection.getClientInfo.

Returns a list containing the name and current value of each client info property supported by the driver.

public CopyManager
getCopyAPI()

Implements org.postgresql.PGConnection.getCopyAPI.

This returns the COPY API for the current connection.

public @Nullable String

Returns:

the current cursor name
getCursorName
()

getCursorName gets the cursor name.

public String

Returns:

server version number
getDBVersionNumber
()

Get server version number.

public int
getDefaultFetchSize()

Implements org.postgresql.PGConnection.getDefaultFetchSize.

Get the default fetch size for statements created from this connection.

public Encoding
public Fastpath
getFastpathAPI()

Implements org.postgresql.PGConnection.getFastpathAPI.

References Deprecated Fastpath is deprecated or references (maybe indirectly) at least one deprecated element.

This returns the Fastpath API for the current connection.

public LruCache<FieldMetadata.Key, FieldMetadata>
getFieldMetadataCache()

Implements org.postgresql.core.BaseConnection.getFieldMetadataCache.

Return metadata cache for given connection.

public boolean
public boolean
public int
getHoldability()

Implements java.sql.Connection.getHoldability.

Retrieves the current holdability of ResultSet objects created using this Connection object.

protected @Nullable String
public LargeObjectManager
getLargeObjectAPI()

Implements org.postgresql.PGConnection.getLargeObjectAPI.

This returns the LargeObject API for the current connection.

public Logger
public boolean
getLogServerErrorDetail()

Implements org.postgresql.core.BaseConnection.getLogServerErrorDetail.

Indicates if error details from server used in included in logging and exceptions.

public DatabaseMetaData
getMetaData()

Implements java.sql.Connection.getMetaData.

Retrieves a DatabaseMetaData object that contains metadata about the database to which this Connection object represents a connection.

public int
getNetworkTimeout()

Implements java.sql.Connection.getNetworkTimeout.

Retrieves the number of milliseconds the driver will wait for a database request to complete.

public PGNotification[]
getNotifications()

Implements org.postgresql.PGConnection.getNotifications.

This method returns any notifications that have been received since the last call to this method.

public PGNotification[]
getNotifications(int
when 0, blocks forever. when > 0, blocks up to the specified number of millis or until at least one notification has been received. If more than one notification is about to be received, these will be returned in one batch.
timeoutMillis
)

Implements org.postgresql.PGConnection.getNotifications.

This method returns any notifications that have been received since the last call to this method.

public Object
getObject(String type, @Nullable String value, @Nullable byte[] byteValue)

private static Set<? extends Integer>
getOidSet(String oidList)

public final @Nullable String
getParameterStatus(String
case-insensitive parameter name
parameterName
)

Implements org.postgresql.PGConnection.getParameterStatus.

Shorthand for getParameterStatuses().get(...) .

public final Map<String, String>
getParameterStatuses()

Implements org.postgresql.PGConnection.getParameterStatuses.

Returns the current values of all parameters reported by the server.

public PreferQueryMode
getPreferQueryMode()

Implements org.postgresql.PGConnection.getPreferQueryMode.

Returns the query mode for this connection.

public int
getPrepareThreshold()

Implements org.postgresql.PGConnection.getPrepareThreshold.

Get the default server-side prepare reuse threshold for statements created from this connection.

public int
public QueryExecutor
getQueryExecutor()

Implements org.postgresql.core.BaseConnection.getQueryExecutor.

Get the QueryExecutor implementation for this connection.

private static PgConnection.ReadOnlyBehavior
public PGReplicationConnection
public ReplicationProtocol
getReplicationProtocol()

Implements org.postgresql.core.BaseConnection.getReplicationProtocol.

Internal protocol for work with physical and logical replication.

public @Nullable String
getSchema()

Implements java.sql.Connection.getSchema.

Retrieves this Connection object's current schema name.

public int

Returns:

server major version
getServerMajorVersion
()

Get server major version.

public int

Returns:

server minor version
getServerMinorVersion
()

Get server minor version.

public boolean
getStandardConformingStrings()

Implements org.postgresql.core.BaseConnection.getStandardConformingStrings.

Returns whether the server treats string-literals according to the SQL standard or if it uses traditional PostgreSQL escaping rules.

public boolean
private static Set<Integer>
private Timer
public TimestampUtils
public int
getTransactionIsolation()

Implements java.sql.Connection.getTransactionIsolation.

Retrieves this Connection object's current transaction isolation level.

public TransactionState
getTransactionState()

Implements org.postgresql.core.BaseConnection.getTransactionState.

Get the current transaction state of this connection.

public TypeInfo
public Map<String, Class<?>>
getTypeMap()

Implements java.sql.Connection.getTypeMap.

Retrieves the Map object associated with this Connection object.

public String

Returns:

the url
getURL
()

We are required to bring back certain information by the DatabaseMetaData class.

public String

Returns:

the user name
getUserName
()

Method getUserName() brings back the User Name (again, we saved it).

public @Nullable SQLWarning
getWarnings()

Implements java.sql.Connection.getWarnings.

Retrieves the first warning reported by calls on this Connection object.

public PGXmlFactoryFactory
getXmlFactoryFactory()

Implements org.postgresql.core.BaseConnection.getXmlFactoryFactory.

Retrieve the factory to instantiate XML processing factories.

public boolean
haveMinimumServerVersion(int
the server version to check, of the form xxyyzz eg 90401
ver
)

Implements org.postgresql.core.BaseConnection.haveMinimumServerVersion.

Check if we have at least a particular server version.

public boolean
haveMinimumServerVersion(Version
the server version to check
ver
)

Implements org.postgresql.core.BaseConnection.haveMinimumServerVersion.

Check if we have at least a particular server version.

public boolean
hintReadOnly()

Implements org.postgresql.core.BaseConnection.hintReadOnly.

Indicates if statements to backend should be hinted as read only.

private void
private static int
integerPart(String dirtyString)

public boolean
isClosed()

Implements java.sql.Connection.isClosed.

Retrieves whether this Connection object has been closed.

public boolean
isColumnSanitiserDisabled()

Implements org.postgresql.core.BaseConnection.isColumnSanitiserDisabled.

Return whether to disable column name sanitation.

public boolean
isReadOnly()

Implements java.sql.Connection.isReadOnly.

Retrieves whether this Connection object is in read-only mode.

public boolean
isValid(int
The time in seconds to wait for the database operation used to validate the connection to complete. If the timeout period expires before the operationcompletes, this method returns false. A value of 0 indicates a timeout is not applied to the database operation.
timeout
)

Implements java.sql.Connection.isValid.

Returns true if the connection has not been closed and is still valid.

public boolean
isWrapperFor(Class<?>
a Class defining an interface.
iface
)

Implements java.sql.Wrapper.isWrapperFor.

Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.

pack-priv final Condition
lockCondition()

Return the lock condition for this connection.

protected Array
makeArray(int oid, @Nullable String fieldString)

protected Blob
makeBlob(long oid)

protected Clob
makeClob(long oid)

protected SQLXML
public String
nativeSQL(String
an SQL statement that may contain one or more '?' parameter placeholders
sql
)

Implements java.sql.Connection.nativeSQL.

Converts the given SQL statement into the system's native SQL grammar.

pack-priv final ResourceLock
obtainLock()

Obtain the connection lock and return it.

private String
public CallableStatement
prepareCall(String
an SQL statement that may contain one or more '?' parameter placeholders. Typically this statement is specified using JDBC call escape syntax.
sql
)

Implements java.sql.Connection.prepareCall.

Creates a CallableStatement object for calling database stored procedures.

public CallableStatement
prepareCall(String
a String object that is the SQL statement to be sent to the database; may contain on or more '?' parameters
sql
,
int
one of the following ResultSet constants: ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
resultSetType
,
int
one of the following ResultSet constants: ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
resultSetConcurrency
,
int
one of the following ResultSet constants: ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
resultSetHoldability
)

Implements java.sql.Connection.prepareCall.

Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.

public CallableStatement
prepareCall(String
a String object that is the SQL statement to be sent to the database; may contain on or more '?' parameters
sql
,
int
a result set type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
resultSetType
,
int
a concurrency type; one of ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
resultSetConcurrency
)

Implements java.sql.Connection.prepareCall.

Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.

public PreparedStatement
prepareStatement(String
an SQL statement that may contain one or more '?' IN parameter placeholders
sql
)

Implements java.sql.Connection.prepareStatement.

Creates a PreparedStatement object for sending parameterized SQL statements to the database.

public PreparedStatement
prepareStatement(String
a String object that is the SQL statement to be sent to the database; may contain one or more '?' IN parameters
sql
,
int
one of the following ResultSet constants: ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
resultSetType
,
int
one of the following ResultSet constants: ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
resultSetConcurrency
,
int
one of the following ResultSet constants: ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
resultSetHoldability
)

Implements java.sql.Connection.prepareStatement.

Creates a PreparedStatement object that will generate ResultSet objects with the given type, concurrency, and holdability.

public PreparedStatement
prepareStatement(String
a String object that is the SQL statement to be sent to the database; may contain one or more '?' IN parameters
sql
,
int
a result set type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
resultSetType
,
int
a concurrency type; one of ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
resultSetConcurrency
)

Implements java.sql.Connection.prepareStatement.

Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency.

public PreparedStatement
prepareStatement(String
an SQL statement that may contain one or more '?' IN parameter placeholders
sql
,
int
a flag indicating whether auto-generated keys should be returned; one of Statement.RETURN_GENERATED_KEYS or Statement.NO_GENERATED_KEYS
autoGeneratedKeys
)

Implements java.sql.Connection.prepareStatement.

Creates a default PreparedStatement object that has the capability to retrieve auto-generated keys.

public PreparedStatement
prepareStatement(String
an SQL statement that may contain one or more '?' IN parameter placeholders
sql
,
@Nullable int[]
an array of column indexes indicating the columns that should be returned from the inserted row or rows
columnIndexes
)

Implements java.sql.Connection.prepareStatement.

Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array.

public PreparedStatement
prepareStatement(String
an SQL statement that may contain one or more '?' IN parameter placeholders
sql
,
@Nullable String[]
an array of column names indicating the columns that should be returned from the inserted row or rows
columnNames
)

Implements java.sql.Connection.prepareStatement.

Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array.

public void
purgeTimerTasks()

Implements org.postgresql.core.BaseConnection.purgeTimerTasks.

Invoke purge() on the underlying shared Timer so that internal resources will be released.

pack-priv void
public void
releaseSavepoint(Savepoint
the Savepoint object to be removed
savepoint
)

Implements java.sql.Connection.releaseSavepoint.

Removes the specified Savepoint and subsequent Savepoint objects from the current transaction.

public void
rollback()

Implements java.sql.Connection.rollback.

Undoes all changes made in the current transaction and releases any database locks currently held by this Connection object.

public void
rollback(Savepoint
the Savepoint object to roll back to
savepoint
)

Implements java.sql.Connection.rollback.

Undoes all changes made after the given Savepoint object was set.

public void
setAdaptiveFetch(boolean
desired state of adaptive fetch.
adaptiveFetch
)

Implements org.postgresql.PGConnection.setAdaptiveFetch.

Turn on/off adaptive fetch for connection.

public void
setAutoCommit(boolean
true to enable auto-commit mode; false to disable it
autoCommit
)

Implements java.sql.Connection.setAutoCommit.

Sets this connection's auto-commit mode to the given state.

public void
setAutosave(AutoSave
connection configuration regarding automatic per-query savepoints
autoSave
)

Implements org.postgresql.PGConnection.setAutosave.

Configures if connection should use automatic savepoints.

public void
setCatalog(String
the name of a catalog (subspace in this Connection object's database) in which to work
catalog
)

Implements java.sql.Connection.setCatalog.

Sets the given catalog name in order to select a subspace of this Connection object's database in which to work.

public void
setClientInfo(String
The name of the client info property to set
name
,
@Nullable String
The value to set the client info property to. If the value is null, the current value of the specified property is cleared.
value
)

Implements java.sql.Connection.setClientInfo.

Sets the value of the client info property specified by name to the value specified by value.

public void
setClientInfo(Properties
the list of client info properties to set
properties
)

Implements java.sql.Connection.setClientInfo.

Sets the value of the connection's client info properties.

public void
setCursorName(String
the cursor name
cursor
)

In SQL, a result table can be retrieved through a cursor that is named.

public void
setDefaultFetchSize(int
new default fetch size
fetchSize
)

Implements org.postgresql.PGConnection.setDefaultFetchSize.

Set the default fetch size for statements created from this connection.

public void
setDisableColumnSanitiser(boolean disableColumnSanitiser)

public void
setFlushCacheOnDeallocate(boolean
true if statement cache should be reset when "deallocate/discard" message observed
flushCacheOnDeallocate
)

Implements org.postgresql.core.BaseConnection.setFlushCacheOnDeallocate.

By default, the connection resets statement cache in case deallocate all/discard all message is observed.

public void
setForceBinary(boolean newValue)

public void
setHoldability(int
a ResultSet holdability constant; one of ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
holdability
)

Implements java.sql.Connection.setHoldability.

Changes the default holdability of ResultSet objects created using this Connection object to the given holdability.

public void
setNetworkTimeout(@Nullable Executor
The Executor implementation which will be used by setNetworkTimeout.
executor
,
int
The time in milliseconds to wait for the database operation to complete. If the JDBC driver does not support milliseconds, the JDBC driver will round the value up to the nearest second. If the timeout period expires before the operation completes, a SQLException will be thrown. A value of 0 indicates that there is not timeout for database operations.
milliseconds
)

Implements java.sql.Connection.setNetworkTimeout.

Sets the maximum period a Connection or objects created from the Connection will wait for the database to reply to any one request.

public void
setPrepareThreshold(int
the new threshold
newThreshold
)

Implements org.postgresql.PGConnection.setPrepareThreshold.

Set the default statement reuse threshold before enabling server-side prepare.

public void
setReadOnly(boolean
true enables read-only mode; false disables it
readOnly
)

Implements java.sql.Connection.setReadOnly.

Puts this connection in read-only mode as a hint to the driver to enable database optimizations.

public Savepoint
setSavepoint()

Implements java.sql.Connection.setSavepoint.

Creates an unnamed savepoint in the current transaction and returns the new Savepoint object that represents it.

public Savepoint
setSavepoint(String
a String containing the name of the savepoint
name
)

Implements java.sql.Connection.setSavepoint.

Creates a savepoint with the given name in the current transaction and returns the new Savepoint object that represents it.

public void
setSchema(@Nullable String
the name of a schema in which to work
schema
)

Implements java.sql.Connection.setSchema.

Sets the given schema name to access.

public void
setTransactionIsolation(int
one of the following Connection constants: Connection.TRANSACTION_READ_UNCOMMITTED, Connection.TRANSACTION_READ_COMMITTED, Connection.TRANSACTION_REPEATABLE_READ, or Connection.TRANSACTION_SERIALIZABLE. (Note that Connection.TRANSACTION_NONE cannot be used because it specifies that transactions are not supported.)
level
)

Implements java.sql.Connection.setTransactionIsolation.

Attempts to change the transaction isolation level for this Connection object to the one given.

public void
setTypeMap(Map<String, Class<?>>
the java.util.Map object to install as the replacement for this Connection object's default type map
map
)

Implements java.sql.Connection.setTypeMap.

Installs the given TypeMap object as the type map for this Connection object.

public void
public <T> T
unwrap(Class<T>
A Class defining an interface that the result must implement.
iface
)

Implements java.sql.Wrapper.unwrap.

Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait