|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.client.am.Statement
public class Statement
Field Summary | |
---|---|
(package private) Agent |
agent_
|
int |
autoGeneratedKeys_
|
(package private) java.util.ArrayList |
batch_
|
Cursor |
cachedCursor_
|
Cursor |
cachedSingletonRowData_
|
static int |
CLOSE_ALL_RESULTS
|
static int |
CLOSE_CURRENT_RESULT
|
(package private) Connection |
connection_
|
java.lang.String |
cursorAttributesToSendOnPrepare_
|
(package private) java.lang.String |
cursorName_
|
protected boolean |
doWriteTimeout
|
(package private) static int |
executeMethod__
|
(package private) static int |
executeQueryMethod__
|
(package private) static int |
executeUpdateMethod__
|
int |
fetchDirection_
|
int |
fetchSize_
|
int[] |
generatedKeysColumnIndexes_
|
java.lang.String[] |
generatedKeysColumnNames_
|
ResultSet |
generatedKeysResultSet_
|
protected int |
indexOfCurrentResultSet_
|
private static int |
INSIDE_BRACKETED_COMMENT
|
private static int |
INSIDE_SIMPLECOMMENT
|
(package private) boolean |
isAutoCommittableStatement_
|
(package private) static int |
isCall__
|
(package private) boolean |
isCatalogQuery_
|
static int |
isCommitSql__
|
(package private) static int |
isDeleteSql__
|
(package private) static int |
isInsertSql__
|
protected boolean |
isPoolable
|
(package private) static int |
isPositionedUpdateDeleteSql__
|
(package private) boolean |
isPreparedStatement_
|
(package private) static int |
isQuery__
|
static int |
isRollbackSql__
|
(package private) static int |
isUpdate__
|
(package private) static int |
isUpdateSql__
|
static int |
KEEP_CURRENT_RESULT
|
MaterialStatement |
materialStatement_
|
(package private) int |
maxFieldSize_
|
(package private) int |
maxRows_
|
int |
numInvisibleRS_
|
(package private) boolean |
openOnClient_
|
(package private) boolean |
openOnServer_
|
private static int |
OUTSIDE
State constants used by the FSM inside getStatementToken. |
private java.sql.Statement |
owner
The owner of this statement, if any. |
PreparedStatement |
preparedStatementForAutoGeneratedKeys_
|
(package private) ResultSet |
resultSet_
|
int |
resultSetConcurrency_
|
int |
resultSetHoldability_
|
(package private) ResultSet[] |
resultSetList_
|
(package private) ColumnMetaData |
resultSetMetaData_
|
int |
resultSetType_
|
(package private) int |
returnValueFromProcedure_
|
Section |
section_
|
private Section |
setSpecialRegisterSection_
This variable keeps track of a Section dediacted to writeSpecialRegister. |
Cursor |
singletonRowData_
|
protected int |
sqlMode_
|
(package private) int |
sqlUpdateMode_
|
(package private) int |
timeout_
|
protected static java.lang.String |
TIMEOUT_STATEMENT
|
protected java.util.ArrayList |
timeoutArrayList
|
(package private) int |
updateCount_
|
private SqlWarning |
warnings_
|
Fields inherited from interface java.sql.Statement |
---|
EXECUTE_FAILED, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO |
Constructor Summary | |
---|---|
private |
Statement()
|
|
Statement(Agent agent,
Connection connection)
|
|
Statement(Agent agent,
Connection connection,
int type,
int concurrency,
int holdability,
int autoGeneratedKeys,
java.lang.String[] columnNames,
int[] columnIndexes)
|
Method Summary | |
---|---|
void |
accumulateWarning(SqlWarning e)
|
void |
addBatch(java.lang.String sql)
|
(package private) java.lang.String |
cacheCursorAttributesToSendOnPrepare()
|
void |
cancel()
|
(package private) void |
checkAutoGeneratedKeysParameters()
|
(package private) void |
checkForAppropriateSqlMode(int executeType,
int sqlMode)
|
(package private) void |
checkForClosedStatement()
|
protected void |
checkForDuplicateCursorName()
|
(package private) void |
checkForInvalidBatchedSql(java.lang.String sql)
|
protected void |
checkForStoredProcResultSetCount(int executeType)
Checks that a stored procedure returns the correct number of result sets given its execute type. |
private void |
checkResultSetCount(int executeType)
Checks that the number of result sets returned by the statement is consistent with the executed type. |
void |
clearBatch()
|
void |
clearWarnings()
|
(package private) void |
clearWarningsX()
|
void |
close()
|
void |
closeX()
An untraced version of close . |
void |
completeExecute(Sqlca sqlca)
|
void |
completeExecuteCall(Sqlca sqlca,
Cursor singletonParams)
|
void |
completeExecuteCall(Sqlca sqlca,
Cursor singletonParams,
ResultSet[] resultSets)
|
void |
completeExecuteCallOpenQuery(Sqlca sqlca,
ResultSet resultSet,
ColumnMetaData resultSetMetaData,
Section generatedSection)
|
void |
completeExecuteImmediate(Sqlca sqlca)
|
void |
completeExecuteSetStatement(Sqlca sqlca)
|
void |
completeLocalCommit(java.util.Iterator listenerIterator)
|
void |
completeLocalRollback(java.util.Iterator listenerIterator)
|
void |
completeOpenQuery(Sqlca sqlca,
ResultSet resultSet)
|
void |
completePrepare(Sqlca sqlca)
|
void |
completePrepareDescribeOutput(ColumnMetaData resultSetMetaData,
Sqlca sqlca)
|
int |
completeSqlca(Sqlca sqlca)
|
(package private) java.lang.String |
escape(java.lang.String sql)
|
boolean |
execute(java.lang.String sql)
|
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()
|
private int[] |
executeBatchX()
|
java.sql.ResultSet |
executeQuery(java.lang.String sql)
|
private ResultSet |
executeQueryX(java.lang.String sql)
|
int |
executeUpdate(java.lang.String sql)
|
int |
executeUpdate(java.lang.String sql,
int autoGeneratedKeys)
|
int |
executeUpdate(java.lang.String sql,
int[] columnIndexes)
|
int |
executeUpdate(java.lang.String sql,
java.lang.String[] columnNames)
|
private int |
executeUpdateX(java.lang.String sql)
|
(package private) boolean |
executeX(java.lang.String sql)
|
(package private) java.lang.String[] |
extractCursorNameFromWhereCurrentOf(java.lang.String sql)
|
protected void |
finalize()
|
private void |
flowClose()
|
private void |
flowCloseOutsideUOW()
|
private void |
flowCloseRetrievedResultSets()
|
private void |
flowCloseRetrievedResultSetsOutsideUOW()
|
private void |
flowExecute(int executeType,
java.lang.String sql)
|
(package private) void |
flowExecuteBatch(int[] updateCounts)
|
java.sql.Connection |
getConnection()
|
ConnectionCallbackInterface |
getConnectionCallbackInterface()
|
int |
getFetchDirection()
|
int |
getFetchSize()
|
java.sql.ResultSet |
getGeneratedKeys()
|
ColumnMetaData |
getGuessedResultSetMetaData()
|
protected java.lang.String |
getJdbcStatementInterfaceName()
Returns the name of the java.sql interface implemented by this class. |
int |
getMaxFieldSize()
|
int |
getMaxRows()
|
boolean |
getMoreResults()
|
boolean |
getMoreResults(int current)
|
private boolean |
getMoreResultsX(int current)
|
(package private) java.sql.Statement |
getOwner()
Returns the owner of this statement, if any. |
(package private) void |
getPreparedStatementForAutoGeneratedKeys()
|
(package private) java.lang.String |
getProcedureName(java.lang.String sql)
|
int |
getQueryTimeout()
|
java.sql.ResultSet |
getResultSet()
|
int |
getResultSetConcurrency()
|
int |
getResultSetHoldability()
|
int |
getResultSetType()
|
protected SqlWarning |
getSqlWarnings()
|
private java.lang.String |
getStatementToken(java.lang.String sql)
Step past any initial non-significant characters and comments to find first significant SQL token so we can classify statement. |
int |
getUpdateCount()
|
java.sql.SQLWarning |
getWarnings()
|
protected void |
initResetPreparedStatement()
|
private void |
initResetStatement()
|
private void |
initStatement()
|
private void |
initStatement(Agent agent,
Connection connection)
|
private void |
initStatement(int type,
int concurrency,
int holdability,
int autoGeneratedKeys,
java.lang.String[] columnNames,
int[] columnIndexes)
|
boolean |
isClosed()
Tell whether the statement has been closed or not. |
private java.lang.String |
isolateAnyInitialIdentifier(java.lang.String sql)
Minion of getStatementToken. |
boolean |
isPoolable()
Returns the value of the poolable hint, indicating whether pooling is requested. |
boolean |
isQueryMode()
|
boolean |
isWrapperFor(java.lang.Class iface)
Returns false unless iface is implemented |
protected java.sql.SQLException |
jdbc3FeatureNotSupported()
|
protected java.sql.SQLException |
jdbc3FeatureNotSupported(boolean checkStatement)
|
void |
listenToUnitOfWork()
|
(package private) void |
mapCursorNameToResultSet()
|
void |
markAutoCommitted()
Mark all ResultSets associated with this statement as auto-committed. |
(package private) void |
markClosed()
This method cleans up client-side resources held by this Statement. |
(package private) void |
markClosed(boolean removeListener)
This method cleans up client-side resources held by this Statement. |
(package private) void |
markClosedOnServer()
|
private void |
markPrepared()
|
(package private) void |
markPreparedStatementForAutoGeneratedKeysClosed()
|
(package private) void |
markResultSetsClosed()
Mark all ResultSets associated with this statement as closed. |
(package private) void |
markResultSetsClosed(boolean removeListener)
Mark all ResultSets associated with this statement as closed. |
(package private) void |
parseSqlAndSetSqlModes(java.lang.String sql)
|
(package private) void |
parseStorProcReturnedScrollableRowset()
|
private void |
parseUpdateSql(java.lang.String firstToken)
|
(package private) void |
prepareAutoGeneratedKeysStatement()
|
(package private) void |
readClose(boolean allowAutoCommits)
|
(package private) void |
readCloseResultSets(boolean allowAutoCommits)
|
(package private) void |
readCloseResultSets(int number,
boolean allowAutoCommits)
|
void |
readExecuteCall()
|
void |
readExecuteImmediate()
|
void |
readExecuteImmediateForBatch(java.lang.String sql)
|
void |
readOpenQuery()
|
void |
readPrepare()
|
(package private) void |
readPrepareAutoGeneratedKeysStatement()
|
void |
readPrepareDescribeOutput()
|
void |
readSetSpecialRegister()
|
protected void |
removeClientCursorNameFromCache()
|
void |
reset(boolean fullReset)
|
(package private) void |
resetCursorNameAndRemoveFromWhereCurrentOfMappings()
|
(package private) void |
resetForReuse()
Resets the statement for reuse in a statement pool. |
private void |
resetStatement()
|
void |
resetStatement(Agent agent,
Connection connection)
|
void |
resetStatement(Agent agent,
Connection connection,
int type,
int concurrency,
int holdability,
int autoGeneratedKeys,
java.lang.String[] columnNames,
int[] columnIndexes)
|
private void |
resetUserControllableAttributes()
Resets attributes that can be modified by the user through the Statement interface to default values. |
void |
resultSetCommitting(ResultSet closingRS)
Convenience method for resultSetCommitting(ResultSet, boolean) |
boolean |
resultSetCommitting(ResultSet closingRS,
boolean writeChain)
Method that checks to see if any other ResultSets are open. |
void |
setCursorName(java.lang.String name)
|
void |
setEscapeProcessing(boolean enable)
|
void |
setFetchDirection(int direction)
|
void |
setFetchSize(int rows)
|
void |
setMaxFieldSize(int max)
|
void |
setMaxRows(int maxRows)
|
protected void |
setOwner(java.sql.Statement owner)
Designates the owner of this statement, typically a logical statement. |
void |
setPoolable(boolean poolable)
Requests that a Statement be pooled or not. |
void |
setQueryTimeout(int seconds)
|
protected void |
setupCursorNameCacheAndMappings()
|
void |
setUpdateCount(int updateCount)
|
protected java.lang.String |
substituteClientCursorNameWithServerCursorName(java.lang.String sql,
Section section)
|
static java.lang.String |
upperCaseProcedureName(java.lang.String procedureName)
|
private boolean |
willTickleServer(int number,
boolean allowAutoCommits)
|
(package private) void |
writeClose(boolean allowAutoCommits)
|
(package private) boolean |
writeCloseResultSets(boolean allowAutoCommits)
|
(package private) boolean |
writeCloseResultSets(int number,
boolean allowAutoCommits)
|
void |
writeExecuteCall(boolean outputExpected,
java.lang.String procedureName,
Section section,
int fetchSize,
boolean suppressResultSets,
int resultSetType,
ColumnMetaData parameterMetaData,
java.lang.Object[] inputs)
|
private Section |
writeExecuteCall(java.lang.String sql,
boolean isBatch)
|
void |
writeExecuteImmediate(java.lang.String sql,
Section section)
|
void |
writeOpenQuery(Section section,
int fetchSize,
int resultSetType)
|
void |
writePrepare(java.lang.String sql,
Section section)
|
void |
writePrepareDescribeOutput(java.lang.String sql,
Section section)
|
void |
writeSetSpecialRegister(java.util.ArrayList sqlsttList)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.sql.Wrapper |
---|
unwrap |
Field Detail |
---|
public static final int CLOSE_CURRENT_RESULT
public static final int KEEP_CURRENT_RESULT
public static final int CLOSE_ALL_RESULTS
public MaterialStatement materialStatement_
Connection connection_
public Section section_
Agent agent_
private java.sql.Statement owner
ResultSet resultSet_
int updateCount_
int returnValueFromProcedure_
static final int executeQueryMethod__
static final int executeUpdateMethod__
static final int executeMethod__
protected int sqlMode_
static final int isQuery__
static final int isCall__
static final int isUpdate__
int sqlUpdateMode_
public static final int isCommitSql__
public static final int isRollbackSql__
static final int isPositionedUpdateDeleteSql__
static final int isInsertSql__
static final int isDeleteSql__
static final int isUpdateSql__
ColumnMetaData resultSetMetaData_
public Cursor cachedCursor_
public Cursor cachedSingletonRowData_
boolean isPreparedStatement_
java.lang.String cursorName_
boolean openOnClient_
boolean openOnServer_
protected int indexOfCurrentResultSet_
ResultSet[] resultSetList_
protected static final java.lang.String TIMEOUT_STATEMENT
protected java.util.ArrayList timeoutArrayList
protected boolean doWriteTimeout
int timeout_
int maxRows_
int maxFieldSize_
boolean isAutoCommittableStatement_
boolean isCatalogQuery_
final java.util.ArrayList batch_
public int resultSetType_
public int resultSetConcurrency_
public int resultSetHoldability_
public int fetchSize_
public int fetchDirection_
public Cursor singletonRowData_
public int numInvisibleRS_
public java.lang.String cursorAttributesToSendOnPrepare_
public PreparedStatement preparedStatementForAutoGeneratedKeys_
public ResultSet generatedKeysResultSet_
public java.lang.String[] generatedKeysColumnNames_
public int[] generatedKeysColumnIndexes_
public int autoGeneratedKeys_
private SqlWarning warnings_
protected boolean isPoolable
private Section setSpecialRegisterSection_
private static final int OUTSIDE
getStatementToken(java.lang.String)
,
Constant Field Valuesprivate static final int INSIDE_SIMPLECOMMENT
private static final int INSIDE_BRACKETED_COMMENT
Constructor Detail |
---|
private Statement()
public Statement(Agent agent, Connection connection) throws SqlException
SqlException
public Statement(Agent agent, Connection connection, int type, int concurrency, int holdability, int autoGeneratedKeys, java.lang.String[] columnNames, int[] columnIndexes) throws SqlException
SqlException
Method Detail |
---|
private void resetStatement()
private void initStatement()
private void initResetStatement()
protected void initResetPreparedStatement()
private void resetUserControllableAttributes()
Statement
interface to default values.
public void reset(boolean fullReset) throws SqlException
SqlException
void resetForReuse() throws SqlException
Intended to be used only by prepared or callable statements, as
Statement
objects aren't pooled.
The following actions are taken:
SqlException
- if resetting the statement failspublic void resetStatement(Agent agent, Connection connection) throws SqlException
SqlException
private void initStatement(Agent agent, Connection connection)
public void resetStatement(Agent agent, Connection connection, int type, int concurrency, int holdability, int autoGeneratedKeys, java.lang.String[] columnNames, int[] columnIndexes) throws SqlException
SqlException
private void initStatement(int type, int concurrency, int holdability, int autoGeneratedKeys, java.lang.String[] columnNames, int[] columnIndexes) throws SqlException
SqlException
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
protected SqlWarning getSqlWarnings()
public java.sql.ResultSet executeQuery(java.lang.String sql) throws java.sql.SQLException
executeQuery
in interface java.sql.Statement
java.sql.SQLException
private ResultSet executeQueryX(java.lang.String sql) throws SqlException
SqlException
public int executeUpdate(java.lang.String sql) throws java.sql.SQLException
executeUpdate
in interface java.sql.Statement
java.sql.SQLException
private int executeUpdateX(java.lang.String sql) throws SqlException
SqlException
public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException
iface
is implemented
isWrapperFor
in interface java.sql.Wrapper
iface
- a Class defining an interface.
java.sql.SQLException
- if an error occurs while determining
whether this is a wrapper for an object
with the given interface.public boolean isClosed() throws java.sql.SQLException
isClosed
in interface java.sql.Statement
true
if closed, false
otherwise.
java.sql.SQLException
- if a database access error occurs (according to
spec). Never thrown by this implementation.public void close() throws java.sql.SQLException
close
in interface java.sql.Statement
java.sql.SQLException
public void closeX() throws SqlException
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
SqlException
public boolean isPoolable() throws java.sql.SQLException
isPoolable
in interface java.sql.Statement
java.sql.SQLException
- if the Statement has been closed.public void setPoolable(boolean poolable) throws java.sql.SQLException
setPoolable
in interface java.sql.Statement
poolable
- requests that the Statement be pooled if true
and not be pooled if false.
java.sql.SQLException
- if the Statement has been closed.public int getMaxFieldSize() throws java.sql.SQLException
getMaxFieldSize
in interface java.sql.Statement
java.sql.SQLException
public void setMaxFieldSize(int max) throws java.sql.SQLException
setMaxFieldSize
in interface java.sql.Statement
java.sql.SQLException
public int getMaxRows() throws java.sql.SQLException
getMaxRows
in interface java.sql.Statement
java.sql.SQLException
public void setMaxRows(int maxRows) throws java.sql.SQLException
setMaxRows
in interface java.sql.Statement
java.sql.SQLException
public void setEscapeProcessing(boolean enable) throws java.sql.SQLException
setEscapeProcessing
in interface java.sql.Statement
java.sql.SQLException
public int getQueryTimeout() throws java.sql.SQLException
getQueryTimeout
in interface java.sql.Statement
java.sql.SQLException
public void setQueryTimeout(int seconds) throws java.sql.SQLException
setQueryTimeout
in interface java.sql.Statement
java.sql.SQLException
public void cancel() throws java.sql.SQLException
cancel
in interface java.sql.Statement
java.sql.SQLException
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
getWarnings
in interface java.sql.Statement
java.sql.SQLException
public void clearWarnings() throws java.sql.SQLException
clearWarnings
in interface java.sql.Statement
java.sql.SQLException
final void clearWarningsX()
public void setCursorName(java.lang.String name) throws java.sql.SQLException
setCursorName
in interface java.sql.Statement
java.sql.SQLException
public boolean execute(java.lang.String sql) throws java.sql.SQLException
execute
in interface java.sql.Statement
java.sql.SQLException
boolean executeX(java.lang.String sql) throws SqlException
SqlException
public java.sql.ResultSet getResultSet() throws java.sql.SQLException
getResultSet
in interface java.sql.Statement
java.sql.SQLException
public int getUpdateCount() throws java.sql.SQLException
getUpdateCount
in interface java.sql.Statement
java.sql.SQLException
public boolean getMoreResults() throws java.sql.SQLException
getMoreResults
in interface java.sql.Statement
java.sql.SQLException
public void setFetchDirection(int direction) throws java.sql.SQLException
setFetchDirection
in interface java.sql.Statement
java.sql.SQLException
public int getFetchDirection() throws java.sql.SQLException
getFetchDirection
in interface java.sql.Statement
java.sql.SQLException
public void setFetchSize(int rows) throws java.sql.SQLException
setFetchSize
in interface java.sql.Statement
java.sql.SQLException
public int getFetchSize() throws java.sql.SQLException
getFetchSize
in interface java.sql.Statement
java.sql.SQLException
public int getResultSetConcurrency() throws java.sql.SQLException
getResultSetConcurrency
in interface java.sql.Statement
java.sql.SQLException
public int getResultSetType() throws java.sql.SQLException
getResultSetType
in interface java.sql.Statement
java.sql.SQLException
public void addBatch(java.lang.String sql) throws java.sql.SQLException
addBatch
in interface java.sql.Statement
java.sql.SQLException
public void clearBatch() throws java.sql.SQLException
clearBatch
in interface java.sql.Statement
java.sql.SQLException
public int[] executeBatch() throws java.sql.SQLException, BatchUpdateException
executeBatch
in interface java.sql.Statement
java.sql.SQLException
BatchUpdateException
private int[] executeBatchX() throws SqlException, BatchUpdateException
SqlException
BatchUpdateException
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface java.sql.Statement
java.sql.SQLException
public boolean getMoreResults(int current) throws java.sql.SQLException
getMoreResults
in interface java.sql.Statement
java.sql.SQLException
private boolean getMoreResultsX(int current) throws SqlException
SqlException
public java.sql.ResultSet getGeneratedKeys() throws java.sql.SQLException
getGeneratedKeys
in interface java.sql.Statement
java.sql.SQLException
public int executeUpdate(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
executeUpdate
in interface java.sql.Statement
java.sql.SQLException
public int executeUpdate(java.lang.String sql, int[] columnIndexes) throws java.sql.SQLException
executeUpdate
in interface java.sql.Statement
java.sql.SQLException
public int executeUpdate(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException
executeUpdate
in interface java.sql.Statement
java.sql.SQLException
public boolean execute(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
execute
in interface java.sql.Statement
java.sql.SQLException
public boolean execute(java.lang.String sql, int[] columnIndexes) throws java.sql.SQLException
execute
in interface java.sql.Statement
java.sql.SQLException
public boolean execute(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException
execute
in interface java.sql.Statement
java.sql.SQLException
public int getResultSetHoldability() throws java.sql.SQLException
getResultSetHoldability
in interface java.sql.Statement
java.sql.SQLException
public void writeSetSpecialRegister(java.util.ArrayList sqlsttList) throws SqlException
SqlException
public void readSetSpecialRegister() throws SqlException
SqlException
public void writeExecuteImmediate(java.lang.String sql, Section section) throws SqlException
SqlException
public void readExecuteImmediate() throws SqlException
SqlException
public void completeExecuteImmediate(Sqlca sqlca)
completeExecuteImmediate
in interface StatementCallbackInterface
public void readExecuteImmediateForBatch(java.lang.String sql) throws SqlException
SqlException
public void writePrepareDescribeOutput(java.lang.String sql, Section section) throws SqlException
SqlException
public void readPrepareDescribeOutput() throws SqlException
SqlException
public void completePrepareDescribeOutput(ColumnMetaData resultSetMetaData, Sqlca sqlca)
completePrepareDescribeOutput
in interface StatementCallbackInterface
public void writePrepare(java.lang.String sql, Section section) throws SqlException
SqlException
public void readPrepare() throws SqlException
SqlException
public void completePrepare(Sqlca sqlca)
completePrepare
in interface StatementCallbackInterface
public void writeOpenQuery(Section section, int fetchSize, int resultSetType) throws SqlException
SqlException
public void readOpenQuery() throws SqlException
SqlException
public void completeOpenQuery(Sqlca sqlca, ResultSet resultSet)
completeOpenQuery
in interface StatementCallbackInterface
public void completeExecuteCallOpenQuery(Sqlca sqlca, ResultSet resultSet, ColumnMetaData resultSetMetaData, Section generatedSection)
completeExecuteCallOpenQuery
in interface StatementCallbackInterface
public void writeExecuteCall(boolean outputExpected, java.lang.String procedureName, Section section, int fetchSize, boolean suppressResultSets, int resultSetType, ColumnMetaData parameterMetaData, java.lang.Object[] inputs) throws SqlException
SqlException
public void readExecuteCall() throws SqlException
SqlException
public void completeExecuteCall(Sqlca sqlca, Cursor singletonParams, ResultSet[] resultSets)
completeExecuteCall
in interface StatementCallbackInterface
public void completeExecuteCall(Sqlca sqlca, Cursor singletonParams)
completeExecuteCall
in interface StatementCallbackInterface
public void completeExecute(Sqlca sqlca)
completeExecute
in interface StatementCallbackInterface
public void setUpdateCount(int updateCount)
protected final void setOwner(java.sql.Statement owner)
owner
- the owning statement, if anyfinal java.sql.Statement getOwner()
null
if none.private boolean willTickleServer(int number, boolean allowAutoCommits) throws SqlException
SqlException
private void flowClose() throws SqlException
SqlException
private void flowCloseOutsideUOW() throws SqlException
SqlException
final void writeClose(boolean allowAutoCommits) throws SqlException
SqlException
final void readClose(boolean allowAutoCommits) throws SqlException
SqlException
final boolean writeCloseResultSets(boolean allowAutoCommits) throws SqlException
SqlException
boolean writeCloseResultSets(int number, boolean allowAutoCommits) throws SqlException
SqlException
final void readCloseResultSets(boolean allowAutoCommits) throws SqlException
SqlException
void readCloseResultSets(int number, boolean allowAutoCommits) throws SqlException
SqlException
private void flowCloseRetrievedResultSets() throws SqlException
SqlException
private void flowCloseRetrievedResultSetsOutsideUOW() throws SqlException
SqlException
public int completeSqlca(Sqlca sqlca)
completeSqlca
in interface StatementCallbackInterface
public void completeExecuteSetStatement(Sqlca sqlca)
completeExecuteSetStatement
in interface StatementCallbackInterface
void markClosedOnServer()
void markClosed()
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.
void markClosed(boolean removeListener)
removeListener
- if true the Statement will be removed
from the open statements list and PreparedStatement will also be removed
from commit and rollback listeners list in
org.apache.derby.client.am.Connection
.void markPreparedStatementForAutoGeneratedKeysClosed()
void markResultSetsClosed()
org.apache.derby.client.am.Connection
.
final void markResultSetsClosed(boolean removeListener)
removeListener
- if true the ResultSets will be removed
from the commit and rollback listeners list in
org.apache.derby.client.am.Connection
.private void flowExecute(int executeType, java.lang.String sql) throws SqlException
SqlException
void flowExecuteBatch(int[] updateCounts) throws SqlException, BatchUpdateException
SqlException
BatchUpdateException
private Section writeExecuteCall(java.lang.String sql, boolean isBatch) throws SqlException
SqlException
public void listenToUnitOfWork()
listenToUnitOfWork
in interface UnitOfWorkListener
public void completeLocalCommit(java.util.Iterator listenerIterator)
completeLocalCommit
in interface UnitOfWorkListener
public void completeLocalRollback(java.util.Iterator listenerIterator)
completeLocalRollback
in interface UnitOfWorkListener
public void accumulateWarning(SqlWarning e)
accumulateWarning
in interface StatementCallbackInterface
private void markPrepared()
protected java.lang.String getJdbcStatementInterfaceName()
void parseSqlAndSetSqlModes(java.lang.String sql) throws SqlException
SqlException
private java.lang.String isolateAnyInitialIdentifier(java.lang.String sql)
sql
- input string
getStatementToken(java.lang.String)
private java.lang.String getStatementToken(java.lang.String sql) throws SqlException
SqlException
- std exception policyprivate void parseUpdateSql(java.lang.String firstToken) throws SqlException
SqlException
java.lang.String getProcedureName(java.lang.String sql) throws SqlException
SqlException
public static java.lang.String upperCaseProcedureName(java.lang.String procedureName) throws SqlException
SqlException
final void checkForAppropriateSqlMode(int executeType, int sqlMode) throws SqlException
SqlException
private void checkResultSetCount(int executeType) throws SqlException
executeQuery()
should return exactly one result set and executeUpdate()
none. Raises an exception if the result set count does not match the
execute type.
executeType
- one of executeQueryMethod__
,
executeUpdateMethod__
and executeMethod__
SqlException
- if the number of result sets does not
match the execute typeprotected final void checkForStoredProcResultSetCount(int executeType) throws SqlException
executeType
- one of executeQueryMethod__
,
executeUpdateMethod__
and executeMethod__
SqlException
- if the number of result sets does not
match the execute typecheckResultSetCount(int)
final void checkForClosedStatement() throws SqlException
SqlException
void checkForInvalidBatchedSql(java.lang.String sql) throws SqlException
SqlException
protected void checkForDuplicateCursorName() throws SqlException
SqlException
protected void setupCursorNameCacheAndMappings()
java.lang.String[] extractCursorNameFromWhereCurrentOf(java.lang.String sql)
protected java.lang.String substituteClientCursorNameWithServerCursorName(java.lang.String sql, Section section) throws SqlException
SqlException
public ConnectionCallbackInterface getConnectionCallbackInterface()
getConnectionCallbackInterface
in interface StatementCallbackInterface
void resetCursorNameAndRemoveFromWhereCurrentOfMappings()
void mapCursorNameToResultSet()
void parseStorProcReturnedScrollableRowset() throws SqlException
SqlException
java.lang.String escape(java.lang.String sql) throws SqlException
SqlException
java.lang.String cacheCursorAttributesToSendOnPrepare() throws SqlException
SqlException
void getPreparedStatementForAutoGeneratedKeys() throws SqlException
SqlException
void prepareAutoGeneratedKeysStatement() throws SqlException
SqlException
void readPrepareAutoGeneratedKeysStatement() throws SqlException
SqlException
void checkAutoGeneratedKeysParameters() throws SqlException
SqlException
public ColumnMetaData getGuessedResultSetMetaData()
getGuessedResultSetMetaData
in interface StatementCallbackInterface
public boolean isQueryMode()
protected void removeClientCursorNameFromCache()
public void resultSetCommitting(ResultSet closingRS) throws SqlException
closingRS
- The ResultSet to be closed
SqlException
resultSetCommitting(ResultSet, boolean)
public boolean resultSetCommitting(ResultSet closingRS, boolean writeChain) throws SqlException
closingRS
- The ResultSet to be closedwriteChain
- A Boolean indicating whether this method
is part of a chain of write from client to Server
SqlException
public void markAutoCommitted()
protected java.sql.SQLException jdbc3FeatureNotSupported(boolean checkStatement) throws java.sql.SQLException
java.sql.SQLException
protected java.sql.SQLException jdbc3FeatureNotSupported() throws java.sql.SQLException
java.sql.SQLException
|
Built on Thu 2011-03-10 11:54:14+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |