db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta Satoor" <msat...@gmail.com>
Subject When is a new StatementContext pushed?
Date Fri, 24 Mar 2006 05:44:55 GMT

I am curious if there is some rule about when does the Derby engine push a
new StatementContext? I have tried couple examples and noticed few cases
where a new StatementContext is pushed and later popped.
1)When a user gives a sql statement and if it is not in the cache, then
during the compilation phase, a StatementContext is pushed and at the end of
compilation, the StatementContext is popped. When the execution phase starts
for the statement, a new StatementContext is pushed and at the end of
execution, the StatementContext is popped.
2)When the user moves in a JDBC ResultSet with next/first/last etc, a
StatementContext is pushed and popped around the ResultSet movement code.
3)If a trigger is defined on a dml statement, trigger execution has its own

My question is when is there a need to push a new StatementContext rather
than using an existing one?


View raw message