クラス QueryExecutorBase
- すべての実装されたインタフェース:
QueryExecutor
,TypeTransferModeRegistry
- 直系の既知のサブクラス:
QueryExecutorImpl
-
フィールドの概要
フィールド修飾子とタイプフィールド説明protected final QueryExecutorCloseAction
protected final ResourceLock
protected final Condition
protected final boolean
protected final PGStream
インタフェースから継承されたフィールド org.postgresql.core.QueryExecutor
MAX_SAVE_POINTS, QUERY_BOTH_ROWS_AND_STATUS, QUERY_DESCRIBE_ONLY, QUERY_DISALLOW_BATCHING, QUERY_EXECUTE_AS_SIMPLE, QUERY_FORCE_DESCRIBE_PORTAL, QUERY_FORWARD_CURSOR, QUERY_NO_BINARY_TRANSFER, QUERY_NO_METADATA, QUERY_NO_RESULTS, QUERY_ONESHOT, QUERY_READ_ONLY_HINT, QUERY_SUPPRESS_BEGIN
-
コンストラクタの概要
コンストラクタ修飾子コンストラクタ説明protected
QueryExecutorBase
(PGStream pgStream, int cancelSignalTimeout, Properties info) -
メソッドの概要
修飾子とタイプメソッド説明void
abort()
Abort at network level without sending the Terminate message to the backend.void
addNotification
(PGNotification notification) void
addWarning
(SQLWarning newWarning) final CachedQuery
final CachedQuery
borrowQuery
(String sql) borrowQueryByKey
(Object key) final CachedQuery
borrowReturningQuery
(String sql, String @Nullable [] columnNames) void
close()
Close this connection cleanly.protected QueryExecutorCloseAction
final CachedQuery
createQuery
(String sql, boolean escapeProcessing, boolean isParameterized, String @Nullable ... columnNames) createQueryByKey
(Object key) final Object
createQueryKey
(String sql, boolean escapeProcessing, boolean isParameterized, String @Nullable ... columnNames) int
Return the process ID (PID) of the backend server process handling this connection.Returns an action that would close the connection cleanly.int
Retrieve and clear the set of asynchronous notifications pending on this connection.final @Nullable String
getParameterStatus
(String parameterName) boolean
Return the server version from the server_version GUC.int
Get a machine-readable server version.boolean
Returns whether the server treats string-literals according to the SQL standard or if it uses traditional PostgreSQL escaping rules.Get the current transaction state of this connection.getUser()
@Nullable SQLWarning
Retrieve and clear the chain of warnings accumulated on this connection.protected boolean
boolean
isClosed()
Check if this connection is closed.boolean
boolean
boolean
protected void
onParameterStatus
(String parameterName, String parameterStatus) Update the parameter status map in response to a new ParameterStatus wire protocol message.void
releaseQuery
(CachedQuery cachedQuery) protected abstract void
推奨されていません。void
Sends a query cancellation for this connection.void
setAutoSave
(AutoSave autoSave) void
setBackendKeyData
(int cancelPid, int cancelKey) void
setEncoding
(Encoding encoding) void
setFlushCacheOnDeallocate
(boolean flushCacheOnDeallocate) By default, the connection resets statement cache in case deallocate all/discard all message is observed.void
setNetworkTimeout
(int milliseconds) void
void
setServerVersion
(String serverVersion) void
setServerVersionNum
(int serverVersionNum) void
setStandardConformingStrings
(boolean value) void
boolean
protected boolean
クラスから継承されたメソッド java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
インタフェースから継承されたメソッド org.postgresql.core.QueryExecutor
addBinaryReceiveOid, addBinarySendOid, addQueryToAdaptiveFetchCache, createFastpathParameters, createSimpleQuery, execute, execute, execute, execute, fastpathCall, fetch, getAdaptiveFetch, getAdaptiveFetchSize, getApplicationName, getBinaryReceiveOids, getBinarySendOids, getIntegerDateTimes, getProtocolVersion, getReplicationProtocol, getTimeZone, processNotifies, processNotifies, removeBinaryReceiveOid, removeBinarySendOid, removeQueryFromAdaptiveFetchCache, setAdaptiveFetch, setBinaryReceiveOids, setBinarySendOids, startCopy, wrap
インタフェースから継承されたメソッド org.postgresql.core.v3.TypeTransferModeRegistry
useBinaryForReceive, useBinaryForSend
-
フィールド詳細
-
pgStream
-
closeAction
-
logServerErrorDetail
protected final boolean logServerErrorDetail -
lock
-
lockCondition
-
-
コンストラクタの詳細
-
QueryExecutorBase
protected QueryExecutorBase(PGStream pgStream, int cancelSignalTimeout, Properties info) throws SQLException - 例外:
SQLException
-
-
メソッドの詳細
-
createCloseAction
-
sendCloseMessage
推奨されていません。usegetCloseAction()
insteadSends "terminate connection" message to the backend.- 例外:
IOException
- in case connection termination fails
-
setNetworkTimeout
- 定義:
setNetworkTimeout
インタフェース内QueryExecutor
- 例外:
IOException
-
getNetworkTimeout
- 定義:
getNetworkTimeout
インタフェース内QueryExecutor
- 例外:
IOException
-
getHostSpec
- 定義:
getHostSpec
インタフェース内QueryExecutor
- 戻り値:
- the host and port this connection is connected to.
-
getUser
- 定義:
getUser
インタフェース内QueryExecutor
- 戻り値:
- the user this connection authenticated as.
-
getDatabase
- 定義:
getDatabase
インタフェース内QueryExecutor
- 戻り値:
- the database this connection is connected to.
-
setBackendKeyData
public void setBackendKeyData(int cancelPid, int cancelKey) -
getBackendPID
public int getBackendPID()インタフェースからコピーされた説明:QueryExecutor
Return the process ID (PID) of the backend server process handling this connection.- 定義:
getBackendPID
インタフェース内QueryExecutor
- 戻り値:
- process ID (PID) of the backend server process handling this connection
-
abort
public void abort()インタフェースからコピーされた説明:QueryExecutor
Abort at network level without sending the Terminate message to the backend.- 定義:
abort
インタフェース内QueryExecutor
-
getCloseAction
インタフェースからコピーされた説明:QueryExecutor
Returns an action that would close the connection cleanly. The returned object should refer only the minimum subset of objects required for proper resource cleanup. For instance, it should better not hold a strong reference toQueryExecutor
.- 定義:
getCloseAction
インタフェース内QueryExecutor
- 戻り値:
- action that would close the connection cleanly.
-
close
public void close()インタフェースからコピーされた説明:QueryExecutor
Close this connection cleanly.- 定義:
close
インタフェース内QueryExecutor
-
isClosed
public boolean isClosed()インタフェースからコピーされた説明:QueryExecutor
Check if this connection is closed.- 定義:
isClosed
インタフェース内QueryExecutor
- 戻り値:
- true iff the connection is closed.
-
sendQueryCancel
インタフェースからコピーされた説明:QueryExecutor
Sends a query cancellation for this connection.- 定義:
sendQueryCancel
インタフェース内QueryExecutor
- 例外:
SQLException
- if something goes wrong.
-
addWarning
-
addNotification
-
getNotifications
インタフェースからコピーされた説明:QueryExecutor
Retrieve and clear the set of asynchronous notifications pending on this connection.- 定義:
getNotifications
インタフェース内QueryExecutor
- 戻り値:
- an array of notifications; if there are no notifications, an empty array is returned.
- 例外:
SQLException
- if and error occurs while fetching notifications
-
getWarnings
インタフェースからコピーされた説明:QueryExecutor
Retrieve and clear the chain of warnings accumulated on this connection.- 定義:
getWarnings
インタフェース内QueryExecutor
- 戻り値:
- the first SQLWarning in the chain; subsequent warnings can be found via SQLWarning.getNextWarning().
-
getServerVersion
インタフェースからコピーされた説明:QueryExecutor
Return the server version from the server_version GUC.
Note that there's no requirement for this to be numeric or of the form x.y.z. PostgreSQL development releases usually have the format x.ydevel e.g. 9.4devel; betas usually x.ybetan e.g. 9.4beta1. The --with-extra-version configure option may add an arbitrary string to this.
Don't use this string for logic, only use it when displaying the server version to the user. Prefer getServerVersionNum() for all logic purposes.
- 定義:
getServerVersion
インタフェース内QueryExecutor
- 戻り値:
- the server version string from the server_version GUC
-
getServerVersionNum
public int getServerVersionNum()インタフェースからコピーされた説明:QueryExecutor
Get a machine-readable server version.
This returns the value of the server_version_num GUC. If no such GUC exists, it falls back on attempting to parse the text server version for the major version. If there's no minor version (e.g. a devel or beta release) then the minor version is set to zero. If the version could not be parsed, zero is returned.
- 定義:
getServerVersionNum
インタフェース内QueryExecutor
- 戻り値:
- the server version in numeric XXYYZZ form, eg 090401, from server_version_num
-
setServerVersion
-
setServerVersionNum
public void setServerVersionNum(int serverVersionNum) -
setTransactionState
-
setStandardConformingStrings
public void setStandardConformingStrings(boolean value) -
getStandardConformingStrings
public boolean getStandardConformingStrings()インタフェースからコピーされた説明:QueryExecutor
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
インタフェース内QueryExecutor
- 戻り値:
- true if the server treats string literals according to the SQL standard
-
getQuoteReturningIdentifiers
public boolean getQuoteReturningIdentifiers()- 定義:
getQuoteReturningIdentifiers
インタフェース内QueryExecutor
- 戻り値:
- true if we are going to quote identifier provided in the returning array default is true
-
getTransactionState
インタフェースからコピーされた説明:QueryExecutor
Get the current transaction state of this connection.- 定義:
getTransactionState
インタフェース内QueryExecutor
- 戻り値:
- a ProtocolConnection.TRANSACTION_* constant.
-
setEncoding
- 例外:
IOException
-
getEncoding
- 定義:
getEncoding
インタフェース内QueryExecutor
- 戻り値:
- the current encoding in use by this connection
-
isReWriteBatchedInsertsEnabled
public boolean isReWriteBatchedInsertsEnabled()- 定義:
isReWriteBatchedInsertsEnabled
インタフェース内QueryExecutor
-
borrowQuery
- 定義:
borrowQuery
インタフェース内QueryExecutor
- 例外:
SQLException
-
borrowCallableQuery
- 定義:
borrowCallableQuery
インタフェース内QueryExecutor
- 例外:
SQLException
-
borrowReturningQuery
public final CachedQuery borrowReturningQuery(String sql, String @Nullable [] columnNames) throws SQLException - 定義:
borrowReturningQuery
インタフェース内QueryExecutor
- 例外:
SQLException
-
borrowQueryByKey
- 定義:
borrowQueryByKey
インタフェース内QueryExecutor
- 例外:
SQLException
-
releaseQuery
- 定義:
releaseQuery
インタフェース内QueryExecutor
-
createQueryKey
public final Object createQueryKey(String sql, boolean escapeProcessing, boolean isParameterized, String @Nullable ... columnNames) - 定義:
createQueryKey
インタフェース内QueryExecutor
-
createQueryByKey
- 定義:
createQueryByKey
インタフェース内QueryExecutor
- 例外:
SQLException
-
createQuery
public final CachedQuery createQuery(String sql, boolean escapeProcessing, boolean isParameterized, String @Nullable ... columnNames) throws SQLException - 定義:
createQuery
インタフェース内QueryExecutor
- 例外:
SQLException
-
isColumnSanitiserDisabled
public boolean isColumnSanitiserDisabled()- 定義:
isColumnSanitiserDisabled
インタフェース内QueryExecutor
-
getEscapeSyntaxCallMode
- 定義:
getEscapeSyntaxCallMode
インタフェース内QueryExecutor
-
getPreferQueryMode
- 定義:
getPreferQueryMode
インタフェース内QueryExecutor
-
setPreferQueryMode
- 定義:
setPreferQueryMode
インタフェース内QueryExecutor
-
getAutoSave
- 定義:
getAutoSave
インタフェース内QueryExecutor
-
setAutoSave
- 定義:
setAutoSave
インタフェース内QueryExecutor
-
willHealViaReparse
-
willHealOnRetry
- 定義:
willHealOnRetry
インタフェース内QueryExecutor
-
isFlushCacheOnDeallocate
public boolean isFlushCacheOnDeallocate() -
setFlushCacheOnDeallocate
public void setFlushCacheOnDeallocate(boolean flushCacheOnDeallocate) インタフェースからコピーされた説明:QueryExecutor
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
インタフェース内QueryExecutor
- パラメータ:
flushCacheOnDeallocate
- true if statement cache should be reset when "deallocate/discard" message observed
-
hasNotifications
protected boolean hasNotifications() -
getParameterStatuses
- 定義:
getParameterStatuses
インタフェース内QueryExecutor
-
getParameterStatus
- 定義:
getParameterStatus
インタフェース内QueryExecutor
-
onParameterStatus
Update the parameter status map in response to a new ParameterStatus wire protocol message.The server sends ParameterStatus messages when GUC_REPORT settings are initially assigned and whenever they change.
A future version may invoke a client-defined listener class at this point, so this should be the only access path.
Keys are case-insensitive and case-preserving.
The server doesn't provide a way to report deletion of a reportable parameter so we don't expose one here.
- パラメータ:
parameterName
- case-insensitive case-preserving name of parameter to create or updateparameterStatus
- new value of parameter- 関連項目:
-
getCloseAction()
instead