com.informix.jdbc

## Class IfxStatement

- java.lang.Object
- - com.informix.jdbc.IfxStatement

All Implemented Interfaces:
  IfmxStatement, java.lang.AutoCloseable, java.sql.Statement, java.sql.Wrapper

Direct Known Subclasses:
  IfxPreparedStatement

    public class IfxStatement
    extends java.lang.Object
    implements IfmxStatement

A Statement object is used for executing a static SQL statement and obtaining the results produced by it.

Only one ResultSet per Statement can be open at any point in time. Therefore, if the reading of one ResultSet is interleaved with the reading of another, each must have been generated by different Statements.

See Also:
  `Connection.createStatement()`, `ResultSet`

### Field Summary

Fields
`protected java.util.Vector<IfxObject>` `BatchParamVector`
`protected java.util.Vector<java.lang.String>` `BatchVector`
`protected boolean` `Closed`
`java.lang.String` `commandString`
`protected IfxResultSet` `currentResult`
`protected boolean` `cursorOpen`
`protected boolean` `executeBatchInProgress`
`protected IfxConnection` `jconn`
`protected int` `numqmarks`
`protected IfxResultSetMetaData` `outputMetaData`
`protected PreparedStatementCache` `pool`
`protected boolean` `poolable`
`protected IfxProtocol` `prot`
`protected static short` `SGK_ALL_KEYS`
`protected int[]` `SGK_indexes`
`protected static short` `SGK_KEYS_BY_INDEX`
`protected static short` `SGK_KEYS_BY_NAME`
`protected IfxResultSetMetaData` `SGK_metaData`
`protected java.lang.String[]` `SGK_names`
`protected static short` `SGK_NO_KEYS`
`protected IfxClientResultSet` `SGK_resultSet`
`protected int` `statementType`

### Fields inherited from interface java.sql.Statement

`CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addBatch(java.lang.String sql)` JDBC 2.0 Adds a SQL command to the current batch of commmands for the statement.
`void` `cancel()` Cancel can be used by one thread to cancel a statement that is being executed by another thread.
`protected void` `chkAndSetGetRsltCalledFlag()` check to see if calledgetResultSet is already set , throw exception if its already set .
`void` `clearBatch()` JDBC 2.0 Make the set of commands in the current batch empty.
`void` `clearWarnings()` After this call getWarnings returns null until a new warning is reported for this Statement.
`void` `close()` In many cases, it is desirable to immediately release a Statements's database and JDBC resources instead of waiting for this to happen when it is automatically closed; the close method provides this immediate release.
`void` `closeOnCompletion()`
`boolean` `execute(java.lang.String sql)` Execute a SQL statement that may return multiple results.
`boolean` `execute(java.lang.String sql, int autoGeneratedKeys)`
`boolean` `execute(java.lang.String sql, int[] columnIndexes)`
`boolean` `execute(java.lang.String sql, java.lang.String[] columnNames)`
`int[]` `executeBatch()` JDBC 2.0 Submit a batch of commands to the database for execution.
`protected boolean` `executeImpl()` Execute a SQL statement.
`java.sql.ResultSet` `executeQuery(java.lang.String sql)` Execute a SQL statement that returns a single ResultSet.
`java.sql.ResultSet` `executeQuery(java.lang.String sql, boolean withHold)` Execute a SQL statement that returns a single ResultSet.
`protected java.sql.ResultSet` `executeQueryImpl(boolean withHold, boolean withReOptimzation)` Execute a SQL statement that returns a single ResultSet.
`int` `executeUpdate(java.lang.String sql)` Execute a SQL INSERT, UPDATE or DELETE statement.
`int` `executeUpdate(java.lang.String sql, int autoGeneratedKeys)` Execute a SQL INSERT, UPDATE or DELETE statement.
`int` `executeUpdate(java.lang.String sql, int[] columnIndexes)` Execute a SQL INSERT, UPDATE or DELETE statement.
`int` `executeUpdate(java.lang.String sql, java.lang.String[] columnNames)` Execute a SQL INSERT, UPDATE or DELETE statement.
`boolean` `getAutoFree()` Returns the autoFree flag
`long` `getBigSerial()` Informix extension which returns the bigserial value of the last row inserted.
`IfxConnection` `getConnection()` Get the IfxConnection object reference from this staement.
`java.lang.String` `getCursorName()` Get the cursor name for the statement
`int` `getFetchBufferSize()` returns the fetch buffer size if set for this statement object
`int` `getFetchDirection()` JDBC 2.0 Determine the fetch direction.
`int` `getFetchSize()` JDBC 2.0 Determine the default fetch size.
`java.sql.ResultSet` `getGeneratedKeys()` Return a resultSet containing the AutoGeneratedKeys returned by the server for last execution of the statement.
`int` `getMaxFieldSize()` The maxFieldSize limit (in bytes) is the maximum amount of data returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR columns.
`int` `getMaxRows()` The maxRows limit is the maximum number of rows that a ResultSet can contain.
`boolean` `getMoreResults()` getMoreResults moves to a Statement's next result.
`boolean` `getMoreResults(int current)`
`int` `getQueryTimeout()` The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute.
`java.sql.ResultSet` `getResultSet()` getResultSet returns the current result as a ResultSet.
`int` `getResultSetConcurrency()` JDBC 2.0 Determine the result set concurrency.
`int` `getResultSetHoldability()`
`int` `getResultSetType()` JDBC 2.0 Determine the result set type.
`int` `getSerial()` Informix extension which returns the serial value of the last row inserted.
`long` `getSerial8()` Informix extension which returns the serial8 value of the last row inserted.
`int` `getStatementType()` An Informix extention to return the statement type returned by preparing the SQL statement.
`int` `getUpdateCount()` getUpdateCount returns the current result, which should be an integer value.
`java.sql.SQLWarning` `getWarnings()` The first warning reported by calls on this Statement is returned.
`boolean` `isClosed()`
`boolean` `isCloseOnCompletion()`
`boolean` `isPoolable()`
`boolean` `isWrapperFor(java.lang.Class<?> iface)`
`protected void` `resetMethodCalledFlags()` Methods such as getResultSet() and getUpdateCount() may be called only once for a particular resultset.
`protected void` `scrubBatch()` clears members set while batch update was in progress
`void` `setAutoFree(boolean flag)` Sets the autoFree flag if the server supports it.
`void` `setCursorName(java.lang.String name)` setCursorName defines the SQL cursor name that will be used by subsequent Statement execute methods.
`void` `setEscapeProcessing(boolean enable)` If escape scanning is on (the default) the driver will do escape substitution before sending the SQL to the database.
`void` `setFetchBufferSize(int bufferSize)` An Informix extension that sets the buffer size for this Statement object for fetch operation This value will override any FET_BUF_SIZE connection level property and is useful when OPTOFC property is set Server will use this value as hint to determin the maximum buffer size to send the data to the clients.
`void` `setFetchDirection(int direction)` JDBC 2.0 Give a hint as to the direction in which the rows in a result set will be processed.
`void` `setFetchSize(int rows)` JDBC 2.0 Give the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed.
`void` `setMaxFieldSize(int max)` The maxFieldSize limit (in bytes) is set to limit the size of data that can be returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR fields.
`void` `setMaxRows(int max)` The maxRows limit is set to limit the number of rows that any ResultSet can contain.
`void` `setPoolable(boolean poolable)`
`void` `setQueryTimeout(int seconds)` The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute.
`protected void` `setResultSetConcurrency(int resultSetConcurrencyType)` Check to see if the Concurrency Type is supported and either set it or return an Exception.
`protected void` `setResultSetType(int resultSetType)` Check to see if the ResultSet Type is supported and either set it or return an Exception.
`protected void` `setStatementType(int stype)`
`protected void` `transferWarnings()` This method is called to transfer warnings reported on a statement from IfxSqli object to the statement object This is needed as resultset object and statement object share same instance of IfxSqli class.
`<T> T` `unwrap(java.lang.Class<T> iface)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.sql.Statement

`executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, setLargeMaxRows`

### Field Detail

#### cursorOpen

    protected boolean cursorOpen

#### poolable

    protected boolean poolable

#### jconn

    protected IfxConnection jconn

#### prot

    protected IfxProtocol prot

#### commandString

    public java.lang.String commandString

#### currentResult

    protected IfxResultSet currentResult

#### numqmarks

    protected int numqmarks

#### BatchVector

    protected java.util.Vector<java.lang.String> BatchVector

#### BatchParamVector

    protected java.util.Vector<IfxObject> BatchParamVector

#### executeBatchInProgress

    protected boolean executeBatchInProgress

#### outputMetaData

    protected IfxResultSetMetaData outputMetaData

#### statementType

    protected int statementType

#### Closed

    protected boolean Closed

#### SGK_NO_KEYS

    protected static final short SGK_NO_KEYS

See Also:
  Constant Field Values

#### SGK_ALL_KEYS

    protected static final short SGK_ALL_KEYS

See Also:
  Constant Field Values

#### SGK_KEYS_BY_INDEX

    protected static final short SGK_KEYS_BY_INDEX

See Also:
  Constant Field Values

#### SGK_KEYS_BY_NAME

    protected static final short SGK_KEYS_BY_NAME

See Also:
  Constant Field Values

#### SGK_indexes

    protected int[] SGK_indexes

#### SGK_names

    protected java.lang.String[] SGK_names

#### SGK_metaData

    protected IfxResultSetMetaData SGK_metaData

#### SGK_resultSet

    protected IfxClientResultSet SGK_resultSet

#### pool

    protected final PreparedStatementCache pool

### Method Detail

#### executeQuery

    public java.sql.ResultSet executeQuery(java.lang.String sql)
                                    throws java.sql.SQLException

Execute a SQL statement that returns a single ResultSet.

Specified by:
  `executeQuery` in interface `java.sql.Statement`
Parameters:
  `sql` - typically this is a static SQL SELECT statement
Returns:
  the table of data produced by the SQL statement
Throws:
  `java.sql.SQLException`

#### executeQuery

    public java.sql.ResultSet executeQuery(java.lang.String sql,
                                           boolean withHold)
                                    throws java.sql.SQLException

Execute a SQL statement that returns a single ResultSet.

Specified by:
  `executeQuery` in interface `IfmxStatement`
Parameters:
  `sql` - typically this is a static SQL SELECT statement
  `withHold` - use Cursor With Hold or not
Returns:
  the table of data produced by the SQL statement
Throws:
  `java.sql.SQLException`

#### executeUpdate

    public int executeUpdate(java.lang.String sql)
                      throws java.sql.SQLException

Execute a SQL INSERT, UPDATE or DELETE statement. In addition, SQL statements that return nothing such as SQL DDL statements can be executed.

Specified by:
  `executeUpdate` in interface `java.sql.Statement`
Parameters:
  `sql` - a SQL INSERT, UPDATE or DELETE statement or a SQL statement that returns nothing
Returns:
  either the row count for INSERT, UPDATE or DELETE; or 0 for SQL statements that return nothing
Throws:
  `java.sql.SQLException`

#### executeUpdate

    public int executeUpdate(java.lang.String sql,
                             int autoGeneratedKeys)
                      throws java.sql.SQLException

Execute a SQL INSERT, UPDATE or DELETE statement. In addition, SQL statements that return nothing such as SQL DDL statements can be executed.

Specified by:
  `executeUpdate` in interface `java.sql.Statement`
Parameters:
  `sql` - a SQL INSERT, UPDATE or DELETE statement or a SQL statement that returns nothing
Returns:
  either the row count for INSERT, UPDATE or DELETE; or 0 for SQL statements that return nothing
Throws:
  `java.sql.SQLException`

#### executeUpdate

    public int executeUpdate(java.lang.String sql,
                             int[] columnIndexes)
                      throws java.sql.SQLException

Execute a SQL INSERT, UPDATE or DELETE statement. In addition, SQL statements that return nothing such as SQL DDL statements can be executed.

Specified by:
  `executeUpdate` in interface `java.sql.Statement`
Parameters:
  `sql` - a SQL INSERT, UPDATE or DELETE statement or a SQL statement that returns nothing
Returns:
  either the row count for INSERT, UPDATE or DELETE; or 0 for SQL statements that return nothing
Throws:
  `java.sql.SQLException`

#### executeUpdate

    public int executeUpdate(java.lang.String sql,
                             java.lang.String[] columnNames)
                      throws java.sql.SQLException

Execute a SQL INSERT, UPDATE or DELETE statement. In addition, SQL statements that return nothing such as SQL DDL statements can be executed.

Specified by:
  `executeUpdate` in interface `java.sql.Statement`
Parameters:
  `sql` - a SQL INSERT, UPDATE or DELETE statement or a SQL statement that returns nothing
Returns:
  either the row count for INSERT, UPDATE or DELETE; or 0 for SQL statements that return nothing
Throws:
  `java.sql.SQLException`

#### getGeneratedKeys

    public java.sql.ResultSet getGeneratedKeys()
                                        throws java.sql.SQLException

Return a resultSet containing the AutoGeneratedKeys returned by the server for last execution of the statement. if a valid resultSet cannot be returned then return an empty one;

Specified by:
  `getGeneratedKeys` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### close

    public void close()
               throws java.sql.SQLException

In many cases, it is desirable to immediately release a Statements's database and JDBC resources instead of waiting for this to happen when it is automatically closed; the close method provides this immediate release.

Note: A Statement is automatically closed when it is garbage collected. When a Statement is closed its current ResultSet, if one exists, is also closed.

Specified by:
  `close` in interface `java.lang.AutoCloseable`
Specified by:
  `close` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### getMaxFieldSize

    public int getMaxFieldSize()
                        throws java.sql.SQLException

The maxFieldSize limit (in bytes) is the maximum amount of data returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR columns. If the limit is exceeded, the excess data is silently discarded.

Specified by:
  `getMaxFieldSize` in interface `java.sql.Statement`
Returns:
  the current max column size limit; zero means unlimited
Throws:
  `java.sql.SQLException`

#### setMaxFieldSize

    public void setMaxFieldSize(int max)
                         throws java.sql.SQLException

The maxFieldSize limit (in bytes) is set to limit the size of data that can be returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR fields. If the limit is exceeded, the excess data is silently discarded.

Specified by:
  `setMaxFieldSize` in interface `java.sql.Statement`
Parameters:
  `max` - the new max column size limit; zero means unlimited
Throws:
  `java.sql.SQLException`

#### getMaxRows

    public int getMaxRows()
                   throws java.sql.SQLException

The maxRows limit is the maximum number of rows that a ResultSet can contain. If the limit is exceeded, the excess rows are silently dropped.

Specified by:
  `getMaxRows` in interface `java.sql.Statement`
Returns:
  the current max row limit; zero means unlimited
Throws:
  `java.sql.SQLException`

#### setMaxRows

    public void setMaxRows(int max)
                    throws java.sql.SQLException

The maxRows limit is set to limit the number of rows that any ResultSet can contain. If the limit is exceeded, the excess rows are silently dropped.

Specified by:
  `setMaxRows` in interface `java.sql.Statement`
Parameters:
  `max` - the new max rows limit; zero means unlimited
Throws:
  `java.sql.SQLException`

#### setEscapeProcessing

    public void setEscapeProcessing(boolean enable)
                             throws java.sql.SQLException

If escape scanning is on (the default) the driver will do escape substitution before sending the SQL to the database.

Specified by:
  `setEscapeProcessing` in interface `java.sql.Statement`
Parameters:
  `enable` - true to enable; false to disable
Throws:
  `java.sql.SQLException`

#### getQueryTimeout

    public int getQueryTimeout()
                        throws java.sql.SQLException

The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute. If the limit is exceeded a SQLException is thrown.

Specified by:
  `getQueryTimeout` in interface `java.sql.Statement`
Returns:
  the current query timeout limit in seconds; zero means unlimited
Throws:
  `java.sql.SQLException`

#### setQueryTimeout

    public void setQueryTimeout(int seconds)
                         throws java.sql.SQLException

The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute. If the limit is exceeded a SQLException is thrown.

Specified by:
  `setQueryTimeout` in interface `java.sql.Statement`
Parameters:
  `seconds` - the new query timeout limit in seconds; zero means unlimited
Throws:
  `java.sql.SQLException`

#### cancel

    public void cancel()
                throws java.sql.SQLException

Cancel can be used by one thread to cancel a statement that is being executed by another thread.

Specified by:
  `cancel` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### transferWarnings

    protected void transferWarnings()
                             throws java.sql.SQLException

This method is called to transfer warnings reported on a statement from IfxSqli object to the statement object This is needed as resultset object and statement object share same instance of IfxSqli class. As per JDBC documetation , getWarnings() on a resultset object should only return warnings chain caused by resultset methods. and warnings related with execution of a statement should be chained to a statement object .

Throws:
  `java.sql.SQLException`

#### getWarnings

    public java.sql.SQLWarning getWarnings()
                                    throws java.sql.SQLException

The first warning reported by calls on this Statement is returned. A Statment's execute methods clear its SQLWarning chain. Subsequent Statement warnings will be chained to this SQLWarning.

The warning chain is automatically cleared each time a statement is (re)executed.

Note: If you are processing a ResultSet then any warnings associated with ResultSet reads will be chained on the ResultSet object.

Specified by:
  `getWarnings` in interface `java.sql.Statement`
Returns:
  the first SQLWarning or null
Throws:
  `java.sql.SQLException`

#### clearWarnings

    public void clearWarnings()
                       throws java.sql.SQLException

After this call getWarnings returns null until a new warning is reported for this Statement.

Specified by:
  `clearWarnings` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### setCursorName

    public void setCursorName(java.lang.String name)
                       throws java.sql.SQLException

setCursorName defines the SQL cursor name that will be used by subsequent Statement execute methods. This name can then be used in SQL positioned update/delete statements to identify the current row in the ResultSet generated by this statement. If the database doesn't support positioned update/delete, this method is a noop.

Note: By definition, positioned update/delete execution must be done by a different Statement than the one which generated the ResultSet being used for positioning. Also, cursor names must be unique within a Connection.

Specified by:
  `setCursorName` in interface `java.sql.Statement`
Parameters:
  `name` - the new cursor name.
Throws:
  `java.sql.SQLException`

#### execute

    public boolean execute(java.lang.String sql)
                    throws java.sql.SQLException

Execute a SQL statement that may return multiple results. Under some (uncommon) situations a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this, unless you're executing a stored procedure that you know may return multiple results, or unless you're dynamically executing an unknown SQL string. The "execute", "getMoreResults", "getResultSet" and "getUpdateCount" methods let you navigate through multiple results. The "execute" method executes a SQL statement and indicates the form of the first result. You can then use getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s). We don't ever return update count for this call. If you want an update count, then use executeUpdate.

Specified by:
  `execute` in interface `java.sql.Statement`
Parameters:
  `sql` - any SQL statement
Returns:
  true if the first result is a ResultSet; false if it is an integer
Throws:
  `java.sql.SQLException`
See Also:
  `getResultSet()`, `getUpdateCount()`, `getMoreResults()`

#### execute

    public boolean execute(java.lang.String sql,
                           int autoGeneratedKeys)
                    throws java.sql.SQLException

Specified by:
  `execute` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### execute

    public boolean execute(java.lang.String sql,
                           int[] columnIndexes)
                    throws java.sql.SQLException

Specified by:
  `execute` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### execute

    public boolean execute(java.lang.String sql,
                           java.lang.String[] columnNames)
                    throws java.sql.SQLException

Specified by:
  `execute` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### getResultSet

    public java.sql.ResultSet getResultSet()
                                    throws java.sql.SQLException

getResultSet returns the current result as a ResultSet. It should only be called once per result.

Specified by:
  `getResultSet` in interface `java.sql.Statement`
Returns:
  the current result as a ResultSet; null if the result is an update count or there are no more results.
Throws:
  `java.sql.SQLException`
See Also:
  `execute(java.lang.String)`

#### getUpdateCount

    public int getUpdateCount()
                       throws java.sql.SQLException

getUpdateCount returns the current result, which should be an integer value. It should only be called once per result.

The only way to tell for sure that the result is an update count is to first test to see if it is a ResultSet. If it is not a ResultSet it is an update count.

Specified by:
  `getUpdateCount` in interface `java.sql.Statement`
Returns:
  the current result as an update count; -1 if it is a ResultSet or there are no more results.
Throws:
  `java.sql.SQLException`

#### getMoreResults

    public boolean getMoreResults()
                           throws java.sql.SQLException

getMoreResults moves to a Statement's next result. It returns true if this result is a ResultSet. getMoreResults also implicitly closes any current ResultSet obtained with getResultSet.

Specified by:
  `getMoreResults` in interface `java.sql.Statement`
Returns:
  true if the next result is a ResultSet; false if it is an integer Informix is not support multiple Result, therefore, it is always return false.
Throws:
  `java.sql.SQLException`
See Also:
  `execute(java.lang.String)`

#### getCursorName

    public java.lang.String getCursorName()
                                   throws java.sql.SQLException

Get the cursor name for the statement

Returns:
  the cursor name generated by the statement
Throws:
  `java.sql.SQLException`

#### getConnection

    public IfxConnection getConnection()
                                throws java.sql.SQLException

Get the IfxConnection object reference from this staement.

Specified by:
  `getConnection` in interface `java.sql.Statement`
Returns:
  the IfxConnection object reference
Throws:
  `java.sql.SQLException`

#### executeQueryImpl

    protected java.sql.ResultSet executeQueryImpl(boolean withHold,
                                                  boolean withReOptimzation)
                                           throws java.sql.SQLException

Execute a SQL statement that returns a single ResultSet. This function is the protected function that would be called by IfxStatement or IfxPreparedStatement classes.

Parameters:
  `withHold` - use Cursor With Hold or not
Returns:
  the table of data produced by the SQL statement
Throws:
  `java.sql.SQLException`

#### executeImpl

    protected boolean executeImpl()
                           throws java.sql.SQLException

Execute a SQL statement. This function is the protected function that would be called by IfxStatement or IfxPreparedStatement classes.

Returns:
  the table of data produced by the SQL statement
Throws:
  `java.sql.SQLException`

#### getSerial

    public int getSerial()
                  throws java.sql.SQLException

Informix extension which returns the serial value of the last row inserted.

Specified by:
  `getSerial` in interface `IfmxStatement`
Returns:
  The serial value of the last row inserted. If no rows were inserted, returns 0.
Throws:
  `java.sql.SQLException`

#### getSerial8

    public long getSerial8()
                    throws java.sql.SQLException

Informix extension which returns the serial8 value of the last row inserted.

Specified by:
  `getSerial8` in interface `IfmxStatement`
Returns:
  The serial8 value of the last row inserted. If no rows were inserted, returns 0.
Throws:
  `java.sql.SQLException`

#### setFetchDirection

    public void setFetchDirection(int direction)
                           throws java.sql.SQLException

JDBC 2.0 Give a hint as to the direction in which the rows in a result set will be processed. The hint applies only to result sets created using this Statement object. The default value is ResultSet.FETCH_FORWARD.

Specified by:
  `setFetchDirection` in interface `java.sql.Statement`
Parameters:
  `direction` - the initial direction for processing rows
Throws:
  `java.sql.SQLException` - if a database-access error occurs or direction is not one of ResultSet.FETCH_FORWARD, ResultSet.FETCH_REVERSE, or ResultSet.FETCH_UNKNOWN

#### getFetchDirection

    public int getFetchDirection()
                          throws java.sql.SQLException

JDBC 2.0 Determine the fetch direction.

Specified by:
  `getFetchDirection` in interface `java.sql.Statement`
Returns:
  the default fetch direction
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### setFetchSize

    public void setFetchSize(int rows)
                      throws java.sql.SQLException

JDBC 2.0 Give the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed. The number of rows specified only affects result sets created using this statement. If the value specified is zero, then the hint is ignored. The default value is zero.

Specified by:
  `setFetchSize` in interface `java.sql.Statement`
Parameters:
  `rows` - the number of rows to fetch
Throws:
  `java.sql.SQLException` - if a database-access error occurs, or the condition 0 <= rows <= this.getMaxRows() is not satisfied.

#### getFetchSize

    public int getFetchSize()
                     throws java.sql.SQLException

JDBC 2.0 Determine the default fetch size.

Specified by:
  `getFetchSize` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### getResultSetConcurrency

    public int getResultSetConcurrency()
                                throws java.sql.SQLException

JDBC 2.0 Determine the result set concurrency.

Specified by:
  `getResultSetConcurrency` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### getResultSetType

    public int getResultSetType()
                         throws java.sql.SQLException

JDBC 2.0 Determine the result set type.

Specified by:
  `getResultSetType` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### addBatch

    public void addBatch(java.lang.String sql)
                  throws java.sql.SQLException

JDBC 2.0 Adds a SQL command to the current batch of commmands for the statement.

Specified by:
  `addBatch` in interface `java.sql.Statement`
Parameters:
  `sql` - typically this is a static SQL INSERT or UPDATE statement
Throws:
  `java.sql.SQLException` - if a database-access error occurs, or the driver does not support batch statements

#### clearBatch

    public void clearBatch()
                    throws java.sql.SQLException

JDBC 2.0 Make the set of commands in the current batch empty. This method is optional.

Specified by:
  `clearBatch` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException` - if a database-access error occurs, or the driver does not support batch statements

#### scrubBatch

    protected void scrubBatch()
                       throws java.sql.SQLException

clears members set while batch update was in progress

Throws:
  `java.sql.SQLException`

#### executeBatch

    public int[] executeBatch()
                       throws java.sql.SQLException

JDBC 2.0 Submit a batch of commands to the database for execution. For Informix servers, we only return the update count of the first statement executed in the batch and hence the integer array will only have 1 entry for us.

Specified by:
  `executeBatch` in interface `java.sql.Statement`
Returns:
  an array of update counts containing one element for each command in the batch. The array is ordered according to the order in which commands were inserted into the batch
Throws:
  `java.sql.SQLException` - if a database-access error occurs, or the driver does not support batch statements

#### setResultSetType

    protected void setResultSetType(int resultSetType)
                             throws java.sql.SQLException

Check to see if the ResultSet Type is supported and either set it or return an Exception.

Throws:
  `java.sql.SQLException`

#### setResultSetConcurrency

    protected void setResultSetConcurrency(int resultSetConcurrencyType)
                                    throws java.sql.SQLException

Check to see if the Concurrency Type is supported and either set it or return an Exception.

Throws:
  `java.sql.SQLException`

#### setAutoFree

    public void setAutoFree(boolean flag)

Sets the autoFree flag if the server supports it.

Specified by:
  `setAutoFree` in interface `IfmxStatement`
Parameters:
  `flag` - Indicates whether the autofree property is true (set) or false.

#### getAutoFree

    public boolean getAutoFree()

Returns the autoFree flag

Specified by:
  `getAutoFree` in interface `IfmxStatement`
Returns:
  the autofree value of this statement: true (set) or false.

#### setStatementType

    protected void setStatementType(int stype)

#### getStatementType

    public int getStatementType()

Description copied from interface: `IfmxStatement`
An Informix extention to return the statement type returned by preparing the SQL statement. The number returned by this method can be deciphered by looking into the IfxStatementTypes.java file that is now exported to the user.

Specified by:
  `getStatementType` in interface `IfmxStatement`
Returns:
  the statement type id

#### getMoreResults

    public boolean getMoreResults(int current)
                           throws java.sql.SQLException

Specified by:
  `getMoreResults` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### getResultSetHoldability

    public int getResultSetHoldability()
                                throws java.sql.SQLException

Specified by:
  `getResultSetHoldability` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### chkAndSetGetRsltCalledFlag

    protected void chkAndSetGetRsltCalledFlag()
                                       throws java.sql.SQLException

check to see if calledgetResultSet is already set , throw exception if its already set . else set calledgetResultSet flag to true

Throws:
  `java.sql.SQLException`

#### resetMethodCalledFlags

    protected void resetMethodCalledFlags()

Methods such as getResultSet() and getUpdateCount() may be called only once for a particular resultset. We use flags to keep track of weather any of these methods have already been called or not We need to reset these flags when re-executing statement , so that getResultSet() and getUpdateCount() may be called again

#### getBigSerial

    public long getBigSerial()
                      throws java.sql.SQLException

Informix extension which returns the bigserial value of the last row inserted.

Specified by:
  `getBigSerial` in interface `IfmxStatement`
Returns:
  The bigserial value of the last row inserted. If no rows were inserted, returns 0.
Throws:
  `java.sql.SQLException`

#### isClosed

    public boolean isClosed()
                     throws java.sql.SQLException

Specified by:
  `isClosed` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### isPoolable

    public boolean isPoolable()
                       throws java.sql.SQLException

Specified by:
  `isPoolable` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### setPoolable

    public void setPoolable(boolean poolable)
                     throws java.sql.SQLException

Specified by:
  `setPoolable` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### isWrapperFor

    public boolean isWrapperFor(java.lang.Class<?> iface)
                         throws java.sql.SQLException

Specified by:
  `isWrapperFor` in interface `java.sql.Wrapper`
Throws:
  `java.sql.SQLException`

#### unwrap

    public <T> T unwrap(java.lang.Class<T> iface)
                 throws java.sql.SQLException

Specified by:
  `unwrap` in interface `java.sql.Wrapper`
Throws:
  `java.sql.SQLException`

#### setFetchBufferSize

    public void setFetchBufferSize(int bufferSize)

Description copied from interface: `IfmxStatement`
An Informix extension that sets the buffer size for this Statement object for fetch operation This value will override any FET_BUF_SIZE connection level property and is useful when OPTOFC property is set Server will use this value as hint to determin the maximum buffer size to send the data to the clients.

Specified by:
  `setFetchBufferSize` in interface `IfmxStatement`
Parameters:
  `bufferSize` - : number of bytes not exceeding 2GB

#### getFetchBufferSize

    public int getFetchBufferSize()

Description copied from interface: `IfmxStatement`
returns the fetch buffer size if set for this statement object

Specified by:
  `getFetchBufferSize` in interface `IfmxStatement`
Returns:

#### closeOnCompletion

    public void closeOnCompletion()
                           throws java.sql.SQLException

Specified by:
  `closeOnCompletion` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`

#### isCloseOnCompletion

    public boolean isCloseOnCompletion()
                                throws java.sql.SQLException

Specified by:
  `isCloseOnCompletion` in interface `java.sql.Statement`
Throws:
  `java.sql.SQLException`