クラス PgConnection
- すべての実装されたインタフェース:
AutoCloseable
,Connection
,Wrapper
,BaseConnection
,PGConnection
-
ネストされたクラスの概要
ネストされたクラス -
フィールドの概要
フィールド修飾子とタイプフィールド説明protected int
Default fetch size for statement.protected boolean
protected @Nullable DatabaseMetaData
protected int
The current type mappings.インタフェースから継承されたフィールド java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
-
コンストラクタの概要
コンストラクタ -
メソッドの概要
修飾子とタイプメソッド説明protected void
abort()
void
void
addDataType
(String type, Class<? extends PGobject> klass) This allows client code to add a handler for one of org.postgresql's more unique data types.void
addDataType
(String type, String name) This allows client code to add a handler for one of org.postgresql's more unique data types.void
addTimerTask
(TimerTask timerTask, long milliSeconds) Schedule a TimerTask for later execution.void
addWarning
(SQLWarning warn) This adds a warning to the warning chain.boolean
binaryTransferSend
(int oid) Returns true if value for the given oid should be sent using binary transfer.void
Cancel the current query executing on this connection.protected void
void
void
close()
Note: even thoughStatement
is automatically closed when it is garbage collected, it is better to close it explicitly to lower resource consumption.void
commit()
createArrayOf
(String typeName, @Nullable Object elements) Creates anArray
wrapping elements.createArrayOf
(String typeName, @Nullable Object @Nullable [] elements) createQuery
(String sql, boolean escapeProcessing, boolean isParameterized, String... columnNames) <T> T
createQueryObject
(Class<T> ifc) createStatement
(int resultSetType, int resultSetConcurrency) createStatement
(int resultSetType, int resultSetConcurrency, int resultSetHoldability) createStruct
(String typeName, Object[] attributes) protected TypeInfo
createTypeInfo
(BaseConnection conn, int unknownLength) byte @PolyNull []
encodeString
(@PolyNull String str) Encode a string using the database's client_encoding (usually UTF8, but can vary on older server versions).escapeIdentifier
(String identifier) Return the given string suitably quoted to be used as an identifier in an SQL statement string.escapeLiteral
(String literal) Return the given string suitably quoted to be used as a string literal in an SQL statement string.escapeString
(String str) Escapes a string for use as string-literal within an SQL command.Execute a SQL query that returns a single resultset.execSQLQuery
(String s, int resultSetType, int resultSetConcurrency) void
Execute a SQL query that does not return results.boolean
Get state of adaptive fetch for connection.boolean
Connection configuration regarding automatic per-query savepoints.int
Return the process ID (PID) of the backend server process handling this connection.@Nullable String
getClientInfo
(String name) This returns the COPY API for the current connection.@Nullable String
getCursorName gets the cursor name.Get server version number.int
Get the default fetch size for statements created from this connection.This returns the Fastpath API for the current connection.Return metadata cache for given connection.boolean
boolean
int
protected @Nullable String
getIsolationLevelName
(int level) This returns the LargeObject API for the current connection.boolean
Indicates if error details from server used in included in logging and exceptions.int
This method returns any notifications that have been received since the last call to this method.getNotifications
(int timeoutMillis) This method returns any notifications that have been received since the last call to this method.Construct and return an appropriate object for the given type and value.final @Nullable String
getParameterStatus
(String parameterName) Shorthand for getParameterStatuses().get(...) .Returns the current values of all parameters reported by the server.Returns the query mode for this connection.int
Get the default server-side prepare reuse threshold for statements created from this connection.int
Get the QueryExecutor implementation for this connection.Internal protocol for work with physical and logical replication.@Nullable String
int
Get server major version.int
Get server minor version.boolean
Returns whether the server treats string-literals according to the SQL standard or if it uses traditional PostgreSQL escaping rules.boolean
推奨されていません。int
Get the current transaction state of this connection.getURL()
We are required to bring back certain information by the DatabaseMetaData class.Method getUserName() brings back the User Name (again, we saved it).@Nullable SQLWarning
Retrieve the factory to instantiate XML processing factories.boolean
haveMinimumServerVersion
(int ver) Check if we have at least a particular server version.boolean
Check if we have at least a particular server version.boolean
Indicates if statements to backend should be hinted as read only.boolean
isClosed()
boolean
Return whether to disable column name sanitation.boolean
boolean
isValid
(int timeout) boolean
isWrapperFor
(Class<?> iface) protected Array
protected Blob
makeBlob
(long oid) protected Clob
makeClob
(long oid) protected SQLXML
prepareCall
(String sql) prepareCall
(String sql, int resultSetType, int resultSetConcurrency) prepareCall
(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) prepareStatement
(String sql) prepareStatement
(String sql, int autoGeneratedKeys) prepareStatement
(String sql, int @Nullable [] columnIndexes) prepareStatement
(String sql, int resultSetType, int resultSetConcurrency) prepareStatement
(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) prepareStatement
(String sql, String @Nullable [] columnNames) void
Invoke purge() on the underlying shared Timer so that internal resources will be released.void
releaseSavepoint
(Savepoint savepoint) void
rollback()
void
void
setAdaptiveFetch
(boolean adaptiveFetch) Turn on/off adaptive fetch for connection.void
setAutoCommit
(boolean autoCommit) void
setAutosave
(AutoSave autoSave) Configures if connection should use automatic savepoints.void
setCatalog
(String catalog) void
setClientInfo
(String name, @Nullable String value) void
setClientInfo
(Properties properties) void
setCursorName
(String cursor) In SQL, a result table can be retrieved through a cursor that is named.void
setDefaultFetchSize
(int fetchSize) Set the default fetch size for statements created from this connection.void
setDisableColumnSanitiser
(boolean disableColumnSanitiser) void
setFlushCacheOnDeallocate
(boolean flushCacheOnDeallocate) By default, the connection resets statement cache in case deallocate all/discard all message is observed.void
setForceBinary
(boolean newValue) void
setHoldability
(int holdability) void
setNetworkTimeout
(@Nullable Executor executor, int milliseconds) void
setPrepareThreshold
(int newThreshold) Set the default statement reuse threshold before enabling server-side prepare.void
setReadOnly
(boolean readOnly) setSavepoint
(String name) void
void
setTransactionIsolation
(int level) void
setTypeMap
(Map<String, Class<?>> map) void
setTypeMapImpl
(Map<String, Class<?>> map) <T> T
クラスから継承されたメソッド java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
インタフェースから継承されたメソッド java.sql.Connection
beginRequest, endRequest, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid
インタフェースから継承されたメソッド org.postgresql.PGConnection
alterUserPassword
-
フィールド詳細
-
prepareThreshold
protected int prepareThreshold -
defaultFetchSize
protected int defaultFetchSizeDefault fetch size for statement. -
forcebinary
protected boolean forcebinary -
typemap
The current type mappings. -
metadata
-
-
コンストラクタの詳細
-
PgConnection
- 例外:
SQLException
-
-
メソッドの詳細
-
createQuery
public CachedQuery createQuery(String sql, boolean escapeProcessing, boolean isParameterized, String... columnNames) throws SQLException - 定義:
createQuery
インタフェース内BaseConnection
- 例外:
SQLException
-
setFlushCacheOnDeallocate
public void setFlushCacheOnDeallocate(boolean flushCacheOnDeallocate) インタフェースからコピーされた説明:BaseConnection
By default, the connection resets statement cache in case deallocate all/discard all message is observed. This API allows to disable that feature for testing purposes.- 定義:
setFlushCacheOnDeallocate
インタフェース内BaseConnection
- パラメータ:
flushCacheOnDeallocate
- true if statement cache should be reset when "deallocate/discard" message observed
-
getTimestampUtils
推奨されていません。- 定義:
getTimestampUtils
インタフェース内BaseConnection
-
createStatement
- 定義:
createStatement
インタフェース内Connection
- 例外:
SQLException
-
prepareStatement
- 定義:
prepareStatement
インタフェース内Connection
- 例外:
SQLException
-
prepareCall
- 定義:
prepareCall
インタフェース内Connection
- 例外:
SQLException
-
getTypeMap
- 定義:
getTypeMap
インタフェース内Connection
- 例外:
SQLException
-
getQueryExecutor
インタフェースからコピーされた説明:BaseConnection
Get the QueryExecutor implementation for this connection.- 定義:
getQueryExecutor
インタフェース内BaseConnection
- 戻り値:
- the (non-null) executor
-
getReplicationProtocol
インタフェースからコピーされた説明:BaseConnection
Internal protocol for work with physical and logical replication. Physical replication available only since PostgreSQL version 9.1. Logical replication available only since PostgreSQL version 9.4.- 定義:
getReplicationProtocol
インタフェース内BaseConnection
- 戻り値:
- not null replication protocol
-
addWarning
This adds a warning to the warning chain.- パラメータ:
warn
- warning to add
-
execSQLQuery
インタフェースからコピーされた説明:BaseConnection
Execute a SQL query that returns a single resultset. Never causes a new transaction to be started regardless of the autocommit setting.- 定義:
execSQLQuery
インタフェース内BaseConnection
- パラメータ:
s
- the query to execute- 戻り値:
- the (non-null) returned resultset
- 例外:
SQLException
- if something goes wrong.
-
execSQLQuery
public ResultSet execSQLQuery(String s, int resultSetType, int resultSetConcurrency) throws SQLException - 定義:
execSQLQuery
インタフェース内BaseConnection
- 例外:
SQLException
-
execSQLUpdate
インタフェースからコピーされた説明:BaseConnection
Execute a SQL query that does not return results. Never causes a new transaction to be started regardless of the autocommit setting.- 定義:
execSQLUpdate
インタフェース内BaseConnection
- パラメータ:
s
- the query to execute- 例外:
SQLException
- if something goes wrong.
-
setCursorName
In SQL, a result table can be retrieved through a cursor that is named. The current row of a result can be updated or deleted using a positioned update/delete statement that references the cursor name.
We do not support positioned update/delete, so this is a no-op.
- パラメータ:
cursor
- the cursor name- 例外:
SQLException
- if a database access error occurs
-
getCursorName
getCursorName gets the cursor name.- 戻り値:
- the current cursor name
- 例外:
SQLException
- if a database access error occurs
-
getURL
We are required to bring back certain information by the DatabaseMetaData class. These functions do that.
Method getURL() brings back the URL (good job we saved it)
- 戻り値:
- the url
- 例外:
SQLException
- just in case...
-
getUserName
Method getUserName() brings back the User Name (again, we saved it).- 戻り値:
- the user name
- 例外:
SQLException
- just in case...
-
getFastpathAPI
インタフェースからコピーされた説明:PGConnection
This returns the Fastpath API for the current connection.- 定義:
getFastpathAPI
インタフェース内PGConnection
- 戻り値:
- Fastpath API for the current connection
- 例外:
SQLException
- if something wrong happens
-
getLargeObjectAPI
インタフェースからコピーされた説明:PGConnection
This returns the LargeObject API for the current connection.- 定義:
getLargeObjectAPI
インタフェース内PGConnection
- 戻り値:
- LargeObject API for the current connection
- 例外:
SQLException
- if something wrong happens
-
getObject
public Object getObject(String type, @Nullable String value, byte @Nullable [] byteValue) throws SQLException インタフェースからコピーされた説明:BaseConnection
Construct and return an appropriate object for the given type and value. This only considers the types registered via
PGConnection.addDataType(String, Class)
andPGConnection.addDataType(String, String)
.If no class is registered as handling the given type, then a generic
PGobject
instance is returned.value or byteValue must be non-null
- 定義:
getObject
インタフェース内BaseConnection
- パラメータ:
type
- the backend typenamevalue
- the type-specific string representation of the valuebyteValue
- the type-specific binary representation of the value- 戻り値:
- an appropriate object; never null.
- 例外:
SQLException
- if something goes wrong
-
createTypeInfo
-
getTypeInfo
- 定義:
getTypeInfo
インタフェース内BaseConnection
-
addDataType
インタフェースからコピーされた説明:PGConnection
This allows client code to add a handler for one of org.postgresql's more unique data types. It is approximately equivalent toaddDataType(type, Class.forName(name))
.- 定義:
addDataType
インタフェース内PGConnection
- パラメータ:
type
- JDBC type namename
- class name
-
addDataType
インタフェースからコピーされた説明:PGConnection
This allows client code to add a handler for one of org.postgresql's more unique data types.
NOTE: This is not part of JDBC, but an extension.
The best way to use this is as follows:
... ((org.postgresql.PGConnection)myconn).addDataType("mytype", my.class.name.class); ...
where myconn is an open Connection to org.postgresql.
The handling class must extend org.postgresql.util.PGobject
- 定義:
addDataType
インタフェース内PGConnection
- パラメータ:
type
- the PostgreSQL type to registerklass
- the class implementing the Java representation of the type; this class must implementPGobject
).- 例外:
SQLException
- ifklass
does not implementPGobject
).- 関連項目:
-
close
Note: even thoughStatement
is automatically closed when it is garbage collected, it is better to close it explicitly to lower resource consumption. The spec says that calling close on a closed connection is a no-op.- 定義:
close
インタフェース内AutoCloseable
- 定義:
close
インタフェース内Connection
- 例外:
SQLException
-
nativeSQL
- 定義:
nativeSQL
インタフェース内Connection
- 例外:
SQLException
-
getWarnings
- 定義:
getWarnings
インタフェース内Connection
- 例外:
SQLException
-
clearWarnings
- 定義:
clearWarnings
インタフェース内Connection
- 例外:
SQLException
-
setReadOnly
- 定義:
setReadOnly
インタフェース内Connection
- 例外:
SQLException
-
isReadOnly
- 定義:
isReadOnly
インタフェース内Connection
- 例外:
SQLException
-
hintReadOnly
public boolean hintReadOnly()インタフェースからコピーされた説明:BaseConnection
Indicates if statements to backend should be hinted as read only.- 定義:
hintReadOnly
インタフェース内BaseConnection
- 戻り値:
- Indication if hints to backend (such as when transaction begins) should be read only.
- 関連項目:
-
setAutoCommit
- 定義:
setAutoCommit
インタフェース内Connection
- 例外:
SQLException
-
getAutoCommit
- 定義:
getAutoCommit
インタフェース内Connection
- 例外:
SQLException
-
commit
- 定義:
commit
インタフェース内Connection
- 例外:
SQLException
-
checkClosed
- 例外:
SQLException
-
rollback
- 定義:
rollback
インタフェース内Connection
- 例外:
SQLException
-
getTransactionState
インタフェースからコピーされた説明:BaseConnection
Get the current transaction state of this connection.- 定義:
getTransactionState
インタフェース内BaseConnection
- 戻り値:
- current transaction state of this connection
-
getTransactionIsolation
- 定義:
getTransactionIsolation
インタフェース内Connection
- 例外:
SQLException
-
setTransactionIsolation
- 定義:
setTransactionIsolation
インタフェース内Connection
- 例外:
SQLException
-
getIsolationLevelName
-
setCatalog
- 定義:
setCatalog
インタフェース内Connection
- 例外:
SQLException
-
getCatalog
- 定義:
getCatalog
インタフェース内Connection
- 例外:
SQLException
-
getHideUnprivilegedObjects
public boolean getHideUnprivilegedObjects() -
getDBVersionNumber
Get server version number.- 戻り値:
- server version number
-
getServerMajorVersion
public int getServerMajorVersion()Get server major version.- 戻り値:
- server major version
-
getServerMinorVersion
public int getServerMinorVersion()Get server minor version.- 戻り値:
- server minor version
-
haveMinimumServerVersion
public boolean haveMinimumServerVersion(int ver) インタフェースからコピーされた説明:BaseConnection
Check if we have at least a particular server version.
The input version is of the form xxyyzz, matching a PostgreSQL version like xx.yy.zz. So 9.0.12 is 90012.
- 定義:
haveMinimumServerVersion
インタフェース内BaseConnection
- パラメータ:
ver
- the server version to check, of the form xxyyzz eg 90401- 戻り値:
- true if the server version is at least "ver".
-
haveMinimumServerVersion
インタフェースからコピーされた説明:BaseConnection
Check if we have at least a particular server version.
The input version is of the form xxyyzz, matching a PostgreSQL version like xx.yy.zz. So 9.0.12 is 90012.
- 定義:
haveMinimumServerVersion
インタフェース内BaseConnection
- パラメータ:
ver
- the server version to check- 戻り値:
- true if the server version is at least "ver".
-
getEncoding
- 定義:
getEncoding
インタフェース内BaseConnection
-
encodeString
インタフェースからコピーされた説明:BaseConnection
Encode a string using the database's client_encoding (usually UTF8, but can vary on older server versions). This is used when constructing synthetic resultsets (for example, in metadata methods).- 定義:
encodeString
インタフェース内BaseConnection
- パラメータ:
str
- the string to encode- 戻り値:
- an encoded representation of the string
- 例外:
SQLException
- if something goes wrong.
-
escapeString
インタフェースからコピーされた説明:BaseConnection
Escapes a string for use as string-literal within an SQL command. The method chooses the applicable escaping rules based on the value ofBaseConnection.getStandardConformingStrings()
.- 定義:
escapeString
インタフェース内BaseConnection
- パラメータ:
str
- a string value- 戻り値:
- the escaped representation of the string
- 例外:
SQLException
- if the string contains a\0
character
-
getStandardConformingStrings
public boolean getStandardConformingStrings()インタフェースからコピーされた説明:BaseConnection
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 thestandard_conforming_strings
server variable.- 定義:
getStandardConformingStrings
インタフェース内BaseConnection
- 戻り値:
- true if the server treats string literals according to the SQL standard
- 関連項目:
-
isClosed
- 定義:
isClosed
インタフェース内Connection
- 例外:
SQLException
-
cancelQuery
インタフェースからコピーされた説明:BaseConnection
Cancel the current query executing on this connection.- 定義:
cancelQuery
インタフェース内BaseConnection
- 定義:
cancelQuery
インタフェース内PGConnection
- 例外:
SQLException
- if something goes wrong.
-
getNotifications
インタフェースからコピーされた説明:PGConnection
This method returns any notifications that have been received since the last call to this method. Returns null if there have been no notifications.- 定義:
getNotifications
インタフェース内PGConnection
- 戻り値:
- notifications that have been received
- 例外:
SQLException
- if something wrong happens
-
getNotifications
インタフェースからコピーされた説明:PGConnection
This method returns any notifications that have been received since the last call to this method. Returns null if there have been no notifications. A timeout can be specified so the driver waits for notifications.- 定義:
getNotifications
インタフェース内PGConnection
- パラメータ:
timeoutMillis
- 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.- 戻り値:
- notifications that have been received
- 例外:
SQLException
- if something wrong happens
-
getPrepareThreshold
public int getPrepareThreshold()インタフェースからコピーされた説明:PGConnection
Get the default server-side prepare reuse threshold for statements created from this connection.- 定義:
getPrepareThreshold
インタフェース内PGConnection
- 戻り値:
- the current threshold
-
setDefaultFetchSize
インタフェースからコピーされた説明:PGConnection
Set the default fetch size for statements created from this connection.- 定義:
setDefaultFetchSize
インタフェース内PGConnection
- パラメータ:
fetchSize
- new default fetch size- 例外:
SQLException
- if specified negativefetchSize
parameter- 関連項目:
-
getDefaultFetchSize
public int getDefaultFetchSize()インタフェースからコピーされた説明:PGConnection
Get the default fetch size for statements created from this connection.- 定義:
getDefaultFetchSize
インタフェース内PGConnection
- 戻り値:
- current state for default fetch size
- 関連項目:
-
setPrepareThreshold
public void setPrepareThreshold(int newThreshold) インタフェースからコピーされた説明:PGConnection
Set the default statement reuse threshold before enabling server-side prepare. SeePGStatement.setPrepareThreshold(int)
for details.- 定義:
setPrepareThreshold
インタフェース内PGConnection
- パラメータ:
newThreshold
- the new threshold
-
getForceBinary
public boolean getForceBinary() -
setForceBinary
public void setForceBinary(boolean newValue) -
setTypeMapImpl
- 例外:
SQLException
-
getLogger
- 定義:
getLogger
インタフェース内BaseConnection
-
getProtocolVersion
public int getProtocolVersion() -
getStringVarcharFlag
public boolean getStringVarcharFlag()- 定義:
getStringVarcharFlag
インタフェース内BaseConnection
-
getCopyAPI
インタフェースからコピーされた説明:PGConnection
This returns the COPY API for the current connection.- 定義:
getCopyAPI
インタフェース内PGConnection
- 戻り値:
- COPY API for the current connection
- 例外:
SQLException
- if something wrong happens
-
binaryTransferSend
public boolean binaryTransferSend(int oid) インタフェースからコピーされた説明:BaseConnection
Returns true if value for the given oid should be sent using binary transfer. False if value should be sent using text transfer.- 定義:
binaryTransferSend
インタフェース内BaseConnection
- パラメータ:
oid
- The oid to check.- 戻り値:
- True for binary transfer, false for text transfer.
-
getBackendPID
public int getBackendPID()インタフェースからコピーされた説明:PGConnection
Return the process ID (PID) of the backend server process handling this connection.- 定義:
getBackendPID
インタフェース内PGConnection
- 戻り値:
- PID of backend server process.
-
isColumnSanitiserDisabled
public boolean isColumnSanitiserDisabled()インタフェースからコピーされた説明:BaseConnection
Return whether to disable column name sanitation.- 定義:
isColumnSanitiserDisabled
インタフェース内BaseConnection
- 戻り値:
- true column sanitizer is disabled
-
setDisableColumnSanitiser
public void setDisableColumnSanitiser(boolean disableColumnSanitiser) -
getPreferQueryMode
インタフェースからコピーされた説明:PGConnection
Returns the query mode for this connection.
When running in simple query mode, certain features are not available: callable statements, partial result set fetch, bytea type, etc.
The list of supported features is subject to change.
- 定義:
getPreferQueryMode
インタフェース内PGConnection
- 戻り値:
- the preferred query mode
- 関連項目:
-
getAutosave
インタフェースからコピーされた説明:PGConnection
Connection configuration regarding automatic per-query savepoints.- 定義:
getAutosave
インタフェース内PGConnection
- 戻り値:
- connection configuration regarding automatic per-query savepoints
- 関連項目:
-
setAutosave
インタフェースからコピーされた説明:PGConnection
Configures if connection should use automatic savepoints.- 定義:
setAutosave
インタフェース内PGConnection
- パラメータ:
autoSave
- connection configuration regarding automatic per-query savepoints- 関連項目:
-
abort
protected void abort() -
addTimerTask
インタフェースからコピーされた説明:BaseConnection
Schedule a TimerTask for later execution. The task will be scheduled with the shared Timer for this connection.- 定義:
addTimerTask
インタフェース内BaseConnection
- パラメータ:
timerTask
- timer task to schedulemilliSeconds
- delay in milliseconds
-
purgeTimerTasks
public void purgeTimerTasks()インタフェースからコピーされた説明:BaseConnection
Invoke purge() on the underlying shared Timer so that internal resources will be released.- 定義:
purgeTimerTasks
インタフェース内BaseConnection
-
escapeIdentifier
インタフェースからコピーされた説明:PGConnection
Return the given string suitably quoted to be used as an identifier in an SQL statement string. Quotes are added only if necessary (i.e., if the string contains non-identifier characters or would be case-folded). Embedded quotes are properly doubled.- 定義:
escapeIdentifier
インタフェース内PGConnection
- パラメータ:
identifier
- input identifier- 戻り値:
- the escaped identifier
- 例外:
SQLException
- if something goes wrong
-
escapeLiteral
インタフェースからコピーされた説明:PGConnection
Return the given string suitably quoted to be used as a string literal in an SQL statement string. Embedded single-quotes and backslashes are properly doubled. Note that quote_literal returns null on null input.- 定義:
escapeLiteral
インタフェース内PGConnection
- パラメータ:
literal
- input literal- 戻り値:
- the quoted literal
- 例外:
SQLException
- if something goes wrong
-
getFieldMetadataCache
インタフェースからコピーされた説明:BaseConnection
Return metadata cache for given connection.- 定義:
getFieldMetadataCache
インタフェース内BaseConnection
- 戻り値:
- metadata cache
-
getReplicationAPI
- 定義:
getReplicationAPI
インタフェース内PGConnection
- 戻り値:
- replication API for the current connection
-
createStatement
public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException - 定義:
createStatement
インタフェース内Connection
- 例外:
SQLException
-
prepareStatement
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException - 定義:
prepareStatement
インタフェース内Connection
- 例外:
SQLException
-
prepareCall
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException - 定義:
prepareCall
インタフェース内Connection
- 例外:
SQLException
-
getMetaData
- 定義:
getMetaData
インタフェース内Connection
- 例外:
SQLException
-
setTypeMap
- 定義:
setTypeMap
インタフェース内Connection
- 例外:
SQLException
-
makeArray
- 例外:
SQLException
-
makeBlob
- 例外:
SQLException
-
makeClob
- 例外:
SQLException
-
makeSQLXML
- 例外:
SQLException
-
createClob
- 定義:
createClob
インタフェース内Connection
- 例外:
SQLException
-
createBlob
- 定義:
createBlob
インタフェース内Connection
- 例外:
SQLException
-
createNClob
- 定義:
createNClob
インタフェース内Connection
- 例外:
SQLException
-
createSQLXML
- 定義:
createSQLXML
インタフェース内Connection
- 例外:
SQLException
-
createStruct
- 定義:
createStruct
インタフェース内Connection
- 例外:
SQLException
-
createArrayOf
インタフェースからコピーされた説明:PGConnection
Creates anArray
wrapping elements. This is similar toConnection.createArrayOf(String, Object[])
, but also provides support for primitive arrays.- 定義:
createArrayOf
インタフェース内PGConnection
- パラメータ:
typeName
- The SQL name of the type to map the elements to. Must not benull
.elements
- The array of objects to map. Anull
value will result in anArray
representingnull
.- 戻り値:
- An
Array
wrapping elements. - 例外:
SQLException
- If for some reason the array cannot be created.- 関連項目:
-
createArrayOf
public Array createArrayOf(String typeName, @Nullable Object @Nullable [] elements) throws SQLException - 定義:
createArrayOf
インタフェース内Connection
- 例外:
SQLException
-
isValid
- 定義:
isValid
インタフェース内Connection
- 例外:
SQLException
-
setClientInfo
- 定義:
setClientInfo
インタフェース内Connection
- 例外:
SQLClientInfoException
-
setClientInfo
- 定義:
setClientInfo
インタフェース内Connection
- 例外:
SQLClientInfoException
-
getClientInfo
- 定義:
getClientInfo
インタフェース内Connection
- 例外:
SQLException
-
getClientInfo
- 定義:
getClientInfo
インタフェース内Connection
- 例外:
SQLException
-
createQueryObject
- 例外:
SQLException
-
getLogServerErrorDetail
public boolean getLogServerErrorDetail()インタフェースからコピーされた説明:BaseConnection
Indicates if error details from server used in included in logging and exceptions.- 定義:
getLogServerErrorDetail
インタフェース内BaseConnection
- 戻り値:
- true if should be included and passed on to other exceptions
-
isWrapperFor
- 定義:
isWrapperFor
インタフェース内Wrapper
- 例外:
SQLException
-
unwrap
- 定義:
unwrap
インタフェース内Wrapper
- 例外:
SQLException
-
getSchema
- 定義:
getSchema
インタフェース内Connection
- 例外:
SQLException
-
setSchema
- 定義:
setSchema
インタフェース内Connection
- 例外:
SQLException
-
abort
- 定義:
abort
インタフェース内Connection
- 例外:
SQLException
-
setNetworkTimeout
- 定義:
setNetworkTimeout
インタフェース内Connection
- 例外:
SQLException
-
getNetworkTimeout
- 定義:
getNetworkTimeout
インタフェース内Connection
- 例外:
SQLException
-
setHoldability
- 定義:
setHoldability
インタフェース内Connection
- 例外:
SQLException
-
getHoldability
- 定義:
getHoldability
インタフェース内Connection
- 例外:
SQLException
-
setSavepoint
- 定義:
setSavepoint
インタフェース内Connection
- 例外:
SQLException
-
setSavepoint
- 定義:
setSavepoint
インタフェース内Connection
- 例外:
SQLException
-
rollback
- 定義:
rollback
インタフェース内Connection
- 例外:
SQLException
-
releaseSavepoint
- 定義:
releaseSavepoint
インタフェース内Connection
- 例外:
SQLException
-
createStatement
- 定義:
createStatement
インタフェース内Connection
- 例外:
SQLException
-
prepareStatement
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException - 定義:
prepareStatement
インタフェース内Connection
- 例外:
SQLException
-
prepareCall
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException - 定義:
prepareCall
インタフェース内Connection
- 例外:
SQLException
-
prepareStatement
- 定義:
prepareStatement
インタフェース内Connection
- 例外:
SQLException
-
prepareStatement
public PreparedStatement prepareStatement(String sql, int @Nullable [] columnIndexes) throws SQLException - 定義:
prepareStatement
インタフェース内Connection
- 例外:
SQLException
-
prepareStatement
public PreparedStatement prepareStatement(String sql, String @Nullable [] columnNames) throws SQLException - 定義:
prepareStatement
インタフェース内Connection
- 例外:
SQLException
-
getParameterStatuses
インタフェースからコピーされた説明:PGConnection
Returns the current values of all parameters reported by the server.
PostgreSQL reports values for a subset of parameters (GUCs) to the client at connect-time, then sends update messages whenever the values change during a session. PgJDBC records the latest values and exposes it to client applications via
getParameterStatuses()
.PgJDBC exposes individual accessors for some of these parameters as listed below. They are more backwards-compatible and should be preferred where possible.
Not all parameters are reported, only those marked
GUC_REPORT
in the source code. Thepg_settings
view does not expose information about which parameters are reportable. PgJDBC's map will only contain the parameters the server reports values for, so you cannot use this method as a substitute for running aSHOW paramname;
orSELECT current_setting('paramname');
query for arbitrary parameters.Parameter names are case-insensitive and case-preserving in this map, like in PostgreSQL itself. So
DateStyle
anddatestyle
are the same key.As of PostgreSQL 11 the reportable parameter list, and related PgJDBC interfaces or assessors, are:
-
application_name
-Connection.getClientInfo()
,Connection.setClientInfo(java.util.Properties)
andApplicationName
connection property. -
client_encoding
- PgJDBC always sets this toUTF8
. SeeallowEncodingChanges
connection property. DateStyle
- PgJDBC requires this to always be set toISO
standard_conforming_strings
- indirectly viaPGConnection.escapeLiteral(String)
-
TimeZone
- set from JDK timezone seeTimeZone.getDefault()
andTimeZone.setDefault(TimeZone)
integer_datetimes
IntervalStyle
server_encoding
server_version
is_superuser
session_authorization
Note that some PgJDBC operations will change server parameters automatically.
- 定義:
getParameterStatuses
インタフェース内PGConnection
- 戻り値:
- unmodifiable map of case-insensitive parameter names to parameter values
-
-
getParameterStatus
インタフェースからコピーされた説明:PGConnection
Shorthand for getParameterStatuses().get(...) .- 定義:
getParameterStatus
インタフェース内PGConnection
- パラメータ:
parameterName
- case-insensitive parameter name- 戻り値:
- parameter value if defined, or null if no parameter known
- 関連項目:
-
getAdaptiveFetch
public boolean getAdaptiveFetch()インタフェースからコピーされた説明:PGConnection
Get state of adaptive fetch for connection.- 定義:
getAdaptiveFetch
インタフェース内PGConnection
- 戻り値:
- state of adaptive fetch (turned on or off)
-
setAdaptiveFetch
public void setAdaptiveFetch(boolean adaptiveFetch) インタフェースからコピーされた説明:PGConnection
Turn on/off adaptive fetch for connection. Existing statements and resultSets won't be affected by change here.- 定義:
setAdaptiveFetch
インタフェース内PGConnection
- パラメータ:
adaptiveFetch
- desired state of adaptive fetch.
-
getXmlFactoryFactory
インタフェースからコピーされた説明:BaseConnection
Retrieve the factory to instantiate XML processing factories.- 定義:
getXmlFactoryFactory
インタフェース内BaseConnection
- 戻り値:
- The factory to use to instantiate XML processing factories
- 例外:
SQLException
- if the class cannot be found or instantiated.
-