public interface CompilerContext extends Context(Code)
CompilerContext stores the parser and type id factory to be used by
the compiler. Stack compiler contexts when a new, local parser is needed
(if calling the compiler recursively from within the compiler,
for example).
CompilerContext objects are private to a LanguageConnectionContext.
author: ames author: History: author: 5/22/97 Moved getExternalInterfaceFactory() to LanguageConnectionContext author: because it had to be used at execution. - Jeff
pushCurrentPrivType(int privType) Sets the current privilege type context and pushes the previous on onto a stack.
Column and table nodes do not know how they are
being used.
void
resetContext() Reset compiler context (as for instance, when we recycle a context for
use by another compilation.
Add a routine execute privilege to the list of used routine privileges.
Parameters: routine -
addRequiredSchemaPriv
public void addRequiredSchemaPriv(String schema, String aid, int privType)(Code)
Add a schema privilege to the list of used privileges.
Parameters: schema - Schema name of the object that is being accessed Parameters: aid - Requested authorizationId for new schema Parameters: privType - CREATE_SCHEMA_PRIV, MODIFY_SCHEMA_PRIV or DROP_SCHEMA_PRIV
Add an object to the pool that is created at compile time
and used at execution time. Use the integer to reference it
in execution constructs. Execution code will have to generate:
(#objectType) (this.getPreparedStatement().getSavedObject(#int))
<\pre>
Parameters: o - object to add to the pool of saved objects the entry # for the object
Add a dependency between two objects.
Parameters: d - The Dependent object. Parameters: p - The Provider of the dependency. exception: StandardException - thrown on failure.
Get the compilation schema descriptor for this compilation context.
Will be null if no default schema lookups have occured. Ie.
the statement is independent of the current schema.
the compilation schema descirptor
Return the reliability requirements of this clause. See setReliability()
for a definition of clause reliability.
a bitmask of which types of query fragments are to be forbidden
Get a StoreCostController for the given conglomerate.
Parameters: conglomerateNumber - The conglomerate for which to get aStoreCostController. The appropriate StoreCostController. exception: StandardException - Thrown on error
public void pushCurrentPrivType(int privType)(Code)
Sets the current privilege type context and pushes the previous on onto a stack.
Column and table nodes do not know how they are
being used. Higher level nodes in the query tree do not know what is being
referenced. Keeping the context allows the two to come together.
Parameters: privType - One of the privilege types in org.apache.derby.iapi.sql.conn.Authorizer.
Set the compilation schema descriptor for this compilation context.
Parameters: newDefault - compilation schema the previous compilation schema descirptor
Set the current dependent from this CompilerContext.
This should be called at the start of a compile to
register who has the dependencies needed for the compilation.
Parameters: d - The Dependent currently being compiled.
setCursorInfo
public void setCursorInfo(Object cursorInfo)(Code)
Set params
Parameters: cursorInfo - the cursor info
setEntryIsolationLevel
public void setEntryIsolationLevel(int isolationLevel)(Code)
Set the isolation level on entry to this CC so that it can be restored on exit.
Parameters: isolationLevel - The isolation level on entry.
Sets which kind of query fragments are NOT allowed. Basically,
these are fragments which return unstable results. CHECK CONSTRAINTS
and CREATE PUBLICATION want to forbid certain kinds of fragments.
Parameters: reliability - bitmask of types of query fragments to be forbiddensee the reliability bitmasks above