public interface StatementContext extends Context
Modifier and Type | Method and Description |
---|---|
void |
addDependency(Dependency dy)
Track a Dependency within this StatementContext.
|
void |
cancel()
Indicate that the statement which has allocated this statement
context should cancel its execution.
|
void |
clearInUse()
Mark this context as not in use.
|
void |
clearSavePoint()
Clear the save point for the current statement.
|
Activation |
getActivation()
Get activation associated with this statement context, if any.
|
short |
getSQLAllowed()
Get the setting of the SQL allowed state.
|
SQLSessionContext |
getSQLSessionContext()
Get the current SQL session context.
|
java.lang.String |
getStatementText()
Return the text of the current statement.
|
boolean |
getStatementWasInvalidated()
Tells if this statement has been invalidated.
|
NoPutResultSet[] |
getSubqueryTrackingArray()
Get the subquery tracking array for this query.
|
boolean |
getSystemCode()
Return true if this statement is system code.
|
boolean |
inTrigger()
Returns whether we started from within the context of a trigger
or not.
|
boolean |
inUse()
Is this statement context in use or not.
|
boolean |
isAtomic()
Indicates whether the statement needs to be executed atomically
or not, i.e., whether a commit/rollback is permitted by a
connection nested in this statement.
|
boolean |
isCancelled()
Checks if the statement which has allocated this statement context
should cancel its execution.
|
boolean |
isForReadOnly()
Is this statement for a read only, non-updatable ResultSet
|
boolean |
onStack()
Reports whether this StatementContext is on the context stack.
|
void |
resetSavePoint()
If this statement context has a savepoint, then
it is reset to the current point.
|
void |
setActivation(Activation a)
Mark this statement context as associated with this activation.
|
void |
setInUse(boolean inTrigger,
boolean isAtomic,
boolean isForReadOnly,
java.lang.String stmtText,
ParameterValueSet pvs,
long timeoutMillis)
Mark this context as being in use.
|
void |
setParentRollback()
Indicate that, in the event of a statement-level exception,
this context is NOT the last one that needs to be rolled
back--rather, it is nested within some other statement
context, and that other context needs to be rolled back,
too.
|
void |
setSavePoint()
Set a save point for the current statement.
|
void |
setSQLAllowed(short allow,
boolean force)
Set the level of SQL allowed in this and subsequent
nested statements due to a routine call.
|
void |
setSQLSessionContext(SQLSessionContext ctx)
Set the current SQL session context
|
void |
setSubqueryResultSet(int subqueryNumber,
NoPutResultSet subqueryResultSet,
int numSubqueries)
Set the appropriate entry in the subquery tracking array for
the specified subquery.
|
void |
setSystemCode()
Set to indicate statement is system code.
|
void |
setTopResultSet(ResultSet topResultSet,
NoPutResultSet[] subqueryTrackingArray)
Set the top ResultSet in the ResultSet tree for close down on
an error.
|
cleanupOnError, getContextManager, getIdName, isLastHandler, popMe, pushMe
void setInUse(boolean inTrigger, boolean isAtomic, boolean isForReadOnly, java.lang.String stmtText, ParameterValueSet pvs, long timeoutMillis)
inTrigger
- true if the parent started in the context of a triggerisAtomic
- true if the statement must be executed
atomicallyisForReadOnly
- true if the statement is for producing non-updatable
resultsetstmtText
- the text of the statement. Needed for any language
statement (currently, for any statement that can cause a trigger
to fire). Please set this unless you are some funky jdbc setXXX
method or something.pvs
- parameter value set, if it has onetimeoutMillis
- timeout value for the statement, in milliseconds.
Zero means no timeout.void clearInUse()
void setSavePoint() throws StandardException
StandardException
- Thrown on errorvoid resetSavePoint() throws StandardException
StandardException
- Thrown on errorvoid clearSavePoint() throws StandardException
StandardException
- Thrown on errorvoid setTopResultSet(ResultSet topResultSet, NoPutResultSet[] subqueryTrackingArray) throws StandardException
topResultSet
- The top ResultSet in the ResultSet treesubqueryTrackingArray
- (Sparse) of tops of subquery ResultSet treesStandardException
- Thrown on errorvoid setSubqueryResultSet(int subqueryNumber, NoPutResultSet subqueryResultSet, int numSubqueries) throws StandardException
subqueryNumber
- The subquery # for this subquerysubqueryResultSet
- The NoPutResultSet at the top of the subquerynumSubqueries
- The total # of subqueries in the entire queryStandardException
- Thrown on errorNoPutResultSet[] getSubqueryTrackingArray() throws StandardException
StandardException
- Thrown on errorvoid addDependency(Dependency dy) throws StandardException
dy
- The dependency to track.StandardException
- Thrown on errorboolean onStack()
boolean inTrigger()
boolean isAtomic()
boolean inUse()
boolean isForReadOnly()
boolean isCancelled()
void cancel()
java.lang.String getStatementText()
void setSQLAllowed(short allow, boolean force)
force
- set to true to override more restrictive setting. Used to
reset the permissions after a function call.short getSQLAllowed()
void setSystemCode()
boolean getSystemCode()
void setParentRollback()
void setActivation(Activation a)
a
- activationActivation getActivation()
SQLSessionContext getSQLSessionContext()
void setSQLSessionContext(SQLSessionContext ctx)
ctx
- the SQL session contextboolean getStatementWasInvalidated()
true
if the statement was invalidated.Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.