IBM DB2 Manual page 329

Table of Contents

Advertisement

ExecutionContext.AUTO_BATCH
Indicates that implicit execution occurs when the number of statements
in the batch reaches a number that is set by SQLJ.
Positive integer
The number of statements that are added to the batch before SQLJ
executes the batch implicitly. The batch might be executed before this
many statements have been added if SQLJ encounters a statement that
is batchable but incompatible, or not batchable.
setBatchLimit affects only statements that occur in the program after
setBatchLimit is called. It does not affect an existing statement batch.
setFetchDirection
Format:
public synchronized void setFetchDirection(int direction) throws SQLException
Gives SQLJ a hint as to the current fetch direction for scrollable iterator objects
that were generated from the given execution context.
Parameters:
direction
One of the following values:
sqlj.runtime.ResultSetIterator.FETCH_FORWARD
Rows are fetched in a forward direction. This is the default.
sqlj.runtime.ResultSetIterator.FETCH_REVERSE
Rows are fetched in a backward direction.
sqlj.runtime.ResultSetIterator.FETCH_UNKNOWN
The order of fetching is unknown.
Any other input value results in an SQLException.
setFetchSize
Format:
synchronized public void setFetchSize(int number-of-rows) throws SQLException
Gives SQLJ a hint as to the number of rows that should be fetched when more
rows are needed.
Parameters:
number-of-rows
The expected number of rows that SQLJ should fetch for the iterator that is
associated with the given execution context.
If number-of-rows is less than 0 or greater than the maximum number of rows
that can be fetched, an SQLException is thrown.
setMaxFieldSize
Format:
public void setMaxFieldSize(int max-bytes)
Specifies the maximum number of bytes that are returned for any string
(character, graphic, or varying-length binary) column in queries that use the
given execution context. If this limit is exceeded, SQLJ discards the remaining
bytes.
Chapter 7. JDBC and SQLJ reference information
313

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents