Class CompilerContextImpl
- All Implemented Interfaces:
Context
,CompilerContext
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
private SchemaDescriptor
private ProviderList
private Dependent
private int
private Object
private ArrayList
<SchemaDescriptor> Saved execution time default schema, if we need to change it temporarily.private DependencyManager
private boolean
private boolean
private final LanguageConnectionContext
private final LanguageConnectionFactory
private long
private int
private int
private int
private int
private int
private DataTypeDescriptor[]
private List
<ParameterNode> private final Parser
private ArrayList
<VisitableFilter> private HashMap
<UUID, SequenceDescriptor> private int
private boolean
private int
private static final int
private boolean
private SortCostController
private final HashMap
<Long, StoreCostController> Map that contains all store cost controllers opened in this compiler context.private TypeCompilerFactory
private SQLWarning
Fields inherited from interface org.apache.derby.iapi.sql.compile.CompilerContext
AGGREGATE_RESTRICTION, CASE_OPERAND_RESTRICTION, CHECK_CONSTRAINT, COLUMN_REFERENCE_ILLEGAL, CONDITIONAL_RESTRICTION, CONTEXT_ID, CURRENT_CONNECTION_ILLEGAL, DATETIME_ILLEGAL, DEFAULT_RESTRICTION, DIAGNOSTICS_ILLEGAL, FUNCTION_CALL_ILLEGAL, GENERATION_CLAUSE_RESTRICTION, GROUP_BY_RESTRICTION, HAVING_CLAUSE_RESTRICTION, IGNORE_MISSING_CLASSES, INTERNAL_SQL_ILLEGAL, INTERNAL_SQL_LEGAL, MODIFIES_SQL_DATA_PROCEDURE_ILLEGAL, NEXT_VALUE_FOR_ILLEGAL, NON_DETERMINISTIC_ILLEGAL, ON_CLAUSE_RESTRICTION, SCHEMA_ILLEGAL, SQL_IN_ROUTINES_ILLEGAL, SQL_LEGAL, SUBQUERY_ILLEGAL, UNNAMED_PARAMETER_ILLEGAL, USER_ILLEGAL, WHERE_CLAUSE_RESTRICTION, WHERE_SCOPE
-
Constructor Summary
ConstructorsConstructorDescriptionCompilerContextImpl
(ContextManager cm, LanguageConnectionContext lcc, TypeCompilerFactory typeCompilerFactory) This constructor creates and saves the parser using the language connection factory when the context is created (when the first statement comes in, likely). -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a filter for determining which QueryTreeNodes give rise to privilege checks at run time.private void
Add a Provider to the current AuxiliaryProviderList, if one exists.void
Add a sequence descriptor to the list of referenced sequences.void
Add a column privilege to the list of used column privileges.void
addRequiredRolePriv
(String roleName, int privType) Add a required role privilege to the list privileges.void
addRequiredRoutinePriv
(AliasDescriptor routine) Add a routine execute privilege to the list of used routine privileges.void
addRequiredSchemaPriv
(String schemaName, String aid, int privType) Add a required schema privilege to the list privileges.void
Add a table or view privilege to the list of used table privileges.void
addRequiredUsagePriv
(PrivilegedSQLObject usableObject) Add a usage privilege to the list of required privileges.int
addSavedObject
(Object obj) Add an object to the pool that is created at compile time and used at execution time.void
addWarning
(SQLWarning warning) Add a compile time warning.void
beginScope
(String scopeName) Record that the compiler is entering a named scope.void
cleanupOnError
(Throwable error) Contexts will be passed errors that are caught by the outer system when they are serious enough to require corrective action.private void
private void
void
Add a dependency between two objects.void
Add a dependency for the current dependent.void
Record that the compiler is exiting a named scope.void
Mark this CompilerContext as the first on the stack, so we can avoid continually popping and pushing a CompilerContext.Return the class factory to use in this compilation.Get the compilation schema descriptor for this compilation context.Get the current auxiliary provider list from this CompilerContext.Get the cursor info stored in the context.boolean
getInUse()
Return the in use state for the compiler context.Get the JavaFactory from this CompilerContext.int
Get the current next column number (for generated column names) from this CompilerContext.int
Get the next equivalence class for equijoin clauses.int
Get the current next ResultSet number from this CompilerContext.int
Get the current next subquery number from this CompilerContext.int
Get the current next table number from this CompilerContext.int
Get the number of Results in the current statement from this CompilerContext.int
Get the number of subquerys in the current statement from this CompilerContext.int
Get the number of tables in the current statement from this CompilerContext.Get the OptimizerFactory for this contextGet the parameter list.(package private) DataTypeDescriptor[]
Get an array of type descriptors for all the ?Get the Parser from this CompilerContextint
Return the reliability requirements of this clause.boolean
Is the callable statement uses ?Object[]
Get the saved object pool (for putting into the prepared statement).int
Get the isolation level for the scans in this query.Get a SortCostController.getStoreCostController
(long conglomerateNumber) Get a StoreCostController for the given conglomerate.Get the TypeCompilerFactory from this CompilerContext.Get a unique Class name from this CompilerContext.Get the chain of compile time warnings.private void
boolean
Is this the first CompilerContext on the stack?boolean
Report whether the given sequence has been referenced already.boolean
passesPrivilegeFilters
(Visitable visitable) Return true if a QueryTreeNode passes all of the filters which determine whether the QueryTreeNode gives rise to run time privilege checks.void
Pop the default schema to use when compiling.void
void
Push a default schema to use when compiling.void
pushCurrentPrivType
(int privType) Sets the current privilege type context.void
Remove a filter for determining which QueryTreeNodes give rise to privilege checks at run time.void
Reset compiler context (as for instance, when we recycle a context for use by another compilation.void
Reset the next ResultSet number from this CompilerContext.int
scopeDepth
(String scopeName) Get the current depth for the named scope.setCompilationSchema
(SchemaDescriptor newDefault) Set the compilation schema descriptor for this compilation context.void
Set the current auxiliary provider list for this CompilerContext.void
Set the current dependent from this CompilerContext.void
setCursorInfo
(Object cursorInfo) Set paramsvoid
setInUse
(boolean inUse) Set the in use state for the compiler context.void
setParameterList
(List<ParameterNode> parameterList) Set the parameter list.void
setReliability
(int reliability) Sets which kind of query fragments are NOT allowed.void
If callable statement uses ?void
setSavedObjects
(List<Object> objs) Set the saved object pool (for putting into the prepared statement).void
setScanIsolationLevel
(int isolationLevel) Set the isolation level for the scans in this query.boolean
Return whether we are skipping USAGE privileges for user-defined typesboolean
skipTypePrivileges
(boolean skip) Set whether we should skip adding USAGE privileges for user-defined typesMethods inherited from class org.apache.derby.iapi.services.context.ContextImpl
appendErrorInfo, getContextManager, getIdName, isLastHandler, popMe, pushMe
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.derby.iapi.services.context.Context
getContextManager, getIdName, isLastHandler, popMe, pushMe
-
Field Details
-
SCOPE_CELL
private static final int SCOPE_CELL- See Also:
-
parser
-
lcc
-
lcf
-
typeCompilerFactory
-
currentDependent
-
dm
-
firstOnStack
private boolean firstOnStack -
inUse
private boolean inUse -
reliability
private int reliability -
nextColumnNumber
private int nextColumnNumber -
nextTableNumber
private int nextTableNumber -
nextSubqueryNumber
private int nextSubqueryNumber -
nextResultSetNumber
private int nextResultSetNumber -
scanIsolationLevel
private int scanIsolationLevel -
nextEquivalenceClass
private int nextEquivalenceClass -
nextClassName
private long nextClassName -
savedObjects
-
classPrefix
-
compilationSchema
-
privilegeCheckFilters
-
namedScopes
-
skippingTypePrivileges
private boolean skippingTypePrivileges -
defaultSchemaStack
Saved execution time default schema, if we need to change it temporarily. -
currentAPL
-
returnParameterFlag
private boolean returnParameterFlag -
storeCostControllers
Map that contains all store cost controllers opened in this compiler context. Conglomerate id (long) is the key. -
sortCostController
-
parameterList
-
parameterDescriptors
-
cursorInfo
-
warnings
-
privTypeStack
-
currPrivType
private int currPrivType -
requiredColumnPrivileges
-
requiredTablePrivileges
-
requiredSchemaPrivileges
-
requiredRoutinePrivileges
-
requiredUsagePrivileges
-
requiredRolePrivileges
-
referencedSequences
-
-
Constructor Details
-
CompilerContextImpl
public CompilerContextImpl(ContextManager cm, LanguageConnectionContext lcc, TypeCompilerFactory typeCompilerFactory) This constructor creates and saves the parser using the language connection factory when the context is created (when the first statement comes in, likely).
-
-
Method Details
-
cleanupOnError
Description copied from interface:Context
Contexts will be passed errors that are caught by the outer system when they are serious enough to require corrective action. They will be told what the error is, so that they can react appropriately. Most of the time, the contexts will react by either doing nothing or by removing themselves from the context manager. If there are no other references to the context, removing itself from the manager equates to freeing it.
On an exception that is session severity or greater the Context must push itself off the stack. This is to ensure that after a session has been closed there are no Contexts on the stack that potentially hold references to objects, thus delaying their garbage collection.Contexts must release all their resources before removing themselves from their context manager.
The context manager will "unwind" the contexts during cleanup in the reverse order they were placed on its global stack.
If error is an instance of StandardException then an implementation of this method may throw a new exception if and only if the new exception is an instance of StandardException that is more severe than the original error or the new exception is a not an instance of StandardException (e.g java.lang.NullPointerException).
- Specified by:
cleanupOnError
in interfaceContext
- Throws:
StandardException
- thrown by makeInvalid() call
-
resetContext
public void resetContext()Reset compiler context (as for instance, when we recycle a context for use by another compilation.- Specified by:
resetContext
in interfaceCompilerContext
-
getParser
Description copied from interface:CompilerContext
Get the Parser from this CompilerContext. *- Specified by:
getParser
in interfaceCompilerContext
- Returns:
- The parser associated with this CompilerContext
-
getOptimizerFactory
Get the OptimizerFactory for this context- Specified by:
getOptimizerFactory
in interfaceCompilerContext
- Returns:
- The OptimizerFactory for this context.
-
getNextColumnNumber
public int getNextColumnNumber()Description copied from interface:CompilerContext
Get the current next column number (for generated column names) from this CompilerContext.- Specified by:
getNextColumnNumber
in interfaceCompilerContext
- Returns:
- int The next column number for the current statement.
-
getNextTableNumber
public int getNextTableNumber()Description copied from interface:CompilerContext
Get the current next table number from this CompilerContext.- Specified by:
getNextTableNumber
in interfaceCompilerContext
- Returns:
- int The next table number for the current statement.
-
getNumTables
public int getNumTables()Description copied from interface:CompilerContext
Get the number of tables in the current statement from this CompilerContext.- Specified by:
getNumTables
in interfaceCompilerContext
- Returns:
- int The number of tables in the current statement.
-
getNextSubqueryNumber
public int getNextSubqueryNumber()Get the current next subquery number from this CompilerContext.- Specified by:
getNextSubqueryNumber
in interfaceCompilerContext
- Returns:
- int The next subquery number for the current statement.
-
getNumSubquerys
public int getNumSubquerys()Get the number of subquerys in the current statement from this CompilerContext.- Specified by:
getNumSubquerys
in interfaceCompilerContext
- Returns:
- int The number of subquerys in the current statement.
-
getNextResultSetNumber
public int getNextResultSetNumber()Description copied from interface:CompilerContext
Get the current next ResultSet number from this CompilerContext.- Specified by:
getNextResultSetNumber
in interfaceCompilerContext
- Returns:
- int The next ResultSet number for the current statement.
-
resetNextResultSetNumber
public void resetNextResultSetNumber()Description copied from interface:CompilerContext
Reset the next ResultSet number from this CompilerContext.- Specified by:
resetNextResultSetNumber
in interfaceCompilerContext
-
getNumResultSets
public int getNumResultSets()Description copied from interface:CompilerContext
Get the number of Results in the current statement from this CompilerContext.- Specified by:
getNumResultSets
in interfaceCompilerContext
- Returns:
- The number of ResultSets in the current statement.
-
getUniqueClassName
Description copied from interface:CompilerContext
Get a unique Class name from this CompilerContext. Ensures it is globally unique for this JVM.- Specified by:
getUniqueClassName
in interfaceCompilerContext
- Returns:
- String A unique-enough class name.
-
getNextEquivalenceClass
public int getNextEquivalenceClass()Get the next equivalence class for equijoin clauses.- Specified by:
getNextEquivalenceClass
in interfaceCompilerContext
- Returns:
- The next equivalence class for equijoin clauses.
-
getClassFactory
Description copied from interface:CompilerContext
Return the class factory to use in this compilation.- Specified by:
getClassFactory
in interfaceCompilerContext
-
getJavaFactory
Description copied from interface:CompilerContext
Get the JavaFactory from this CompilerContext.- Specified by:
getJavaFactory
in interfaceCompilerContext
- Returns:
- The JavaFactory associated with this CompilerContext
-
setCurrentDependent
Description copied from interface:CompilerContext
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.- Specified by:
setCurrentDependent
in interfaceCompilerContext
- Parameters:
d
- The Dependent currently being compiled.
-
getCurrentAuxiliaryProviderList
Get the current auxiliary provider list from this CompilerContext.- Specified by:
getCurrentAuxiliaryProviderList
in interfaceCompilerContext
- Returns:
- The current AuxiliaryProviderList.
-
setCurrentAuxiliaryProviderList
Set the current auxiliary provider list for this CompilerContext.- Specified by:
setCurrentAuxiliaryProviderList
in interfaceCompilerContext
- Parameters:
apl
- The new current AuxiliaryProviderList.
-
createDependency
Description copied from interface:CompilerContext
Add a dependency for the current dependent.- Specified by:
createDependency
in interfaceCompilerContext
- Parameters:
p
- The Provider of the dependency.- Throws:
StandardException
- thrown on failure.
-
createDependency
Add a dependency between two objects.- Specified by:
createDependency
in interfaceCompilerContext
- Parameters:
d
- The Dependent object.p
- The Provider of the dependency.- Throws:
StandardException
- thrown on failure.
-
addProviderToAuxiliaryList
Add a Provider to the current AuxiliaryProviderList, if one exists.- Parameters:
p
- The Provider to add.
-
addSavedObject
Description copied from interface:CompilerContext
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))
- Specified by:
addSavedObject
in interfaceCompilerContext
- Parameters:
obj
- object to add to the pool of saved objects- Returns:
- the entry # for the object
-
getSavedObjects
Description copied from interface:CompilerContext
Get the saved object pool (for putting into the prepared statement). This turns it into its storable form, an array of objects.- Specified by:
getSavedObjects
in interfaceCompilerContext
- Returns:
- the saved object pool.
-
setSavedObjects
Description copied from interface:CompilerContext
Set the saved object pool (for putting into the prepared statement).- Specified by:
setSavedObjects
in interfaceCompilerContext
- Parameters:
objs
- The new saved objects- See Also:
-
setCursorInfo
Description copied from interface:CompilerContext
Set params- Specified by:
setCursorInfo
in interfaceCompilerContext
- Parameters:
cursorInfo
- the cursor info- See Also:
-
getCursorInfo
Description copied from interface:CompilerContext
Get the cursor info stored in the context.- Specified by:
getCursorInfo
in interfaceCompilerContext
- Returns:
- the cursor info
- See Also:
-
firstOnStack
public void firstOnStack()Description copied from interface:CompilerContext
Mark this CompilerContext as the first on the stack, so we can avoid continually popping and pushing a CompilerContext.- Specified by:
firstOnStack
in interfaceCompilerContext
- See Also:
-
isFirstOnStack
public boolean isFirstOnStack()Description copied from interface:CompilerContext
Is this the first CompilerContext on the stack?- Specified by:
isFirstOnStack
in interfaceCompilerContext
- See Also:
-
setInUse
public void setInUse(boolean inUse) Set the in use state for the compiler context.- Specified by:
setInUse
in interfaceCompilerContext
- Parameters:
inUse
- The new inUse state for the compiler context.
-
getInUse
public boolean getInUse()Return the in use state for the compiler context.- Specified by:
getInUse
in interfaceCompilerContext
- Returns:
- boolean The in use state for the compiler context.
-
setReliability
public void setReliability(int reliability) 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.- Specified by:
setReliability
in interfaceCompilerContext
- Parameters:
reliability
- bitmask of types of query fragments to be forbidden see the reliability bitmasks in CompilerContext.java
-
getReliability
public int getReliability()Return the reliability requirements of this clause. See setReliability() for a definition of clause reliability.- Specified by:
getReliability
in interfaceCompilerContext
- Returns:
- a bitmask of which types of query fragments are to be forbidden
-
getStoreCostController
Description copied from interface:CompilerContext
Get a StoreCostController for the given conglomerate.- Specified by:
getStoreCostController
in interfaceCompilerContext
- Parameters:
conglomerateNumber
- The conglomerate for which to get a StoreCostController.- Returns:
- The appropriate StoreCostController.
- Throws:
StandardException
- Thrown on error- See Also:
-
closeStoreCostControllers
private void closeStoreCostControllers() -
getSortCostController
Description copied from interface:CompilerContext
Get a SortCostController.- Specified by:
getSortCostController
in interfaceCompilerContext
- Throws:
StandardException
- Thrown on error- See Also:
-
closeSortCostControllers
private void closeSortCostControllers()- Throws:
StandardException
- Thrown on error
-
getCompilationSchema
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.- Specified by:
getCompilationSchema
in interfaceCompilerContext
- Returns:
- the compilation schema descirptor
-
setCompilationSchema
Set the compilation schema descriptor for this compilation context.- Specified by:
setCompilationSchema
in interfaceCompilerContext
- Parameters:
newDefault
- the compilation schema- Returns:
- the previous compilation schema descirptor
-
pushCompilationSchema
Description copied from interface:CompilerContext
Push a default schema to use when compiling.Sometimes, we need to temporarily change the default schema, for example when recompiling a view, since the execution time default schema may differ from the required default schema when the view was defined. Another case is when compiling generated columns which reference unqualified user functions.
- Specified by:
pushCompilationSchema
in interfaceCompilerContext
- Parameters:
sd
- schema to use- See Also:
-
popCompilationSchema
public void popCompilationSchema()Description copied from interface:CompilerContext
Pop the default schema to use when compiling.- Specified by:
popCompilationSchema
in interfaceCompilerContext
- See Also:
-
setParameterList
Description copied from interface:CompilerContext
Set the parameter list.- Specified by:
setParameterList
in interfaceCompilerContext
- Parameters:
parameterList
- The parameter list.- See Also:
-
getParameterList
Description copied from interface:CompilerContext
Get the parameter list.- Specified by:
getParameterList
in interfaceCompilerContext
- Returns:
- The parameter list.
- See Also:
-
setReturnParameterFlag
public void setReturnParameterFlag()Description copied from interface:CompilerContext
If callable statement uses ? = form- Specified by:
setReturnParameterFlag
in interfaceCompilerContext
- See Also:
-
getReturnParameterFlag
public boolean getReturnParameterFlag()Description copied from interface:CompilerContext
Is the callable statement uses ? for return parameter.- Specified by:
getReturnParameterFlag
in interfaceCompilerContext
- Returns:
- true if ? = call else false
- See Also:
-
getParameterTypes
DataTypeDescriptor[] getParameterTypes()Get an array of type descriptors for all the ? parameters. -
setScanIsolationLevel
public void setScanIsolationLevel(int isolationLevel) Description copied from interface:CompilerContext
Set the isolation level for the scans in this query.- Specified by:
setScanIsolationLevel
in interfaceCompilerContext
- Parameters:
isolationLevel
- The isolation level to use.- See Also:
-
getScanIsolationLevel
public int getScanIsolationLevel()Description copied from interface:CompilerContext
Get the isolation level for the scans in this query.- Specified by:
getScanIsolationLevel
in interfaceCompilerContext
- Returns:
- The isolation level for the scans in this query.
- See Also:
-
getTypeCompilerFactory
Description copied from interface:CompilerContext
Get the TypeCompilerFactory from this CompilerContext.- Specified by:
getTypeCompilerFactory
in interfaceCompilerContext
- Returns:
- The TypeCompilerFactory associated with this CompilerContext
- See Also:
-
addWarning
Add a compile time warning.- Specified by:
addWarning
in interfaceCompilerContext
-
getWarnings
Get the chain of compile time warnings.- Specified by:
getWarnings
in interfaceCompilerContext
-
initRequiredPriv
private void initRequiredPriv() -
pushCurrentPrivType
public void pushCurrentPrivType(int privType) Sets the current privilege type context. 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.- Specified by:
pushCurrentPrivType
in interfaceCompilerContext
- Parameters:
privType
- One of the privilege types in org.apache.derby.iapi.sql.conn.Authorizer.
-
popCurrentPrivType
public void popCurrentPrivType()- Specified by:
popCurrentPrivType
in interfaceCompilerContext
-
addRequiredColumnPriv
Add a column privilege to the list of used column privileges.- Specified by:
addRequiredColumnPriv
in interfaceCompilerContext
- Parameters:
column
- The column whose privileges we're interested in.
-
addRequiredTablePriv
Add a table or view privilege to the list of used table privileges.- Specified by:
addRequiredTablePriv
in interfaceCompilerContext
- Parameters:
table
-- See Also:
-
addRequiredRoutinePriv
Add a routine execute privilege to the list of used routine privileges.- Specified by:
addRequiredRoutinePriv
in interfaceCompilerContext
- Parameters:
routine
-- See Also:
-
addRequiredUsagePriv
Description copied from interface:CompilerContext
Add a usage privilege to the list of required privileges.- Specified by:
addRequiredUsagePriv
in interfaceCompilerContext
- Parameters:
usableObject
-- See Also:
-
addRequiredSchemaPriv
Add a required schema privilege to the list privileges.- Specified by:
addRequiredSchemaPriv
in interfaceCompilerContext
- Parameters:
schemaName
- Schema name of the object that is being accessedaid
- Requested authorizationId for new schemaprivType
- CREATE_SCHEMA_PRIV, MODIFY_SCHEMA_PRIV or DROP_SCHEMA_PRIV- See Also:
-
addRequiredRolePriv
Add a required role privilege to the list privileges.- Specified by:
addRequiredRolePriv
in interfaceCompilerContext
- See Also:
-
getRequiredPermissionsList
- Specified by:
getRequiredPermissionsList
in interfaceCompilerContext
- Returns:
- The list of required privileges.
-
addReferencedSequence
Description copied from interface:CompilerContext
Add a sequence descriptor to the list of referenced sequences.- Specified by:
addReferencedSequence
in interfaceCompilerContext
-
isReferenced
Report whether the given sequence has been referenced already.- Specified by:
isReferenced
in interfaceCompilerContext
-
addPrivilegeFilter
Description copied from interface:CompilerContext
Add a filter for determining which QueryTreeNodes give rise to privilege checks at run time. The null filter (the default) says that all QueryTreeNodes potentially give rise to privilege checks.- Specified by:
addPrivilegeFilter
in interfaceCompilerContext
-
removePrivilegeFilter
Description copied from interface:CompilerContext
Remove a filter for determining which QueryTreeNodes give rise to privilege checks at run time.- Specified by:
removePrivilegeFilter
in interfaceCompilerContext
-
passesPrivilegeFilters
Description copied from interface:CompilerContext
Return true if a QueryTreeNode passes all of the filters which determine whether the QueryTreeNode gives rise to run time privilege checks.- Specified by:
passesPrivilegeFilters
in interfaceCompilerContext
- Throws:
StandardException
-
beginScope
Description copied from interface:CompilerContext
Record that the compiler is entering a named scope. Increment the depth counter for that scope.- Specified by:
beginScope
in interfaceCompilerContext
-
endScope
Description copied from interface:CompilerContext
Record that the compiler is exiting a named scope. Decrement the depth counter for that scope.- Specified by:
endScope
in interfaceCompilerContext
-
scopeDepth
Description copied from interface:CompilerContext
Get the current depth for the named scope. For instance, if we are processing a WHERE clause inside a subquery which is invoked inside an outer WHERE clause, the depth of the whereScope would be 2. Returns 0 if the compiler isn't inside any such scope.- Specified by:
scopeDepth
in interfaceCompilerContext
-
skipTypePrivileges
public boolean skipTypePrivileges(boolean skip) Set whether we should skip adding USAGE privileges for user-defined types- Specified by:
skipTypePrivileges
in interfaceCompilerContext
-
skippingTypePrivileges
public boolean skippingTypePrivileges()Return whether we are skipping USAGE privileges for user-defined types- Specified by:
skippingTypePrivileges
in interfaceCompilerContext
-