パッケージ org.postgresql
インタフェース PGStatement
- 既知のサブインタフェースのリスト:
BaseStatement
- 既知の実装クラスのリスト:
PgStatement
public interface PGStatement
This interface defines the public PostgreSQL extensions to java.sql.Statement. All Statements
constructed by the PostgreSQL driver implement PGStatement.
-
フィールドの概要
フィールド修飾子とタイプフィールド説明static final long
static final long
static final long
static final long
-
メソッドの概要
修飾子とタイプメソッド説明boolean
Get state of adaptive fetch for statement.long
Returns the Last inserted/updated oid.int
Gets the server-side prepare reuse threshold in use for this statement.boolean
Checks if this statement will be executed as a server-prepared statement.void
setAdaptiveFetch
(boolean adaptiveFetch) Turn on/off adaptive fetch for statement.void
setPrepareThreshold
(int threshold) Sets the reuse threshold for using server-prepared statements.void
setUseServerPrepare
(boolean flag) 推奨されていません。
-
フィールド詳細
-
DATE_POSITIVE_INFINITY
static final long DATE_POSITIVE_INFINITY- 関連項目:
-
DATE_NEGATIVE_INFINITY
static final long DATE_NEGATIVE_INFINITY- 関連項目:
-
DATE_POSITIVE_SMALLER_INFINITY
static final long DATE_POSITIVE_SMALLER_INFINITY- 関連項目:
-
DATE_NEGATIVE_SMALLER_INFINITY
static final long DATE_NEGATIVE_SMALLER_INFINITY- 関連項目:
-
-
メソッドの詳細
-
getLastOID
Returns the Last inserted/updated oid.- 戻り値:
- OID of last insert
- 例外:
SQLException
- if something goes wrong- 導入されたバージョン:
- 7.3
-
setUseServerPrepare
推奨されていません。As of build 302, replaced bysetPrepareThreshold(int)
Turn on the use of prepared statements in the server (server side prepared statements are unrelated to jdbc PreparedStatements) As of build 302, this method is equivalent tosetPrepareThreshold(1)
.- パラメータ:
flag
- use server prepare- 例外:
SQLException
- if something goes wrong- 導入されたバージョン:
- 7.3
-
isUseServerPrepare
boolean isUseServerPrepare()Checks if this statement will be executed as a server-prepared statement. A return value oftrue
indicates that the next execution of the statement will be done as a server-prepared statement, assuming the underlying protocol supports it.- 戻り値:
- true if the next reuse of this statement will use a server-prepared statement
-
setPrepareThreshold
Sets the reuse threshold for using server-prepared statements.
If
threshold
is a non-zero value N, the Nth and subsequent reuses of a PreparedStatement will use server-side prepare.If
threshold
is zero, server-side prepare will not be used.The reuse threshold is only used by PreparedStatement and CallableStatement objects; it is ignored for plain Statements.
- パラメータ:
threshold
- the new threshold for this statement- 例外:
SQLException
- if an exception occurs while changing the threshold- 導入されたバージョン:
- build 302
-
getPrepareThreshold
int getPrepareThreshold()Gets the server-side prepare reuse threshold in use for this statement.- 戻り値:
- the current threshold
- 導入されたバージョン:
- build 302
- 関連項目:
-
setAdaptiveFetch
void setAdaptiveFetch(boolean adaptiveFetch) Turn on/off adaptive fetch for statement. Existing resultSets won't be affected by change here.- パラメータ:
adaptiveFetch
- desired state of adaptive fetch.
-
getAdaptiveFetch
boolean getAdaptiveFetch()Get state of adaptive fetch for statement.- 戻り値:
- state of adaptive fetch (turned on or off)
-
setPrepareThreshold(int)