| java.lang.Object org.apache.derby.client.am.Statement
All known Subclasses: org.apache.derby.client.am.PreparedStatement, org.apache.derby.client.am.Statement40,
Method Summary | |
public void | accumulateWarning(SqlWarning e) | public void | addBatch(String sql) | String | cacheCursorAttributesToSendOnPrepare() | public void | cancel() | void | checkAutoGeneratedKeysParameters() | void | checkForAppropriateSqlMode(int executeType, int sqlMode) | void | checkForClosedStatement() | protected void | checkForDuplicateCursorName() | void | checkForInvalidBatchedSql(String sql) | final protected void | checkForStoredProcResultSetCount(int executeType) Checks that a stored procedure returns the correct number of
result sets given its execute type. | public void | clearBatch() | public void | clearWarnings() | public void | clearWarningsX() | public void | close() | public void | closeX() An untraced version of close . | public void | completeExecute(Sqlca sqlca) | public void | completeExecuteCall(Sqlca sqlca, Cursor singletonParams, ResultSet[] resultSets) | public void | completeExecuteCall(Sqlca sqlca, Cursor singletonParams) | public void | completeExecuteCallOpenQuery(Sqlca sqlca, ResultSet resultSet, ColumnMetaData resultSetMetaData, Section generatedSection) | public void | completeExecuteImmediate(Sqlca sqlca) | public void | completeExecuteSetStatement(Sqlca sqlca) | public void | completeLocalCommit(java.util.Iterator listenerIterator) | public void | completeLocalRollback(java.util.Iterator listenerIterator) | public void | completeOpenQuery(Sqlca sqlca, ResultSet resultSet) | public void | completePrepare(Sqlca sqlca) | public void | completePrepareDescribeOutput(ColumnMetaData resultSetMetaData, Sqlca sqlca) | public int | completeSqlca(Sqlca sqlca) | protected String | constructSelectFromInsertSQL(String sql) | String | escape(String sql) | public boolean | execute(String sql) | public boolean | execute(String sql, int autoGeneratedKeys) | public boolean | execute(String sql, int columnIndexes) | public boolean | execute(String sql, String columnNames) | public int[] | executeBatch() | public java.sql.ResultSet | executeQuery(String sql) | public int | executeUpdate(String sql) | public int | executeUpdate(String sql, int autoGeneratedKeys) | public int | executeUpdate(String sql, int columnIndexes) | public int | executeUpdate(String sql, String columnNames) | boolean | executeX(String sql) | String[] | extractCursorNameFromWhereCurrentOf(String sql) | protected void | finalize() | void | flowExecuteBatch(int[] updateCounts) | public java.sql.Connection | getConnection() | public ConnectionCallbackInterface | getConnectionCallbackInterface() | public int | getFetchDirection() | public int | getFetchSize() | public java.sql.ResultSet | getGeneratedKeys() | public ColumnMetaData | getGuessedResultSetMetaData() | protected String | getJdbcStatementInterfaceName() Returns the name of the java.sql interface implemented by this class. | public int | getMaxFieldSize() | public int | getMaxRows() | public boolean | getMoreResults() | public boolean | getMoreResults(int current) | void | getPreparedStatementForAutoGeneratedKeys() | String | getProcedureName(String sql) | public int | getQueryTimeout() | public java.sql.ResultSet | getResultSet() | public int | getResultSetConcurrency() | public int | getResultSetHoldability() | public int | getResultSetType() | protected SqlWarning | getSqlWarnings() | public int | getUpdateCount() | public java.sql.SQLWarning | getWarnings() | protected void | initResetPreparedStatement() | public boolean | isClosed() Tell whether the statement has been closed or not.
true if closed, false otherwise. exception: SQLException - if a database access error occurs (according tospec). | public boolean | isPoolable() Returns the value of the poolable hint, indicating whether
pooling is requested. | public boolean | isQueryMode() | public boolean | isWrapperFor(Class iface) Returns false unless iface is implemented
Parameters: iface - a Class defining an interface. | protected SQLException | jdbc3FeatureNotSupported(boolean checkStatement) | protected SQLException | jdbc3FeatureNotSupported() | public void | listenToUnitOfWork() | void | mapCursorNameToResultSet() | public void | markAutoCommitted() Mark all ResultSets associated with this statement as auto-committed. | void | markClosed() This method cleans up client-side resources held by this Statement. | void | markClosed(boolean removeListener) This method cleans up client-side resources held by this Statement. | void | markClosedOnServer() | void | markPreparedStatementForAutoGeneratedKeysClosed() | void | markResultSetsClosed() Mark all ResultSets associated with this statement as
closed. | void | markResultSetsClosed(boolean removeListener) Mark all ResultSets associated with this statement as
closed. | void | parseSqlAndSetSqlModes(String sql) | void | parseStorProcReturnedScrollableRowset() | void | prepareAutoGeneratedKeysStatement() | final void | readClose(boolean allowAutoCommits) | void | readCloseResultSets(boolean allowAutoCommits) | void | readCloseResultSets(int number, boolean allowAutoCommits) | public void | readExecuteCall() | public void | readExecuteImmediate() | public void | readExecuteImmediateForBatch(String sql) | public void | readOpenQuery() | public void | readPrepare() | void | readPrepareAutoGeneratedKeysStatement() | public void | readPrepareDescribeOutput() | public void | readSetSpecialRegister() | protected void | removeClientCursorNameFromCache() | public void | reset(boolean fullReset) | void | resetCursorNameAndRemoveFromWhereCurrentOfMappings() | public void | resetStatement(Agent agent, Connection connection) | public void | resetStatement(Agent agent, Connection connection, int type, int concurrency, int holdability, int autoGeneratedKeys, String[] columnNames) | public void | resultSetCommitting(ResultSet closingRS) | public boolean | resultSetCommitting(ResultSet closingRS, boolean writeChain) Method that checks to see if any other ResultSets are open. | public void | setCursorName(String name) | public void | setEscapeProcessing(boolean enable) | public void | setFetchDirection(int direction) | public void | setFetchSize(int rows) | public void | setMaxFieldSize(int max) | public void | setMaxRows(int maxRows) | public void | setPoolable(boolean poolable) Requests that a Statement be pooled or not. | public void | setQueryTimeout(int seconds) | public void | setUpdateCount(int updateCount) | protected void | setupCursorNameCacheAndMappings() | protected String | substituteClientCursorNameWithServerCursorName(String sql, Section section) | public static String | upperCaseProcedureName(String procedureName) | final void | writeClose(boolean allowAutoCommits) | boolean | writeCloseResultSets(boolean allowAutoCommits) | boolean | writeCloseResultSets(int number, boolean allowAutoCommits) | public void | writeExecuteCall(boolean outputExpected, String procedureName, Section section, int fetchSize, boolean suppressResultSets, int resultSetType, ColumnMetaData parameterMetaData, Object[] inputs) | public void | writeExecuteImmediate(String sql, Section section) | public void | writeOpenQuery(Section section, int fetchSize, int resultSetType) | public void | writePrepare(String sql, Section section) | public void | writePrepareDescribeOutput(String sql, Section section) | public void | writeSetSpecialRegister(java.util.ArrayList sqlsttList) |
CLOSE_ALL_RESULTS | final public static int CLOSE_ALL_RESULTS(Code) | | |
CLOSE_CURRENT_RESULT | final public static int CLOSE_CURRENT_RESULT(Code) | | |
KEEP_CURRENT_RESULT | final public static int KEEP_CURRENT_RESULT(Code) | | |
TIMEOUT_STATEMENT | final protected static String TIMEOUT_STATEMENT(Code) | | |
autoGeneratedKeys_ | public int autoGeneratedKeys_(Code) | | |
cachedSingletonRowData_ | public Cursor cachedSingletonRowData_(Code) | | |
cursorAttributesToSendOnPrepare_ | public String cursorAttributesToSendOnPrepare_(Code) | | |
doWriteTimeout | protected boolean doWriteTimeout(Code) | | |
escapedProcedureCallWithResult_ | boolean escapedProcedureCallWithResult_(Code) | | |
executeMethod__ | final static int executeMethod__(Code) | | |
executeQueryMethod__ | final static int executeQueryMethod__(Code) | | |
executeUpdateMethod__ | final static int executeUpdateMethod__(Code) | | |
fetchDirection_ | public int fetchDirection_(Code) | | |
fetchSize_ | public int fetchSize_(Code) | | |
generatedKeysColumnNames_ | public String[] generatedKeysColumnNames_(Code) | | |
indexOfCurrentResultSet_ | protected int indexOfCurrentResultSet_(Code) | | |
isAutoCommittableStatement_ | public boolean isAutoCommittableStatement_(Code) | | |
isCall__ | final static int isCall__(Code) | | |
isCallableStatement_ | public boolean isCallableStatement_(Code) | | |
isCatalogQuery_ | boolean isCatalogQuery_(Code) | | |
isCommitSql__ | final public static int isCommitSql__(Code) | | |
isDeleteSql__ | final static int isDeleteSql__(Code) | | |
isInsertSql__ | final static int isInsertSql__(Code) | | |
isPoolable | protected boolean isPoolable(Code) | | |
isPositionedUpdateDeleteSql__ | final static int isPositionedUpdateDeleteSql__(Code) | | |
isPreparedStatement_ | public boolean isPreparedStatement_(Code) | | |
isQuery__ | final static int isQuery__(Code) | | |
isRollbackSql__ | final public static int isRollbackSql__(Code) | | |
isUpdateSql__ | final static int isUpdateSql__(Code) | | |
isUpdate__ | final static int isUpdate__(Code) | | |
maxFieldSize_ | int maxFieldSize_(Code) | | |
numInvisibleRS_ | public int numInvisibleRS_(Code) | | |
openOnClient_ | boolean openOnClient_(Code) | | |
openOnServer_ | boolean openOnServer_(Code) | | |
resultSetConcurrency_ | public int resultSetConcurrency_(Code) | | |
resultSetHoldability_ | public int resultSetHoldability_(Code) | | |
resultSetType_ | public int resultSetType_(Code) | | |
returnValueFromProcedure_ | int returnValueFromProcedure_(Code) | | |
sqlMode_ | protected int sqlMode_(Code) | | |
sqlUpdateMode_ | public int sqlUpdateMode_(Code) | | |
updateCount_ | int updateCount_(Code) | | |
addBatch | public void addBatch(String sql) throws SQLException(Code) | | |
cancel | public void cancel() throws SQLException(Code) | | |
checkAutoGeneratedKeysParameters | void checkAutoGeneratedKeysParameters() throws SqlException(Code) | | |
checkForAppropriateSqlMode | void checkForAppropriateSqlMode(int executeType, int sqlMode) throws SqlException(Code) | | |
checkForDuplicateCursorName | protected void checkForDuplicateCursorName() throws SqlException(Code) | | |
checkForStoredProcResultSetCount | final protected void checkForStoredProcResultSetCount(int executeType) throws SqlException(Code) | | Checks that a stored procedure returns the correct number of
result sets given its execute type. If the number is incorrect,
make sure the transaction is rolled back when auto commit is
enabled.
Parameters: executeType - one of executeQueryMethod__ ,executeUpdateMethod__ and executeMethod__ exception: SqlException - if the number of result sets does notmatch the execute type See Also: Statement.checkResultSetCount(int) |
clearBatch | public void clearBatch() throws SQLException(Code) | | |
clearWarnings | public void clearWarnings() throws SQLException(Code) | | |
clearWarningsX | public void clearWarningsX()(Code) | | |
close | public void close() throws SQLException(Code) | | |
closeX | public void closeX() throws SqlException(Code) | | An untraced version of close . This method cleans up
client-side resources and also sends commands to network server to
perform clean up. This should not be called in the finalizer.
Difference between finalize and close is
that close method does these things additionally (Changes done as
part of DERBY-210):
1) Sends commands to the server to close the result sets.
2) Sends commands to the server to close the result sets of the
generated keys query.
3) Sends a commit if autocommit is on and it is appropriate.
4) Explicitly removes the statement from connection_.openStatements_
and CommitAndRollbackListeners_ by passing true to markClosed.
We may need to do 1) in finalizer too. This is being tracked in
DERBY-1021
throws: SqlException - |
completeExecute | public void completeExecute(Sqlca sqlca)(Code) | | |
completeExecuteCall | public void completeExecuteCall(Sqlca sqlca, Cursor singletonParams)(Code) | | |
completeExecuteImmediate | public void completeExecuteImmediate(Sqlca sqlca)(Code) | | |
completeExecuteSetStatement | public void completeExecuteSetStatement(Sqlca sqlca)(Code) | | |
completePrepare | public void completePrepare(Sqlca sqlca)(Code) | | |
completeSqlca | public int completeSqlca(Sqlca sqlca)(Code) | | |
constructSelectFromInsertSQL | protected String constructSelectFromInsertSQL(String sql)(Code) | | |
execute | public boolean execute(String sql) throws SQLException(Code) | | |
execute | public boolean execute(String sql, int autoGeneratedKeys) throws SQLException(Code) | | |
execute | public boolean execute(String sql, int columnIndexes) throws SQLException(Code) | | |
executeUpdate | public int executeUpdate(String sql) throws SQLException(Code) | | |
executeUpdate | public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException(Code) | | |
executeUpdate | public int executeUpdate(String sql, int columnIndexes) throws SQLException(Code) | | |
executeUpdate | public int executeUpdate(String sql, String columnNames) throws SQLException(Code) | | |
extractCursorNameFromWhereCurrentOf | String[] extractCursorNameFromWhereCurrentOf(String sql)(Code) | | |
getFetchDirection | public int getFetchDirection() throws SQLException(Code) | | |
getFetchSize | public int getFetchSize() throws SQLException(Code) | | |
getJdbcStatementInterfaceName | protected String getJdbcStatementInterfaceName()(Code) | | Returns the name of the java.sql interface implemented by this class.
name of java.sql interface |
getMaxFieldSize | public int getMaxFieldSize() throws SQLException(Code) | | |
getMaxRows | public int getMaxRows() throws SQLException(Code) | | |
getMoreResults | public boolean getMoreResults() throws SQLException(Code) | | |
getMoreResults | public boolean getMoreResults(int current) throws SQLException(Code) | | |
getPreparedStatementForAutoGeneratedKeys | void getPreparedStatementForAutoGeneratedKeys() throws SqlException(Code) | | |
getQueryTimeout | public int getQueryTimeout() throws SQLException(Code) | | |
getResultSetConcurrency | public int getResultSetConcurrency() throws SQLException(Code) | | |
getResultSetHoldability | public int getResultSetHoldability() throws SQLException(Code) | | |
getResultSetType | public int getResultSetType() throws SQLException(Code) | | |
getUpdateCount | public int getUpdateCount() throws SQLException(Code) | | |
initResetPreparedStatement | protected void initResetPreparedStatement()(Code) | | |
isClosed | public boolean isClosed() throws SQLException(Code) | | Tell whether the statement has been closed or not.
true if closed, false otherwise. exception: SQLException - if a database access error occurs (according tospec). Never thrown by this implementation. |
isPoolable | public boolean isPoolable() throws SQLException(Code) | | Returns the value of the poolable hint, indicating whether
pooling is requested.
The value of the poolable hint. throws: SQLException - if the Statement has been closed. |
isQueryMode | public boolean isQueryMode()(Code) | | |
isWrapperFor | public boolean isWrapperFor(Class iface) throws SQLException(Code) | | Returns false unless iface is implemented
Parameters: iface - a Class defining an interface. true if this implements the interface or directly or indirectly wraps an object that does. throws: java.sql.SQLException - if an error occurs while determining whether this is a wrapper for an object with the given interface. |
jdbc3FeatureNotSupported | protected SQLException jdbc3FeatureNotSupported(boolean checkStatement) throws SQLException(Code) | | |
jdbc3FeatureNotSupported | protected SQLException jdbc3FeatureNotSupported() throws SQLException(Code) | | |
listenToUnitOfWork | public void listenToUnitOfWork()(Code) | | |
mapCursorNameToResultSet | void mapCursorNameToResultSet()(Code) | | |
markAutoCommitted | public void markAutoCommitted()(Code) | | Mark all ResultSets associated with this statement as auto-committed.
|
markClosed | void markClosed()(Code) | | This method cleans up client-side resources held by this Statement.
The Statement will not be removed from the open statements list and
PreparedStatement will also not be removed from the commit and rollback
listeners list in org.apache.derby.client.am.Connection .
This method is called from:
1. finalize() - For the finaizer to be called, the Statement
should not have any references and so it should have been already
removed from the lists.
2. org.apache.derby.client.am.Connection#markStatementsClosed
This method explicitly removes the Statement from open statements list.
3. To close positioned update statements - These statements are not
added to the list of open statements.
|
markClosed | void markClosed(boolean removeListener)(Code) | | This method cleans up client-side resources held by this Statement.
If removeListener is true, the Statement is removed from open statements
list and PreparedStatement is also removed from commit and rollback
listeners list. This is called from the close methods.
Parameters: removeListener - if true the Statement will be removedfrom the open statements list and PreparedStatement will also be removedfrom commit and rollback listeners list in org.apache.derby.client.am.Connection . |
markClosedOnServer | void markClosedOnServer()(Code) | | |
markPreparedStatementForAutoGeneratedKeysClosed | void markPreparedStatementForAutoGeneratedKeysClosed()(Code) | | |
markResultSetsClosed | void markResultSetsClosed()(Code) | | Mark all ResultSets associated with this statement as
closed. The ResultSets will not be removed from the commit and
rollback listeners list in
org.apache.derby.client.am.Connection .
|
markResultSetsClosed | void markResultSetsClosed(boolean removeListener)(Code) | | Mark all ResultSets associated with this statement as
closed.
Parameters: removeListener - if true the ResultSets will be removedfrom the commit and rollback listeners list inorg.apache.derby.client.am.Connection . |
parseStorProcReturnedScrollableRowset | void parseStorProcReturnedScrollableRowset() throws SqlException(Code) | | |
prepareAutoGeneratedKeysStatement | void prepareAutoGeneratedKeysStatement() throws SqlException(Code) | | |
readCloseResultSets | void readCloseResultSets(boolean allowAutoCommits) throws SqlException(Code) | | |
readCloseResultSets | void readCloseResultSets(int number, boolean allowAutoCommits) throws SqlException(Code) | | |
readPrepareAutoGeneratedKeysStatement | void readPrepareAutoGeneratedKeysStatement() throws SqlException(Code) | | |
readPrepareDescribeOutput | public void readPrepareDescribeOutput() throws SqlException(Code) | | |
removeClientCursorNameFromCache | protected void removeClientCursorNameFromCache()(Code) | | |
resetCursorNameAndRemoveFromWhereCurrentOfMappings | void resetCursorNameAndRemoveFromWhereCurrentOfMappings()(Code) | | |
resultSetCommitting | public boolean resultSetCommitting(ResultSet closingRS, boolean writeChain) throws SqlException(Code) | | Method that checks to see if any other ResultSets are open. If not
proceeds with the autocommit.
Parameters: closingRS - The ResultSet to be closed Parameters: writeChain - A Boolean indicating whether this methodis part of a chain of write from client to Server throws: SqlException - |
setCursorName | public void setCursorName(String name) throws SQLException(Code) | | |
setEscapeProcessing | public void setEscapeProcessing(boolean enable) throws SQLException(Code) | | |
setFetchDirection | public void setFetchDirection(int direction) throws SQLException(Code) | | |
setFetchSize | public void setFetchSize(int rows) throws SQLException(Code) | | |
setMaxFieldSize | public void setMaxFieldSize(int max) throws SQLException(Code) | | |
setMaxRows | public void setMaxRows(int maxRows) throws SQLException(Code) | | |
setPoolable | public void setPoolable(boolean poolable) throws SQLException(Code) | | Requests that a Statement be pooled or not.
Parameters: poolable - requests that the Statement be pooled if true and not be pooled if false. throws: SQLException - if the Statement has been closed. |
setQueryTimeout | public void setQueryTimeout(int seconds) throws SQLException(Code) | | |
setUpdateCount | public void setUpdateCount(int updateCount)(Code) | | |
setupCursorNameCacheAndMappings | protected void setupCursorNameCacheAndMappings()(Code) | | |
writeCloseResultSets | boolean writeCloseResultSets(boolean allowAutoCommits) throws SqlException(Code) | | |
writeCloseResultSets | boolean writeCloseResultSets(int number, boolean allowAutoCommits) throws SqlException(Code) | | |
|
|