| Modifier and Type | Field and Description |
|---|---|
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final String | CONTEXT_ID
this is the ID we expect compiler contexts to be stored into a context manager under. |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | INTERNAL_SQL_LEGAL
Any SQL we support is legal |
| public static final int | MODIFIES_SQL_DATA_PROCEDURE_ILLEGAL
Calling procedures that modify sql data from before triggers is illegal. |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | SQL_LEGAL
Standard SQL is legal |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final String |
| Modifier and Type | Method and Description |
|---|---|
| public void | addPrivilegeFilter(VisitableFilter vf)
Add a filter for determining which QueryTreeNodes give rise to privilege checks at run time. |
| public void | addReferencedSequence(SequenceDescriptor sd)
Add a sequence descriptor to the list of referenced sequences. |
| public void | addRequiredColumnPriv(ColumnDescriptor column)
Add a column privilege to the list of used column privileges. |
| public void | addRequiredRolePriv(String roleName, int privType)
Add a required role privilege to the list of privileges. |
| public void | addRequiredRoutinePriv(AliasDescriptor routine)
Add a routine execute privilege to the list of used routine privileges. |
| public void | addRequiredSchemaPriv(String
Schema name of the object that is being accessed schema, String Requested authorizationId for new schema aid, int CREATE_SCHEMA_PRIV, MODIFY_SCHEMA_PRIV or DROP_SCHEMA_PRIV privType)Add a schema privilege to the list of used privileges. |
| public void | addRequiredTablePriv(TableDescriptor table)
Add a table or view privilege to the list of used table privileges. |
| public void | addRequiredUsagePriv(PrivilegedSQLObject usableObject)
Add a usage privilege to the list of required privileges. |
| public int | Returns: the entry # for the objectobject to add to the pool of saved objects o)Add an object to the pool that is created at compile time and used at execution time. |
| public void | |
| public void | |
| public void | createDependency(Provider
The Provider of the dependency. p)Add a dependency for the current dependent. |
| public void | createDependency(Dependent
The Dependent object. d, Provider The Provider of the dependency. p)Add a dependency between two objects. |
| public void | |
| public void | firstOnStack()
Mark this CompilerContext as the first on the stack, so we can avoid continually popping and pushing a CompilerContext. |
| public ClassFactory | |
| public SchemaDescriptor | Returns: the compilation schema descirptorGet the compilation schema descriptor for this compilation context. |
| public ProviderList | Returns: The current AuxiliaryProviderList.Get the current auxiliary provider list from this CompilerContext. |
| public Object | |
| public boolean | Returns: boolean The in use state for the compiler context.Return the in use state for the compiler context. |
| public JavaFactory | Returns: The JavaFactory associated with this CompilerContextGet the JavaFactory from this CompilerContext. |
| public int | Returns: int The next column number for the current statement.Get the current next column number (for generated column names) from this CompilerContext. |
| public int | Returns: The next equivalence class for equijoin clauses.Get the next equivalence class for equijoin clauses. |
| public int | Returns: int The next ResultSet number for the current statement.Get the current next ResultSet number from this CompilerContext. |
| public int | Returns: int The next subquery number for the current statement.Get the current next subquery number from this CompilerContext. |
| public int | Returns: int The next table number for the current statement.Get the current next table number from this CompilerContext. |
| public int | Returns: The number of ResultSets in the current statement.Get the number of Results in the current statement from this CompilerContext. |
| public int | Returns: int The number of subquerys in the current statement.Get the number of subquerys in the current statement from this CompilerContext. |
| public int | Returns: int The number of tables in the current statement.Get the number of tables in the current statement from this CompilerContext. |
| public OptimizerFactory | Returns: The OptimizerFactory associated with this CompilerContextGet the OptimizerFactory from this CompilerContext. |
| public List | |
| public Parser | Returns: The parser associated with this CompilerContextGet the Parser from this CompilerContext. |
| public int | Returns: a bitmask of which types of query fragments are to be forbiddenReturn the reliability requirements of this clause. |
| public List | |
| public boolean | |
| public Object[] | Returns: the saved object pool.Get the saved object pool (for putting into the prepared statement). |
| public int | Returns: The isolation level for the scans in this query.Get the isolation level for the scans in this query. |
| public SortCostController | |
| public StoreCostController | Returns: The appropriate StoreCostController.The conglomerate for which to get a
StoreCostController. conglomerateNumber)Get a StoreCostController for the given conglomerate. |
| public TypeCompilerFactory | Returns: The TypeCompilerFactory associated with this CompilerContextGet the TypeCompilerFactory from this CompilerContext. |
| public String | Returns: String A unique-enough class name.Get a unique Class name from this CompilerContext. |
| public SQLWarning | |
| public boolean | |
| public boolean | |
| public 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. |
| public void | |
| public void | |
| public void | |
| public void | pushCurrentPrivType(int
One of the privilege types in
org.apache.derby.iapi.sql.conn.Authorizer. privType)Sets the current privilege type context and pushes the previous on onto a stack. |
| public void | removePrivilegeFilter(VisitableFilter vf)
Remove a filter for determining which QueryTreeNodes give rise to privilege checks at run time. |
| public void | resetContext()
Reset compiler context (as for instance, when we recycle a context for use by another compilation. |
| public void | |
| public int | |
| public SchemaDescriptor | Returns: the previous compilation schema descirptorcompilation schema newDefault)Set the compilation schema descriptor for this compilation context. |
| public void | setCurrentAuxiliaryProviderList(ProviderList
The new current AuxiliaryProviderList. apl)Set the current auxiliary provider list for this CompilerContext. |
| public void | setCurrentDependent(Dependent
The Dependent currently being compiled. d)Set the current dependent from this CompilerContext. |
| public void | |
| public void | setInUse(boolean
The new inUse state for the compiler context. inUse)Set the in use state for the compiler context. |
| public void | |
| public void | setReliability(int
bitmask of types of query fragments to be forbidden
see the reliability bitmasks above reliability)Sets which kind of query fragments are NOT allowed. |
| public void | |
| public void | setSavedObjects(List<Object>
The new saved objects objs)Set the saved object pool (for putting into the prepared statement). |
| public void | setScanIsolationLevel(int
The isolation level to use. isolationLevel)Set the isolation level for the scans in this query. |
| public boolean | |
| public boolean | skipTypePrivileges(boolean skip)
Set whether we should skip adding USAGE privileges for user-defined types. |
| AGGREGATE_RESTRICTION | back to summary |
|---|---|
| public static final int AGGREGATE_RESTRICTION | |
| CASE_OPERAND_RESTRICTION | back to summary |
|---|---|
| public static final int CASE_OPERAND_RESTRICTION | |
| CHECK_CONSTRAINT | back to summary |
|---|---|
| public static final int CHECK_CONSTRAINT | |
| COLUMN_REFERENCE_ILLEGAL | back to summary |
|---|---|
| public static final int COLUMN_REFERENCE_ILLEGAL | |
| CONDITIONAL_RESTRICTION | back to summary |
|---|---|
| public static final int CONDITIONAL_RESTRICTION | |
| CONTEXT_ID | back to summary |
|---|---|
| public static final String CONTEXT_ID this is the ID we expect compiler contexts to be stored into a context manager under. | |
| CURRENT_CONNECTION_ILLEGAL | back to summary |
|---|---|
| public static final int CURRENT_CONNECTION_ILLEGAL | |
| DATETIME_ILLEGAL | back to summary |
|---|---|
| public static final int DATETIME_ILLEGAL | |
| DEFAULT_RESTRICTION | back to summary |
|---|---|
| public static final int DEFAULT_RESTRICTION | |
| DIAGNOSTICS_ILLEGAL | back to summary |
|---|---|
| public static final int DIAGNOSTICS_ILLEGAL | |
| FUNCTION_CALL_ILLEGAL | back to summary |
|---|---|
| public static final int FUNCTION_CALL_ILLEGAL | |
| GENERATION_CLAUSE_RESTRICTION | back to summary |
|---|---|
| public static final int GENERATION_CLAUSE_RESTRICTION | |
| GROUP_BY_RESTRICTION | back to summary |
|---|---|
| public static final int GROUP_BY_RESTRICTION | |
| HAVING_CLAUSE_RESTRICTION | back to summary |
|---|---|
| public static final int HAVING_CLAUSE_RESTRICTION | |
| IGNORE_MISSING_CLASSES | back to summary |
|---|---|
| public static final int IGNORE_MISSING_CLASSES | |
| INTERNAL_SQL_ILLEGAL | back to summary |
|---|---|
| public static final int INTERNAL_SQL_ILLEGAL | |
| INTERNAL_SQL_LEGAL | back to summary |
|---|---|
| public static final int INTERNAL_SQL_LEGAL Any SQL we support is legal | |
| MODIFIES_SQL_DATA_PROCEDURE_ILLEGAL | back to summary |
|---|---|
| public static final int MODIFIES_SQL_DATA_PROCEDURE_ILLEGAL Calling procedures that modify sql data from before triggers is illegal. | |
| NEXT_VALUE_FOR_ILLEGAL | back to summary |
|---|---|
| public static final int NEXT_VALUE_FOR_ILLEGAL | |
| NON_DETERMINISTIC_ILLEGAL | back to summary |
|---|---|
| public static final int NON_DETERMINISTIC_ILLEGAL | |
| ON_CLAUSE_RESTRICTION | back to summary |
|---|---|
| public static final int ON_CLAUSE_RESTRICTION | |
| SCHEMA_ILLEGAL | back to summary |
|---|---|
| public static final int SCHEMA_ILLEGAL | |
| SQL_IN_ROUTINES_ILLEGAL | back to summary |
|---|---|
| public static final int SQL_IN_ROUTINES_ILLEGAL | |
| SQL_LEGAL | back to summary |
|---|---|
| public static final int SQL_LEGAL Standard SQL is legal | |
| SUBQUERY_ILLEGAL | back to summary |
|---|---|
| public static final int SUBQUERY_ILLEGAL | |
| UNNAMED_PARAMETER_ILLEGAL | back to summary |
|---|---|
| public static final int UNNAMED_PARAMETER_ILLEGAL | |
| USER_ILLEGAL | back to summary |
|---|---|
| public static final int USER_ILLEGAL | |
| WHERE_CLAUSE_RESTRICTION | back to summary |
|---|---|
| public static final int WHERE_CLAUSE_RESTRICTION | |
| WHERE_SCOPE | back to summary |
|---|---|
| public static final String WHERE_SCOPE | |
| addPrivilegeFilter | back to summary |
|---|---|
| public void addPrivilegeFilter(VisitableFilter vf) 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. | |
| addReferencedSequence | back to summary |
|---|---|
| public void addReferencedSequence(SequenceDescriptor sd) Add a sequence descriptor to the list of referenced sequences. | |
| addRequiredColumnPriv | back to summary |
|---|---|
| public void addRequiredColumnPriv(ColumnDescriptor column) Add a column privilege to the list of used column privileges. | |
| addRequiredRolePriv | back to summary |
|---|---|
| public void addRequiredRolePriv(String roleName, int privType) Add a required role privilege to the list of privileges.
| |
| addRequiredRoutinePriv | back to summary |
|---|---|
| public void addRequiredRoutinePriv(AliasDescriptor routine) Add a routine execute privilege to the list of used routine privileges. | |
| addRequiredSchemaPriv | back to summary |
|---|---|
| public void addRequiredSchemaPriv(String schema, String aid, int privType) Add a schema privilege to the list of used privileges. | |
| addRequiredTablePriv | back to summary |
|---|---|
| public void addRequiredTablePriv(TableDescriptor table) Add a table or view privilege to the list of used table privileges. | |
| addRequiredUsagePriv | back to summary |
|---|---|
| public void addRequiredUsagePriv(PrivilegedSQLObject usableObject) Add a usage privilege to the list of required privileges. | |
| addSavedObject | back to summary |
|---|---|
| public int addSavedObject(Object o) 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))
| |
| addWarning | back to summary |
|---|---|
| public void addWarning(SQLWarning warning) Add a compile time warning. | |
| beginScope | back to summary |
|---|---|
| public void beginScope(String scopeName) Record that the compiler is entering a named scope. Increment the depth counter for that scope. | |
| createDependency | back to summary |
|---|---|
| public void createDependency(Provider p) throws StandardException Add a dependency for the current dependent.
| |
| createDependency | back to summary |
|---|---|
| public void createDependency(Dependent d, Provider p) throws StandardException Add a dependency between two objects.
| |
| endScope | back to summary |
|---|---|
| public void endScope(String scopeName) Record that the compiler is exiting a named scope. Decrement the depth counter for that scope. | |
| firstOnStack | back to summary |
|---|---|
| public void firstOnStack() Mark this CompilerContext as the first on the stack, so we can avoid continually popping and pushing a CompilerContext. | |
| getClassFactory | back to summary |
|---|---|
| public ClassFactory getClassFactory() Return the class factory to use in this compilation. | |
| getCompilationSchema | back to summary |
|---|---|
| public SchemaDescriptor 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.
| |
| getCurrentAuxiliaryProviderList | back to summary |
|---|---|
| public ProviderList getCurrentAuxiliaryProviderList() Get the current auxiliary provider list from this CompilerContext.
| |
| getCursorInfo | back to summary |
|---|---|
| public Object getCursorInfo() Get the cursor info stored in the context.
| |
| getInUse | back to summary |
|---|---|
| public boolean getInUse() Return the in use state for the compiler context.
| |
| getJavaFactory | back to summary |
|---|---|
| public JavaFactory getJavaFactory() Get the JavaFactory from this CompilerContext.
| |
| getNextColumnNumber | back to summary |
|---|---|
| public int getNextColumnNumber() Get the current next column number (for generated column names) from this CompilerContext.
| |
| getNextEquivalenceClass | back to summary |
|---|---|
| public int getNextEquivalenceClass() Get the next equivalence class for equijoin clauses.
| |
| getNextResultSetNumber | back to summary |
|---|---|
| public int getNextResultSetNumber() Get the current next ResultSet number from this CompilerContext.
| |
| getNextSubqueryNumber | back to summary |
|---|---|
| public int getNextSubqueryNumber() Get the current next subquery number from this CompilerContext.
| |
| getNextTableNumber | back to summary |
|---|---|
| public int getNextTableNumber() Get the current next table number from this CompilerContext.
| |
| getNumResultSets | back to summary |
|---|---|
| public int getNumResultSets() Get the number of Results in the current statement from this CompilerContext.
| |
| getNumSubquerys | back to summary |
|---|---|
| public int getNumSubquerys() Get the number of subquerys in the current statement from this CompilerContext.
| |
| getNumTables | back to summary |
|---|---|
| public int getNumTables() Get the number of tables in the current statement from this CompilerContext.
| |
| getOptimizerFactory | back to summary |
|---|---|
| public OptimizerFactory getOptimizerFactory() Get the OptimizerFactory from this CompilerContext.
| |
| getParameterList | back to summary |
|---|---|
| public List Get the parameter list.
| |
| getParser | back to summary |
|---|---|
| public Parser getParser() Get the Parser from this CompilerContext. *
| |
| getReliability | back to summary |
|---|---|
| public int getReliability() Return the reliability requirements of this clause. See setReliability() for a definition of clause reliability.
| |
| getRequiredPermissionsList | back to summary |
|---|---|
public List
| |
| getReturnParameterFlag | back to summary |
|---|---|
| public boolean getReturnParameterFlag() Is the callable statement uses ? for return parameter.
| |
| getSavedObjects | back to summary |
|---|---|
| public Object[] getSavedObjects() Get the saved object pool (for putting into the prepared statement). This turns it into its storable form, an array of objects.
| |
| getScanIsolationLevel | back to summary |
|---|---|
| public int getScanIsolationLevel() Get the isolation level for the scans in this query.
| |
| getSortCostController | back to summary |
|---|---|
| public SortCostController getSortCostController() throws StandardException Get a SortCostController.
| |
| getStoreCostController | back to summary |
|---|---|
| public StoreCostController getStoreCostController(long conglomerateNumber) throws StandardException Get a StoreCostController for the given conglomerate.
| |
| getTypeCompilerFactory | back to summary |
|---|---|
| public TypeCompilerFactory getTypeCompilerFactory() Get the TypeCompilerFactory from this CompilerContext.
| |
| getUniqueClassName | back to summary |
|---|---|
| public String getUniqueClassName() Get a unique Class name from this CompilerContext. Ensures it is globally unique for this JVM.
| |
| getWarnings | back to summary |
|---|---|
| public SQLWarning getWarnings() Get the chain of compile time warnings. | |
| isFirstOnStack | back to summary |
|---|---|
| public boolean isFirstOnStack() Is this the first CompilerContext on the stack? | |
| isReferenced | back to summary |
|---|---|
| public boolean isReferenced(SequenceDescriptor sd) Report whether the given sequence has been referenced already. | |
| passesPrivilegeFilters | back to summary |
|---|---|
| public boolean passesPrivilegeFilters(Visitable visitable) throws StandardException Return true if a QueryTreeNode passes all of the filters which determine whether the QueryTreeNode gives rise to run time privilege checks. | |
| popCompilationSchema | back to summary |
|---|---|
| public void popCompilationSchema() Pop the default schema to use when compiling. | |
| popCurrentPrivType | back to summary |
|---|---|
| public void popCurrentPrivType() | |
| pushCompilationSchema | back to summary |
|---|---|
| public void pushCompilationSchema(SchemaDescriptor sd) 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.
| |
| pushCurrentPrivType | back to summary |
|---|---|
| public void 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. Higher level nodes in the query tree do not know what is being referenced. Keeping the context allows the two to come together.
| |
| removePrivilegeFilter | back to summary |
|---|---|
| public void removePrivilegeFilter(VisitableFilter vf) Remove a filter for determining which QueryTreeNodes give rise to privilege checks at run time. | |
| resetContext | back to summary |
|---|---|
| public void resetContext() Reset compiler context (as for instance, when we recycle a context for use by another compilation. | |
| resetNextResultSetNumber | back to summary |
|---|---|
| public void resetNextResultSetNumber() Reset the next ResultSet number from this CompilerContext. | |
| scopeDepth | back to summary |
|---|---|
| public int scopeDepth(String scopeName) 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. | |
| setCompilationSchema | back to summary |
|---|---|
| public SchemaDescriptor setCompilationSchema(SchemaDescriptor newDefault) Set the compilation schema descriptor for this compilation context.
| |
| setCurrentAuxiliaryProviderList | back to summary |
|---|---|
| public void setCurrentAuxiliaryProviderList(ProviderList apl) Set the current auxiliary provider list for this CompilerContext.
| |
| setCurrentDependent | back to summary |
|---|---|
| public void setCurrentDependent(Dependent d) 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.
| |
| setCursorInfo | back to summary |
|---|---|
| public void setCursorInfo(Object cursorInfo) Set params
| |
| setInUse | back to summary |
|---|---|
| public void setInUse(boolean inUse) Set the in use state for the compiler context.
| |
| setParameterList | back to summary |
|---|---|
| public void setParameterList(List<ParameterNode> parameterList) Set the parameter list.
| |
| setReliability | back to summary |
|---|---|
| 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.
| |
| setReturnParameterFlag | back to summary |
|---|---|
| public void setReturnParameterFlag() If callable statement uses ? = form | |
| setSavedObjects | back to summary |
|---|---|
| public void setSavedObjects(List<Object> objs) Set the saved object pool (for putting into the prepared statement).
| |
| setScanIsolationLevel | back to summary |
|---|---|
| public void setScanIsolationLevel(int isolationLevel) Set the isolation level for the scans in this query.
| |
| skippingTypePrivileges | back to summary |
|---|---|
| public boolean skippingTypePrivileges() Return whether we are skipping USAGE privileges for user-defined types | |
| skipTypePrivileges | back to summary |
|---|---|
| public boolean skipTypePrivileges(boolean skip) Set whether we should skip adding USAGE privileges for user-defined types. Returns the previous setting of this variable. | |