| Modifier and Type | Class and Description |
|---|---|
| public class | PgStatement.
ResultHandler implementations for updates, queries, and either-or. |
| Modifier and Type | Field and Description |
|---|---|
| protected boolean | |
| protected @Nullable ArrayList | |
| protected @Nullable ArrayList | |
| private static final AtomicReferenceFieldUpdater | |
| private volatile @Nullable TimerTask | cancelTimerTask
Protects current statement from cancelTask starting, waiting for a bit, and waking up exactly on subsequent query execution. |
| private boolean | |
| protected final int | |
| protected final PgConnection | |
| private static final boolean | DEFAULT_FORCE_BINARY_TRANSFERS
Default state for use or not binary transfers. |
| protected int | |
| protected int | fetchSize
Number of rows to get in a batch. |
| protected org. | firstUnclosedResult
The first unclosed result. |
| private boolean | |
| protected @Nullable ResultWrapper | generatedKeys
Results returned by a statement that wants generated keys. |
| private static final AtomicIntegerFieldUpdater | |
| private volatile int | |
| protected final ResourceLock | |
| protected int | |
| protected int | maxrows
Maximum number of rows to return, 0 = unlimited. |
| protected int | |
| private static final String[] | |
| private boolean | |
| protected boolean | |
| protected @Nullable ResultWrapper | result
The current results. |
| protected final int | |
| private final int | |
| private static final AtomicReferenceFieldUpdater | |
| private volatile StatementCancelState | statementState
Protects statement from out-of-order cancels. |
| protected long | timeout
Timeout (in milliseconds) for a query. |
| private @Nullable TimestampUtils | |
| public boolean | wantsGeneratedKeysAlways
Was this PreparedStatement created to return generated keys for every execution? |
| protected boolean | wantsGeneratedKeysOnce
Does the caller of execute/executeUpdate want generated keys for this execution? |
| protected volatile @Nullable PSQLWarningWrapper | warnings
The warnings chain. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | addBatch(String
typically this is a SQL sql)INSERT or
UPDATE statementImplements java. Adds the given SQL command to the current list of commands for this
|
| public void | addWarning(SQLWarning
warning to add warn)Either initializes new warning wrapper, or adds warning onto the chain. |
| public void | cancel()
Implements java. Cancels this |
| pack-priv void | |
| protected void | |
| protected void | |
| protected final void | |
| private boolean | |
| public void | clearBatch()
Implements java. Empties this |
| public void | |
| public final void | close()
Implements java.
Releases this |
| protected void | |
| protected void | |
| public void | closeOnCompletion()
Implements java. Specifies that this |
| private void | |
| protected BatchResultHandler | |
| public ResultSet | createDriverResultSet(Field[]
the column metadata for the resultset fields, List<Tuple> the resultset data tuples)Implements org. Create a synthetic resultset from data provided by the driver. |
| public ResultSet | createResultSet(@Nullable Query
the query that generated this resultset; used when dealing with updateable
resultsets originalQuery, Field[] the column metadata for the resultset fields, List<Tuple> the resultset data tuples, @Nullable ResultCursor the cursor to use to retrieve more data from the server; if null, no additional
data is present. cursor)Implements org. Create a resultset from data retrieved from the server. |
| public boolean | execute(String
any SQL statement sql)Implements java. Executes the given SQL statement, which may return multiple results. |
| protected final void | |
| public boolean | execute(String
any SQL statement sql, int a constant indicating whether auto-generated
keys should be made available for retrieval using the method
autoGeneratedKeys)getGeneratedKeys; one of the following constants:
Statement.RETURN_GENERATED_KEYS or
Statement.NO_GENERATED_KEYSImplements java. Executes the given SQL statement, which may return multiple results, and signals the driver that any auto-generated keys should be made available for retrieval. |
| public boolean | execute(String
any SQL statement sql, @Nullable int[] an array of the indexes of the columns in the
inserted row that should be made available for retrieval by a
call to the method columnIndexes)getGeneratedKeysImplements java. Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. |
| public boolean | execute(String
any SQL statement sql, @Nullable String[] an array of the names of the columns in the inserted
row that should be made available for retrieval by a call to the
method columnNames)getGeneratedKeysImplements java. Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. |
| public int[] | executeBatch()
Implements java. Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts. |
| private boolean | |
| private void | |
| public long[] | executeLargeBatch()
Overrides default java. Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts. |
| public long | executeLargeUpdate(String
an SQL Data Manipulation Language (DML) statement,
such as sql)INSERT, UPDATE or
DELETE; or an SQL statement that returns nothing,
such as a DDL statement.Overrides default java. Executes the given SQL statement, which may be an |
| public long | executeLargeUpdate(String
an SQL Data Manipulation Language (DML) statement,
such as sql, int INSERT, UPDATE or
DELETE; or an SQL statement that returns nothing,
such as a DDL statement.a flag indicating whether auto-generated keys
should be made available for retrieval;
one of the following constants:
autoGeneratedKeys)Statement.RETURN_GENERATED_KEYS
Statement.NO_GENERATED_KEYSOverrides default java. Executes the given SQL statement and signals the driver with the
given flag about whether the
auto-generated keys produced by this |
| public long | executeLargeUpdate(String
an SQL Data Manipulation Language (DML) statement,
such as sql, int[] INSERT, UPDATE or
DELETE; or an SQL statement that returns nothing,
such as a DDL statement.an array of column indexes indicating the columns
that should be returned from the inserted row columnIndexes)Overrides default java. Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. |
| public long | executeLargeUpdate(String
an SQL Data Manipulation Language (DML) statement,
such as sql, @Nullable String[] INSERT, UPDATE or
DELETE; or an SQL statement that returns nothing,
such as a DDL statement.an array of the names of the columns that should be
returned from the inserted row columnNames)Overrides default java. Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. |
| public ResultSet | executeQuery(String
an SQL statement to be sent to the database, typically a
static SQL sql)SELECT statementImplements java. Executes the given SQL statement, which returns a single
|
| public int | executeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as sql)INSERT, UPDATE or
DELETE; or an SQL statement that returns nothing,
such as a DDL statement.Implements java. Executes the given SQL statement, which may be an |
| public int | executeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as sql, int INSERT, UPDATE or
DELETE; or an SQL statement that returns nothing,
such as a DDL statement.a flag indicating whether auto-generated keys
should be made available for retrieval;
one of the following constants:
autoGeneratedKeys)Statement.RETURN_GENERATED_KEYS
Statement.NO_GENERATED_KEYSImplements java. Executes the given SQL statement and signals the driver with the
given flag about whether the
auto-generated keys produced by this |
| public int | executeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as sql, int[] INSERT, UPDATE or
DELETE; or an SQL statement that returns nothing,
such as a DDL statement.an array of column indexes indicating the columns
that should be returned from the inserted row columnIndexes)Implements java. Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. |
| public int | executeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as sql, @Nullable String[] INSERT, UPDATE or
DELETE; or an SQL statement that returns nothing,
such as a DDL statement.an array of the names of the columns that should be
returned from the inserted row columnNames)Implements java. Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. |
| public boolean | executeWithFlags(String
the query to execute (JDBC-style query) sql, int additional flags)QueryExecutor flags for execution; these are bitwise-ORed into
the default flags.Implements org. Execute a query, passing additional query flags. |
| public boolean | executeWithFlags(CachedQuery
the query to execute (native to PostgreSQL) simpleQuery, int additional flags)QueryExecutor flags for execution; these are bitwise-ORed into
the default flags.Implements org. Execute a query, passing additional query flags. |
| public boolean | executeWithFlags(int
additional flags)QueryExecutor flags for execution; these are bitwise-ORed into
the default flags.Implements org. Execute a prepared query, passing additional query flags. |
| public boolean | getAdaptiveFetch()
Implements org. Get state of adaptive fetch for statement. |
| public Connection | getConnection()
Implements java. Retrieves the |
| public int | getFetchDirection()
Implements java. Retrieves the direction for fetching rows from
database tables that is the default for result sets
generated from this |
| public @Nullable String | |
| public @NonNegative int | getFetchSize()
Implements java. Retrieves the number of result set rows that is the default
fetch size for |
| protected boolean | |
| public ResultSet | getGeneratedKeys()
Implements java. Retrieves any auto-generated keys created as a result of executing this
|
| public long | getLargeMaxRows()
Overrides default java. Retrieves the maximum number of rows that a
|
| public long | getLargeUpdateCount()
Overrides default java. Retrieves the current result as an update count; if the result
is a |
| public long | getLastOID()
Implements org. Returns the Last inserted/updated oid. |
| public int | getMaxFieldSize()
Implements java. Retrieves the maximum number of bytes that can be
returned for character and binary column values in a |
| public int | getMaxRows()
Implements java. Retrieves the maximum number of rows that a
|
| public boolean | getMoreResults()
Implements java. Moves to this |
| public boolean | getMoreResults(int
one of the following current)Statement
constants indicating what should happen to current
ResultSet objects obtained using the method
getResultSet:
Statement.CLOSE_CURRENT_RESULT,
Statement.KEEP_CURRENT_RESULT, or
Statement.CLOSE_ALL_RESULTSImplements java. Moves to this |
| public BaseConnection | |
| public int | getPrepareThreshold()
Implements org. Gets the server-side prepare reuse threshold in use for this statement. |
| public int | getQueryTimeout()
Implements java. Retrieves the number of seconds the driver will
wait for a |
| public long | Returns: the current query timeout limit in milliseconds; 0 = unlimitedThe queryTimeout limit is the number of milliseconds the driver will wait for a Statement to execute. |
| public @Nullable ResultSet | getResultSet()
Implements java. Retrieves the current result as a |
| public int | getResultSetConcurrency()
Implements java. Retrieves the result set concurrency for |
| public int | getResultSetHoldability()
Implements java. Retrieves the result set holdability for |
| public int | getResultSetType()
Implements java. Retrieves the result set type for |
| protected ResultSet | |
| protected TimestampUtils | |
| public int | getUpdateCount()
Implements java. Retrieves the current result as an update count;
if the result is a |
| public @Nullable SQLWarning | getWarnings()
Implements java. Retrieves the first warning reported by calls on this |
| private BatchResultHandler | |
| public boolean | isClosed()
Implements java. Retrieves whether this |
| public boolean | isCloseOnCompletion()
Implements java. Returns a value indicating whether this |
| protected boolean | Returns: true if query is unlikely to be reusedto check (null if current query) cachedQuery)Returns true if query is unlikely to be reused. |
| public boolean | isPoolable()
Implements java. Returns a value indicating whether the |
| public boolean | isUseServerPrepare()
Implements org. Checks if this statement will be executed as a server-prepared statement. |
| 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. |
| private void | |
| public void | setAdaptiveFetch(boolean
desired state of adaptive fetch. adaptiveFetch)Implements org. Turn on/off adaptive fetch for statement. |
| public void | setCursorName(String
the new cursor name, which must be unique within
a connection name)Implements java. Sets the SQL cursor name to the given |
| public void | setEscapeProcessing(boolean
true to enable escape processing;
false to disable itImplements java. Sets escape processing on or off. |
| public void | setFetchDirection(int
the initial direction for processing rows direction)Implements java. Gives the driver a hint as to the direction in which
rows will be processed in |
| public void | setFetchSize(@NonNegative int
the number of rows to fetch rows)Implements java. Gives the JDBC driver a hint as to the number of rows that should
be fetched from the database when more rows are needed for
|
| public void | setLargeMaxRows(long
the new max rows limit; zero means there is no limit max)Overrides default java. Sets the limit for the maximum number of rows that any
|
| public void | setMaxFieldSize(int
the new column size limit in bytes; zero means there is no limit max)Implements java. Sets the limit for the maximum number of bytes that can be returned for
character and binary column values in a |
| public void | setMaxRows(int
the new max rows limit; zero means there is no limit max)Implements java. Sets the limit for the maximum number of rows that any
|
| public void | setPoolable(boolean
requests that the statement be pooled if true and
that the statement not be pooled if false poolable)Implements java. Requests that a |
| public void | setPrepareThreshold(int
the new threshold for this statement newThreshold)Implements org. Sets the reuse threshold for using server-prepared statements. |
| public void | setQueryTimeout(int
the new query timeout limit in seconds; zero means
there is no limit seconds)Implements java. Sets the number of seconds the driver will wait for a
|
| public void | setQueryTimeoutMs(long
- the new query timeout limit in milliseconds millis)Sets the queryTimeout limit. |
| public void | setUseServerPrepare(boolean
use server prepare flag)Implements org. 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 to
|
| private void | |
| protected 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. |
| protected boolean | |
| protected boolean |