public interface PGStatement
Modifier and Type | Field and Description |
---|---|
static long | DATE_NEGATIVE_INFINITY |
static long | DATE_NEGATIVE_SMALLER_INFINITY |
static long | DATE_POSITIVE_INFINITY |
static long | DATE_POSITIVE_SMALLER_INFINITY |
Modifier and Type | Method and Description |
---|---|
boolean | getAdaptiveFetch() Get state of adaptive fetch for statement. |
long | getLastOID() Returns the Last inserted/updated oid. |
int | getPrepareThreshold() Gets the server-side prepare reuse threshold in use for this statement. |
boolean | isUseServerPrepare() 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) Deprecated. As of build 302, replaced by setPrepareThreshold(int) |
static final long DATE_POSITIVE_INFINITY
static final long DATE_NEGATIVE_INFINITY
static final long DATE_POSITIVE_SMALLER_INFINITY
static final long DATE_NEGATIVE_SMALLER_INFINITY
long getLastOID() throws SQLException
SQLException
- if something goes wrong@Deprecated void setUseServerPrepare(boolean flag) throws SQLException
setPrepareThreshold(int)
setPrepareThreshold(1)
.flag
- use server prepareSQLException
- if something goes wrongboolean isUseServerPrepare()
true
indicates that the next execution of the statement will be done as a server-prepared statement, assuming the underlying protocol supports it.void setPrepareThreshold(int threshold) throws SQLException
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 statementSQLException
- if an exception occurs while changing the thresholdint getPrepareThreshold()
setPrepareThreshold(int)
void setAdaptiveFetch(boolean adaptiveFetch)
adaptiveFetch
- desired state of adaptive fetch.boolean getAdaptiveFetch()
Copyright © 1997-2020 PostgreSQL Global Development Group. All Rights Reserved.