| Modifier and Type | Class and Description |
|---|---|
| public class | |
| private static enum | |
| private class | PgConnection.
Handler for transaction queries. |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private final Set | binaryDisabledOids
Oids for which binary transfer should be disabled. |
| private final boolean | |
| private final LazyCleaner. | |
| 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 | |
| private final LruCache | |
| 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. | |
| 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 | |
| private static final @Nullable MethodHandle | |
| private final TimestampUtils | |
| private final TypeInfo | |
| protected Map | typemap
The current type mappings. |
| private @Nullable PGXmlFactoryFactory | |
| private final @Nullable String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| public void | abort(Executor
The executor)Executor implementation which will
be used by abort.Implements java. Terminates an open connection. |
| public void | addDataType(String
JDBC type name type, String class name name)Implements org. 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 klass)org.).Implements org. 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. Schedule a TimerTask for later execution. |
| public void | |
| public boolean | binaryTransferSend(int
The oid to check. oid)Implements org. 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. Cancel the current query executing on this connection. |
| protected void | |
| private void | |
| public void | clearWarnings()
Implements java. Clears all warnings reported for this |
| public void | close()
Implements java.
Releases this |
| public void | commit()
Implements java. Makes all changes made since the previous
commit/rollback permanent and releases any database locks
currently held by this |
| public Array | |
| 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 typeName, @Nullable @Nullable Object[] Array.getBaseTypeNamethe elements that populate the returned object elements)Implements java. Factory method for creating Array objects. |
| public Blob | createBlob()
Implements java. Constructs an object that implements the |
| public Clob | createClob()
Implements java. Constructs an object that implements the |
| public NClob | createNClob()
Implements java. Constructs an object that implements the |
| public CachedQuery | createQuery(String sql, boolean escapeProcessing, boolean isParameterized, String... columnNames)
Implements org.
|
| public <T> T | |
| public SQLXML | createSQLXML()
Implements java. Constructs an object that implements the |
| public Statement | createStatement()
Implements java. Creates a |
| public Statement | createStatement(int
one of the following resultSetType, int ResultSet
constants:
ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEone of the following resultSetConcurrency, int ResultSet
constants:
ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEone of the following resultSetHoldability)ResultSet
constants:
ResultSet.HOLD_CURSORS_OVER_COMMIT or
ResultSet.CLOSE_CURSORS_AT_COMMITImplements java. Creates a |
| public Statement | createStatement(int
a result set type; one of
resultSetType, int ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEa concurrency type; one of
resultSetConcurrency)ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEImplements java. Creates a |
| public Struct | createStruct(String
the SQL type name of the SQL structured type that this typeName, Object[] 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.the attributes that populate the returned object attributes)Implements java. Factory method for creating Struct objects. |
| protected TypeInfo | |
| public @PolyNull byte[] | |
| public String | escapeIdentifier(String
input identifier identifier)Implements org. 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. 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. Escapes a string for use as string-literal within an SQL command. |
| public ResultSet | execSQLQuery(String
the query to execute s)Implements org. Execute a SQL query that returns a single resultset. |
| public ResultSet | execSQLQuery(String s, int resultSetType, int resultSetConcurrency)
Implements org.
|
| public void | execSQLUpdate(String
the query to execute s)Implements org. Execute a SQL query that does not return results. |
| pack-priv void | |
| private void | |
| public boolean | getAdaptiveFetch()
Implements org. Get state of adaptive fetch for connection. |
| public boolean | getAutoCommit()
Implements java. Retrieves the current auto-commit mode for this |
| public AutoSave | getAutosave()
Implements org. Connection configuration regarding automatic per-query savepoints. |
| public int | getBackendPID()
Implements org. Return the process ID (PID) of the backend server process handling this connection. |
| private static Set | Returns: oids for which binary transfer should be disabledproperties info)Gets all oids for which binary transfer should be disabled. |
| private static Set | Returns: oids for which binary transfer can be enabledproperties info)Gets all oids for which binary transfer can be enabled. |
| public String | getCatalog()
Implements java. Retrieves this |
| public @Nullable String | getClientInfo(String
The name of the client info property to retrieve name)Implements java. Returns the value of the client info property specified by name. |
| public Properties | getClientInfo()
Implements java. Returns a list containing the name and current value of each client info property supported by the driver. |
| public CopyManager | getCopyAPI()
Implements org. This returns the COPY API for the current connection. |
| public @Nullable String | |
| public String | |
| public int | getDefaultFetchSize()
Implements org. Get the default fetch size for statements created from this connection. |
| public Encoding | |
| public Fastpath | getFastpathAPI()
Implements org.
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 | getFieldMetadataCache()
Implements org. Return metadata cache for given connection. |
| public boolean | |
| public boolean | |
| public int | getHoldability()
Implements java. Retrieves the current holdability of |
| protected @Nullable String | |
| public LargeObjectManager | getLargeObjectAPI()
Implements org. This returns the LargeObject API for the current connection. |
| public Logger | |
| public boolean | getLogServerErrorDetail()
Implements org. Indicates if error details from server used in included in logging and exceptions. |
| public DatabaseMetaData | getMetaData()
Implements java. Retrieves a |
| public int | getNetworkTimeout()
Implements java. Retrieves the number of milliseconds the driver will wait for a database request to complete. |
| public PGNotification[] | getNotifications()
Implements org. 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. This method returns any notifications that have been received since the last call to this method. |
| public Object | |
| private static Set | |
| public final @Nullable String | getParameterStatus(String
case-insensitive parameter name parameterName)Implements org. Shorthand for getParameterStatuses().get(...) . |
| public final Map | getParameterStatuses()
Implements org. Returns the current values of all parameters reported by the server. |
| public PreferQueryMode | getPreferQueryMode()
Implements org. Returns the query mode for this connection. |
| public int | getPrepareThreshold()
Implements org. Get the default server-side prepare reuse threshold for statements created from this connection. |
| public int | |
| public QueryExecutor | getQueryExecutor()
Implements org. Get the QueryExecutor implementation for this connection. |
| private static PgConnection. | |
| public PGReplicationConnection | |
| public ReplicationProtocol | getReplicationProtocol()
Implements org. Internal protocol for work with physical and logical replication. |
| public @Nullable String | getSchema()
Implements java. Retrieves this |
| public int | |
| public int | |
| public boolean | getStandardConformingStrings()
Implements org. 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 | |
| private Timer | |
| public TimestampUtils | |
| public int | getTransactionIsolation()
Implements java. Retrieves this |
| public TransactionState | getTransactionState()
Implements org. Get the current transaction state of this connection. |
| public TypeInfo | |
| public Map | getTypeMap()
Implements java. Retrieves the |
| public String | Returns: the urlWe are required to bring back certain information by the DatabaseMetaData class. |
| public String | Returns: the user nameMethod getUserName() brings back the User Name (again, we saved it). |
| public @Nullable SQLWarning | getWarnings()
Implements java. Retrieves the first warning reported by calls on this
|
| public PGXmlFactoryFactory | getXmlFactoryFactory()
Implements org. 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. Check if we have at least a particular server version. |
| public boolean | haveMinimumServerVersion(Version
the server version to check ver)Implements org. Check if we have at least a particular server version. |
| public boolean | hintReadOnly()
Implements org. Indicates if statements to backend should be hinted as read only. |
| private void | |
| private static int | |
| public boolean | isClosed()
Implements java. Retrieves whether this |
| public boolean | isColumnSanitiserDisabled()
Implements org. Return whether to disable column name sanitation. |
| public boolean | isReadOnly()
Implements java. Retrieves whether this |
| 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. 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. 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 | |
| protected Array | |
| protected Blob | |
| protected Clob | |
| protected SQLXML | |
| public String | nativeSQL(String
an SQL statement that may contain one or more '?'
parameter placeholders sql)Implements java. Converts the given SQL statement into the system's native SQL grammar. |
| pack-priv final ResourceLock | |
| 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. Creates a |
| public CallableStatement | prepareCall(String
a sql, int String object that is the SQL statement to
be sent to the database; may contain on or more '?' parametersone of the following resultSetType, int ResultSet
constants:
ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEone of the following resultSetConcurrency, int ResultSet
constants:
ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEone of the following resultSetHoldability)ResultSet
constants:
ResultSet.HOLD_CURSORS_OVER_COMMIT or
ResultSet.CLOSE_CURSORS_AT_COMMITImplements java. Creates a |
| public CallableStatement | prepareCall(String
a sql, int String object that is the SQL statement to
be sent to the database; may contain on or more '?' parametersa result set type; one of
resultSetType, int ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEa concurrency type; one of
resultSetConcurrency)ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEImplements java. Creates a |
| public PreparedStatement | prepareStatement(String
an SQL statement that may contain one or more '?' IN
parameter placeholders sql)Implements java. Creates a |
| public PreparedStatement | prepareStatement(String
a sql, int String object that is the SQL statement to
be sent to the database; may contain one or more '?' IN
parametersone of the following resultSetType, int ResultSet
constants:
ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEone of the following resultSetConcurrency, int ResultSet
constants:
ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEone of the following resultSetHoldability)ResultSet
constants:
ResultSet.HOLD_CURSORS_OVER_COMMIT or
ResultSet.CLOSE_CURSORS_AT_COMMITImplements java. Creates a |
| public PreparedStatement | prepareStatement(String
a sql, int String object that is the SQL statement to
be sent to the database; may contain one or more '?' IN
parametersa result set type; one of
resultSetType, int ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEa concurrency type; one of
resultSetConcurrency)ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEImplements java. Creates a |
| 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
autoGeneratedKeys)Statement.RETURN_GENERATED_KEYS or
Statement.NO_GENERATED_KEYSImplements java. Creates a default |
| 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. Creates a default |
| 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. Creates a default |
| public void | purgeTimerTasks()
Implements org. Invoke purge() on the underlying shared Timer so that internal resources will be released. |
| pack-priv void | |
| public void | releaseSavepoint(Savepoint
the savepoint)Savepoint object to be removedImplements java. Removes the specified |
| public void | rollback()
Implements java. Undoes all changes made in the current transaction
and releases any database locks currently held
by this |
| public void | rollback(Savepoint
the savepoint)Savepoint object to roll back toImplements java. Undoes all changes made after the given |
| public void | setAdaptiveFetch(boolean
desired state of adaptive fetch. adaptiveFetch)Implements org. Turn on/off adaptive fetch for connection. |
| public void | setAutoCommit(boolean
true to enable auto-commit mode;
false to disable itImplements java. 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. Configures if connection should use automatic savepoints. |
| public void | setCatalog(String
the name of a catalog (subspace in this
catalog)Connection object's database) in which to workImplements java. Sets the given catalog name in order to select
a subspace of this |
| 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. 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. 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. Set the default fetch size for statements created from this connection. |
| public void | |
| public void | setFlushCacheOnDeallocate(boolean
true if statement cache should be reset when "deallocate/discard" message observed flushCacheOnDeallocate)Implements org. By default, the connection resets statement cache in case deallocate all/discard all message is observed. |
| public void | |
| public void | setHoldability(int
a holdability)ResultSet holdability constant; one of
ResultSet.HOLD_CURSORS_OVER_COMMIT or
ResultSet.CLOSE_CURSORS_AT_COMMITImplements java. Changes the default holdability of |
| public void | setNetworkTimeout(@Nullable Executor
The executor, int Executor implementation which will
be used by setNetworkTimeout.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. Sets the maximum period a |
| public void | setPrepareThreshold(int
the new threshold newThreshold)Implements org. Set the default statement reuse threshold before enabling server-side prepare. |
| public void | setReadOnly(boolean
true enables read-only mode;
false disables itImplements java. Puts this connection in read-only mode as a hint to the driver to enable database optimizations. |
| public Savepoint | setSavepoint()
Implements java. Creates an unnamed savepoint in the current transaction and
returns the new |
| public Savepoint | setSavepoint(String
a name)String containing the name of the savepointImplements java. Creates a savepoint with the given name in the current transaction
and returns the new |
| public void | setSchema(@Nullable String
the name of a schema in which to work schema)Implements java. Sets the given schema name to access. |
| public void | setTransactionIsolation(int
one of the following level)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.)Implements java. Attempts to change the transaction isolation level for this
|
| public void | setTypeMap(Map<String, Class<?>>
the map)java.util.Map object to install
as the replacement for this Connection
object's default type mapImplements java. Installs the given |
| public void | |
| public <T> T | unwrap(Class<T>
A Class defining an interface that the result must implement. iface)Implements java. Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy. |