|
|||||||||
| Home >> All >> org >> apache >> derby >> iapi >> sql >> [ conn overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.derby.iapi.sql.conn
Interface StatementContext

- All Superinterfaces:
- org.apache.derby.iapi.services.context.Context
- public interface StatementContext
- extends org.apache.derby.iapi.services.context.Context
StatementContext keeps the context for a statement.
| Method Summary | |
void |
addDependency(org.apache.derby.iapi.sql.depend.Dependency dy)
Track a Dependency within this StatementContext. |
void |
clearInUse()
Mark this context as not in use. |
void |
clearSavePoint()
Clear the save point for the current statement. |
short |
getSQLAllowed()
Get the setting of the SQL allowed state. |
java.lang.String |
getStatementText()
Return the text of the current statement. |
org.apache.derby.iapi.sql.execute.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 |
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 |
setInUse(boolean inTrigger,
boolean isAtomic,
java.lang.String stmtText,
org.apache.derby.iapi.sql.ParameterValueSet pvs)
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 |
setSubqueryResultSet(int subqueryNumber,
org.apache.derby.iapi.sql.execute.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(org.apache.derby.iapi.sql.ResultSet topResultSet,
org.apache.derby.iapi.sql.execute.NoPutResultSet[] subqueryTrackingArray)
Set the top ResultSet in the ResultSet tree for close down on an error. |
| Methods inherited from interface org.apache.derby.iapi.services.context.Context |
cleanupOnError, getContextManager, getIdName, isLastHandler, popMe, pushMe |
| Method Detail |
setInUse
public void setInUse(boolean inTrigger,
boolean isAtomic,
java.lang.String stmtText,
org.apache.derby.iapi.sql.ParameterValueSet pvs)
- Mark this context as being in use.
clearInUse
public void clearInUse()
- Mark this context as not in use. This is important because we
always leave the top statement context on the stack, and we don't
want to clean it up if a statement level exception happens while the
context is not in use.
setSavePoint
public void setSavePoint()
throws org.apache.derby.iapi.error.StandardException
- Set a save point for the current statement.
NOTE: This needs to be off of the StatementContext so that it gets
cleared on a statement error.
resetSavePoint
public void resetSavePoint()
throws org.apache.derby.iapi.error.StandardException
- If this statement context has a savepoint, then
it is reset to the current point. Otherwise, it
is a noop.
clearSavePoint
public void clearSavePoint()
throws org.apache.derby.iapi.error.StandardException
- Clear the save point for the current statement.
setTopResultSet
public void setTopResultSet(org.apache.derby.iapi.sql.ResultSet topResultSet, org.apache.derby.iapi.sql.execute.NoPutResultSet[] subqueryTrackingArray) throws org.apache.derby.iapi.error.StandardException
- Set the top ResultSet in the ResultSet tree for close down on
an error.
setSubqueryResultSet
public void setSubqueryResultSet(int subqueryNumber,
org.apache.derby.iapi.sql.execute.NoPutResultSet subqueryResultSet,
int numSubqueries)
throws org.apache.derby.iapi.error.StandardException
- Set the appropriate entry in the subquery tracking array for
the specified subquery.
Useful for closing down open subqueries on an exception.
getSubqueryTrackingArray
public org.apache.derby.iapi.sql.execute.NoPutResultSet[] getSubqueryTrackingArray() throws org.apache.derby.iapi.error.StandardException
- Get the subquery tracking array for this query.
(Useful for runtime statistics.)
addDependency
public void addDependency(org.apache.derby.iapi.sql.depend.Dependency dy) throws org.apache.derby.iapi.error.StandardException
- Track a Dependency within this StatementContext.
(We need to clear any dependencies added within this
context on an error.
onStack
public boolean onStack()
- Reports whether this StatementContext is on the context stack.
inTrigger
public boolean inTrigger()
- Returns whether we started from within the context of a trigger
or not.
isAtomic
public 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.
inUse
public boolean inUse()
- Is this statement context in use or not.
getStatementText
public java.lang.String getStatementText()
- Return the text of the current statement.
Note that this may be null. It is currently
not set up correctly for ResultSets that aren't
single row result sets (e.g SELECT)
and setXXXX/getXXXX jdbc methods.
setSQLAllowed
public void setSQLAllowed(short allow,
boolean force)
- Set the level of SQL allowed in this and subsequent
nested statements due to a routine call. Value must be one of
RoutineAliasInfo.{MODIFIES_SQL_DATA, READS_SQL_DATA, CONTAINS_SQL, NO_SQL}
getSQLAllowed
public short getSQLAllowed()
- Get the setting of the SQL allowed state.
setSystemCode
public void setSystemCode()
- Set to indicate statement is system code.
For example a system procedure, view, function etc.
getSystemCode
public boolean getSystemCode()
- Return true if this statement is system code.
setParentRollback
public 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.
|
|||||||||
| Home >> All >> org >> apache >> derby >> iapi >> sql >> [ conn overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC