|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FarragoSessionDdlValidator
FarragoSessionDdlValidator represents an object capable of validating a DDL statement.
Method Summary | ||
---|---|---|
|
createDependency(CwmNamespace client,
Collection<T> suppliers)
Creates a new dependency. |
|
void |
defineDropRule(RefAssociation refAssoc,
FarragoSessionDdlDropRule dropRule)
Adds a FarragoSessionDdlDropRule . |
|
void |
deleteObject(RefObject obj)
Deletes the given object and cascades deletion as necessary to subordinate objects. |
|
void |
discardDataWrapper(CwmModelElement wrapper)
Discards a data wrapper or server from the shared cache (called when it is dropped). |
|
void |
executeStorage()
Executes storage management commands for any model elements encountered during validation. |
|
void |
fixupView(FemLocalView view,
FarragoSessionAnalyzedSql analyzedSql)
Modifies the analyzed SQL for a view definition, to take into account any system columns which a personality may need to have in the view. |
|
FarragoDataWrapperCache |
getDataWrapperCache()
|
|
Set<CwmModelElement> |
getDependencies(CwmModelElement rootElement)
Returns immediate dependencies of an of element. |
|
FennelDbHandle |
getFennelDbHandle()
|
|
FarragoSessionIndexMap |
getIndexMap()
|
|
FarragoSession |
getInvokingSession()
|
|
FarragoSessionParser |
getParser()
|
|
SqlParserPos |
getParserOffset(RefObject obj)
Retrieves the parser offset for the body of a given object. |
|
String |
getParserPosString(RefObject obj)
Finds the parse position for an object affected by DDL. |
|
FarragoRepos |
getRepos()
|
|
SqlNode |
getSqlDefinition(RefObject obj)
Retrieves an SQL definition previously associated with a catalog object via setSqlDefinition(javax.jmi.reflect.RefObject, org.eigenbase.sql.SqlNode) . |
|
FarragoSessionStmtValidator |
getStmtValidator()
|
|
FarragoTypeFactory |
getTypeFactory()
|
|
boolean |
isCreatedObject(RefObject refObject)
Determines whether a catalog object is being created by this DDL statement. |
|
boolean |
isDeletedObject(RefObject refObject)
Determines whether a catalog object is being deleted by this DDL statement. |
|
boolean |
isDropRestrict()
|
|
EigenbaseException |
newPositionalError(RefObject refObj,
SqlValidatorException ex)
Wraps a validation error with position information. |
|
FarragoSession |
newReentrantSession()
Creates a new reentrant session; this is required during validation of some DDL commands (e.g. |
|
String |
obtainTimestamp()
Obtains the single consistent timestamp for this DDL transaction. |
|
void |
releaseReentrantSession(FarragoSession session)
Releases a FarragoSession acquired with newReentrantSession(). |
|
void |
setCreatedSchemaContext(FemLocalSchema schema)
Sets the context for a compound CREATE SCHEMA statement to be used by all object definitions in the new schema. |
|
String |
setParserOffset(RefObject obj,
SqlParserPos pos,
String body)
Sets the parser offset for the body of a given object. |
|
void |
setRevalidationResult(CwmModelElement element,
EigenbaseException ex)
Called after revalidation (validation of dependencies during a CREATE OR REPLACE) is successful (ex is null), or upon failure (ex is not null). |
|
void |
setSchemaObjectName(CwmModelElement schemaElement,
SqlIdentifier qualifiedName)
Sets the name of a new object being defined, and adds the object to the correct schema. |
|
void |
setSqlDefinition(RefObject obj,
SqlNode sqlNode)
Associates an SQL definition with a catalog object. |
|
void |
validate(FarragoSessionDdlStmt ddlStmt)
Validates all scheduled operations. |
|
void |
validateUniqueNames(CwmModelElement container,
Collection<? extends CwmModelElement> collection,
boolean includeType)
Determines whether all of the objects in a collection have distinct names, throwing an appropriate exception if not. |
|
void |
validateViewColumnList(Collection<?> collection)
validate the names provided in a VIEW's explicit column list. |
Methods inherited from interface org.eigenbase.util.ClosableAllocation |
---|
closeAllocation |
Method Detail |
---|
FarragoSessionStmtValidator getStmtValidator()
FarragoRepos getRepos()
FennelDbHandle getFennelDbHandle()
FarragoTypeFactory getTypeFactory()
FarragoSessionIndexMap getIndexMap()
FarragoDataWrapperCache getDataWrapperCache()
FarragoSession getInvokingSession()
FarragoSessionParser getParser()
boolean isDropRestrict()
FarragoSession newReentrantSession()
void releaseReentrantSession(FarragoSession session)
session
- the session to releaseboolean isDeletedObject(RefObject refObject)
refObject
- object in question
boolean isCreatedObject(RefObject refObject)
refObject
- object in question
String getParserPosString(RefObject obj)
obj
- the affected object
String setParserOffset(RefObject obj, SqlParserPos pos, String body)
If the body text has preceding whitespace, trims the whitespace and advances the position by the number of whitespace characters removed. Returns the trimmed body.
obj
- object being definedpos
- parser offsetbody
- text of body
SqlParserPos getParserOffset(RefObject obj)
obj
- object to look up
void setSqlDefinition(RefObject obj, SqlNode sqlNode)
getSqlDefinition(javax.jmi.reflect.RefObject)
.
obj
- object being definedsqlNode
- SQL definitionSqlNode getSqlDefinition(RefObject obj)
setSqlDefinition(javax.jmi.reflect.RefObject, org.eigenbase.sql.SqlNode)
. As a side effect, also restores parser
context for this object if available.
obj
- object being validated
void setSchemaObjectName(CwmModelElement schemaElement, SqlIdentifier qualifiedName)
schemaElement
- the object being namedqualifiedName
- the (possibly) qualified name of the objectvoid executeStorage()
void validate(FarragoSessionDdlStmt ddlStmt)
ddlStmt
- DDL statement to be validatedvoid validateUniqueNames(CwmModelElement container, Collection<? extends CwmModelElement> collection, boolean includeType)
container
- namespace object for use in error messagecollection
- Collection of CwmModelElements representing namespace
contentsincludeType
- if true, include type in name; if false, ignorevoid validateViewColumnList(Collection<?> collection)
collection
- Collection of CwmModelElements representing the
explicitly named columns<T extends CwmModelElement> CwmDependency createDependency(CwmNamespace client, Collection<T> suppliers)
client
- element which depends on others; we require this to be a
CwmNamespace
so that it can own the CwmDependency
createdsuppliers
- collection of elements on which client depends
void discardDataWrapper(CwmModelElement wrapper)
wrapper
- definition of wrapper to discardvoid setCreatedSchemaContext(FemLocalSchema schema)
schema
- new schema being createdEigenbaseException newPositionalError(RefObject refObj, SqlValidatorException ex)
refObj
- object whose definition should be used for position
informationex
- exception to be wrapped
void deleteObject(RefObject obj)
obj
- object to deletevoid defineDropRule(RefAssociation refAssoc, FarragoSessionDdlDropRule dropRule)
FarragoSessionDdlDropRule
.
refAssoc
- model association to which the rule relatesdropRule
- rule to addvoid setRevalidationResult(CwmModelElement element, EigenbaseException ex)
element
- object impacted by replacementex
- exception to be handled, may be nullSet<CwmModelElement> getDependencies(CwmModelElement rootElement)
rootElement
- Starting element for dependency search
void fixupView(FemLocalView view, FarragoSessionAnalyzedSql analyzedSql)
view
- View definitionanalyzedSql
- Analyzed SQL for the view definitionString obtainTimestamp()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |