org.apache.derby.impl.sql.execute
Class CallStatementResultSet
java.lang.Object
org.apache.derby.impl.sql.execute.NoRowsResultSetImpl
org.apache.derby.impl.sql.execute.CallStatementResultSet
- All Implemented Interfaces:
- ResultSet
class CallStatementResultSet
- extends NoRowsResultSetImpl
Call a Java procedure. This calls a generated method in the
activation which sets up the parameters and then calls the
Java method that the procedure resolved to.
Valid dynamic results returned by the procedure will be closed
as inaccessible when this is closed (e.g. a CALL within a trigger).
Any code that requires the dynamic results to be accessible
(such as the JDBC Statement object executing the CALL) must
obtain the dynamic results from Activation.getDynamicResults()
and remove each ResultSet it will be handling by clearing the
reference in the object returned.
- See Also:
Activation.getDynamicResults()
Method Summary |
void |
cleanUp()
Tells the system to clean up on an error. |
void |
close()
Need to explicitly close any dynamic result sets. |
void |
open()
Just invoke the method. |
Methods inherited from class org.apache.derby.impl.sql.execute.NoRowsResultSetImpl |
checkRowPosition, clearCurrentRow, doesCommit, evaluateACheckConstraint, evaluateCheckConstraints, evaluateGenerationClauses, finish, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCurrentTimeMillis, getCursorName, getEndExecutionTimestamp, getExecuteTime, getFirstRow, getLastRow, getNextRow, getPreviousRow, getQueryPlanText, getRelativeRow, getResultDescription, getRowNumber, getSubqueryTrackingArray, getTimeSpent, getWarnings, isClosed, modifiedRowCount, returnsRows, setAfterLastRow, setBeforeFirstRow, setup |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
methodCall
private final GeneratedMethod methodCall
CallStatementResultSet
CallStatementResultSet(GeneratedMethod methodCall,
Activation a)
open
public void open()
throws StandardException
- Just invoke the method.
- Throws:
StandardException
- Standard Derby error policy
close
public void close()
throws StandardException
- Need to explicitly close any dynamic result sets.
If the dynamic results are not accessible then they
need to be destroyed (ie. closed) according the the
SQL Standard.
An execution of a CALL statement through JDBC makes the
dynamic results accessible, in this case the closing
of the dynamic result sets is handled by the JDBC
statement object (EmbedStatement) that executed the CALL.
We cannot unify the closing of dynamic result sets to
this close, as in accessible case it is called during
the Statement.execute call, thus it would close the
dynamic results before the application has a change
to use them.
With an execution of a CALL
statement as a trigger's action statement the dynamic
result sets are not accessible. In this case this close
method is called after the execution of the trigger's
action statement.
Section 4.27.5 of the TECHNICAL CORRIGENDUM 1 to the SQL 2003
Standard details what happens to dynamic result sets in detail,
the SQL 2003 foundation document is missing these details.
- Specified by:
close
in interface ResultSet
- Overrides:
close
in class NoRowsResultSetImpl
- Throws:
StandardException
- thrown on error
cleanUp
public void cleanUp()
throws StandardException
- Description copied from interface:
ResultSet
- Tells the system to clean up on an error.
- Throws:
StandardException
- Thrown on error.- See Also:
ResultSet.cleanUp()
Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.