|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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).
Field Summary | |
static int |
CHECK_CONSTRAINT
|
static int |
COLUMN_REFERENCE_ILLEGAL
|
static java.lang.String |
CONTEXT_ID
this is the ID we expect compiler contexts to be stored into a context manager under. |
static int |
CURRENT_CONNECTION_ILLEGAL
|
static int |
DATETIME_ILLEGAL
|
static int |
DEFAULT_RESTRICTION
|
static int |
DIAGNOSTICS_ILLEGAL
|
static int |
FUNCTION_CALL_ILLEGAL
|
static int |
IGNORE_MISSING_CLASSES
|
static int |
INTERNAL_SQL_ILLEGAL
|
static int |
INTERNAL_SQL_LEGAL
Any SQL we support is legal |
static int |
SCHEMA_ILLEGAL
|
static int |
SQL_LEGAL
Standard SQL is legal |
static int |
SUBQUERY_ILLEGAL
|
static int |
UNNAMED_PARAMETER_ILLEGAL
|
static int |
USER_ILLEGAL
|
Method Summary | |
int |
addSavedObject(java.lang.Object o)
Add an object to the pool that is created at compile time and used at execution time. |
void |
addWarning(java.sql.SQLWarning warning)
Add a compile time warning. |
void |
createDependency(Dependent d,
Provider p)
Add a dependency between two objects. |
void |
createDependency(Provider p)
Add a dependency for the current dependent. |
void |
firstOnStack()
Mark this CompilerContext as the first on the stack, so we can avoid continually popping and pushing a CompilerContext. |
ClassFactory |
getClassFactory()
Return the class factory to use in this compilation. |
SchemaDescriptor |
getCompilationSchema()
Get the compilation schema descriptor for this compilation context. |
ProviderList |
getCurrentAuxiliaryProviderList()
Get the current auxiliary provider list from this CompilerContext. |
Dependent |
getCurrentDependent()
Get the current dependent from this CompilerContext. |
java.lang.Object |
getCursorInfo()
Get the cursor info stored in the context. |
int |
getEntryIsolationLevel()
Get the entry isolation level from this CC. |
boolean |
getInUse()
Return the in use state for the compiler context. |
JavaFactory |
getJavaFactory()
Get the JavaFactory from this CompilerContext. |
int |
getNextColumnNumber()
Get the current next column number (for generated column names) from this CompilerContext. |
int |
getNextEquivalenceClass()
Get the next equivalence class for equijoin clauses. |
int |
getNextParameterNumber()
Get the next parameter number. |
int |
getNextResultSetNumber()
Get the current next ResultSet number from this CompilerContext. |
int |
getNextSubqueryNumber()
Get the current next subquery number from this CompilerContext. |
int |
getNextTableNumber()
Get the current next table number from this CompilerContext. |
NodeFactory |
getNodeFactory()
Get the NodeFactory from this CompilerContext. |
int |
getNumResultSets()
Get the number of Results in the current statement from this CompilerContext. |
int |
getNumSubquerys()
Get the number of subquerys in the current statement from this CompilerContext. |
int |
getNumTables()
Get the number of tables in the current statement from this CompilerContext. |
java.util.Vector |
getParameterList()
Get the parameter list. |
DataTypeDescriptor[] |
getParameterTypes()
Get the array of DataTypeDescriptor representing the types of the ? |
ParameterValueSet |
getParams()
Get the params stored vai setParams. |
Parser |
getParser()
Get the Parser from this CompilerContext |
int |
getReliability()
Return the reliability requirements of this clause. |
boolean |
getReturnParameterFlag()
Is the callable statement uses ? |
java.lang.Object[] |
getSavedObjects()
Get the saved object pool (for putting into the prepared statement). |
int |
getScanIsolationLevel()
Get the isolation level for the scans in this query. |
SortCostController |
getSortCostController()
Get a SortCostController. |
StoreCostController |
getStoreCostController(long conglomerateNumber,
LanguageConnectionContext lcc)
Get a StoreCostController for the given conglomerate. |
TypeCompilerFactory |
getTypeCompilerFactory()
Get the TypeCompilerFactory from this CompilerContext. |
java.lang.String |
getUniqueClassName()
Get a unique Class name from this CompilerContext. |
java.sql.SQLWarning |
getWarnings()
Get the chain of compile time warnings. |
boolean |
isFirstOnStack()
Is this the first CompilerContext on the stack? |
void |
resetContext()
Reset compiler context (as for instance, when we recycle a context for use by another compilation. |
void |
resetNextResultSetNumber()
Reset the next ResultSet number from this CompilerContext. |
SchemaDescriptor |
setCompilationSchema(SchemaDescriptor newDefault)
Set the compilation schema descriptor for this compilation context. |
void |
setCurrentAuxiliaryProviderList(ProviderList apl)
Set the current auxiliary provider list for this CompilerContext. |
void |
setCurrentDependent(Dependent d)
Set the current dependent from this CompilerContext. |
void |
setCursorInfo(java.lang.Object cursorInfo)
Set params |
void |
setEntryIsolationLevel(int isolationLevel)
Set the isolation level on entry to this CC so that it can be restored on exit. |
void |
setInUse(boolean inUse)
Set the in use state for the compiler context. |
void |
setParameterList(java.util.Vector parameterList)
Set the parameter list. |
void |
setParams(ParameterValueSet params)
Set params |
void |
setReliability(int reliability)
Sets which kind of query fragments are NOT allowed. |
void |
setReturnParameterFlag()
If callable statement uses ? |
void |
setSavedObjects(java.lang.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. |
Methods inherited from interface org.apache.derby.iapi.services.context.Context |
cleanupOnError, getContextManager, getIdName, isLastHandler, popMe, pushMe |
Field Detail |
public static final java.lang.String CONTEXT_ID
public static final int DATETIME_ILLEGAL
public static final int CURRENT_CONNECTION_ILLEGAL
public static final int FUNCTION_CALL_ILLEGAL
public static final int UNNAMED_PARAMETER_ILLEGAL
public static final int DIAGNOSTICS_ILLEGAL
public static final int SUBQUERY_ILLEGAL
public static final int USER_ILLEGAL
public static final int COLUMN_REFERENCE_ILLEGAL
public static final int IGNORE_MISSING_CLASSES
public static final int SCHEMA_ILLEGAL
public static final int INTERNAL_SQL_ILLEGAL
public static final int SQL_LEGAL
public static final int INTERNAL_SQL_LEGAL
public static final int CHECK_CONSTRAINT
public static final int DEFAULT_RESTRICTION
Method Detail |
public Parser getParser()
public NodeFactory getNodeFactory()
public TypeCompilerFactory getTypeCompilerFactory()
public ClassFactory getClassFactory()
public JavaFactory getJavaFactory()
public int getNextColumnNumber()
public void resetContext()
public int getNextTableNumber()
public int getNumTables()
public int getNextSubqueryNumber()
public int getNumSubquerys()
public int getNextResultSetNumber()
public void resetNextResultSetNumber()
public int getNumResultSets()
public java.lang.String getUniqueClassName()
public Dependent getCurrentDependent()
public void setCurrentDependent(Dependent d)
d
- The Dependent currently being compiled.public ProviderList getCurrentAuxiliaryProviderList()
public void setCurrentAuxiliaryProviderList(ProviderList apl)
apl
- The new current AuxiliaryProviderList.public void createDependency(Provider p) throws StandardException
p
- The Provider of the dependency.
StandardException
- thrown on failure.public void createDependency(Dependent d, Provider p) throws StandardException
d
- The Dependent object.p
- The Provider of the dependency.
StandardException
- thrown on failure.public int addSavedObject(java.lang.Object o)
(#objectType) (this.getPreparedStatement().getSavedObject(#int)) <\pre>
public java.lang.Object[] getSavedObjects()
public void setSavedObjects(java.lang.Object[] objs)
objs
- The new saved objectspublic void setInUse(boolean inUse)
inUse
- The new inUse state for the compiler context.
public boolean getInUse()
public void firstOnStack()
public boolean isFirstOnStack()
public void setReliability(int reliability)
reliability
- bitmask of types of query fragments to be forbidden
see the reliability bitmasks abovepublic int getReliability()
public SchemaDescriptor getCompilationSchema()
public SchemaDescriptor setCompilationSchema(SchemaDescriptor newDefault)
public StoreCostController getStoreCostController(long conglomerateNumber, LanguageConnectionContext lcc) throws StandardException
conglomerateNumber
- The conglomerate for which to get a
StoreCostController.lcc
- Current LanguageConnectionContext.
StandardException
- Thrown on errorpublic SortCostController getSortCostController() throws StandardException
StandardException
- Thrown on errorpublic void setParameterList(java.util.Vector parameterList)
parameterList
- The parameter list.
public java.util.Vector getParameterList()
public void setReturnParameterFlag()
public boolean getReturnParameterFlag()
public DataTypeDescriptor[] getParameterTypes()
public int getNextParameterNumber()
public ParameterValueSet getParams()
public void setParams(ParameterValueSet params)
params
- the paramspublic java.lang.Object getCursorInfo()
public void setCursorInfo(java.lang.Object cursorInfo)
cursorInfo
- the cursor infopublic void setScanIsolationLevel(int isolationLevel)
isolationLevel
- The isolation level to use.
public int getScanIsolationLevel()
public void setEntryIsolationLevel(int isolationLevel)
isolationLevel
- The isolation level on entry.
public int getEntryIsolationLevel()
public int getNextEquivalenceClass()
public void addWarning(java.sql.SQLWarning warning)
public java.sql.SQLWarning getWarnings()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |