|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FarragoSessionStmtValidator
FarragoSessionStmtValidator defines a generic interface for statement
validation services. It is not as specific as the other validator-related
interfaces (FarragoSessionDdlValidator
and FarragoSessionPreparingStmt
).
Method Summary | ||
---|---|---|
CwmCatalog |
findCatalog(String catalogName)
Looks up a catalog by name, throwing a validation error if not found. |
|
CwmColumn |
findColumn(CwmNamedColumnSet namedColumnSet,
String columnName)
Looks up a table's column by name, throwing a validation error if not found. |
|
FemDataServer |
findDataServer(SqlIdentifier serverName)
Looks up a data server by name, throwing a validation error if not found. |
|
FemDataWrapper |
findDataWrapper(SqlIdentifier wrapperName,
boolean isForeign)
Looks up a data wrapper by name, throwing a validation error if not found. |
|
FemJar |
findJarFromLiteralName(String jarName)
Looks up a jar from a string literal representing its name (typically from a LIBRARY clause), throwing an exception if not found. |
|
List<FemRoutine> |
findRoutineOverloads(SqlIdentifier invocationName,
ProcedureType routineType)
Looks up all matching routine overloads by invocation name. |
|
FemLocalSchema |
findSchema(SqlIdentifier schemaName)
Looks up a schema by name, throwing a validation error if not found. |
|
|
findSchemaObject(SqlIdentifier qualifiedName,
Class<T> clazz)
Looks up a schema object by name, throwing a validation error if not found. |
|
CwmSqldataType |
findSqldataType(SqlIdentifier typeName)
Looks up a SQL datatype by name, throwing an exception if not found. |
|
|
findUnqualifiedObject(SqlIdentifier unqualifiedName,
Class<T> clazz)
Looks up a top-level object (e.g. |
|
List<SqlMoniker> |
getAllSchemaObjectNames(List<String> names)
Gets schema object names as specified. |
|
FarragoObjectCache |
getCodeCache()
|
|
FarragoDataWrapperCache |
getDataWrapperCache()
|
|
FarragoDdlLockManager |
getDdlLockManager()
|
|
CwmCatalog |
getDefaultCatalog()
Gets the default catalog for unqualified schema names. |
|
FemDataServer |
getDefaultLocalDataServer()
|
|
FennelDbHandle |
getFennelDbHandle()
|
|
FarragoSessionIndexMap |
getIndexMap()
|
|
FarragoSessionParser |
getParser()
|
|
FarragoSessionPrivilegeChecker |
getPrivilegeChecker()
|
|
FarragoRepos |
getRepos()
|
|
FarragoReposTxnContext |
getReposTxnContext()
|
|
CwmNamedColumnSet |
getSampleDataset(CwmNamedColumnSet columnSet,
String datasetName)
Looks up a sample dataset for a given schema object, or returns null if none is found. |
|
FarragoSession |
getSession()
|
|
FarragoSessionVariables |
getSessionVariables()
|
|
FarragoObjectCache |
getSharedDataWrapperCache()
|
|
EigenbaseTimingTracer |
getTimingTracer()
|
|
FarragoTypeFactory |
getTypeFactory()
|
|
FarragoWarningQueue |
getWarningQueue()
Gets the warning queue to be used by this validator |
|
void |
requestPrivilege(CwmModelElement obj,
String action)
Submits a request for access from the current user and/or role to a catalog object via this validator's privilege checker. |
|
|
resolveSchemaObjectName(String[] names,
Class<T> clazz)
Resolve a (possibly qualified) name of a schema object. |
|
void |
setParserPosition(SqlParserPos pos)
Sets the parser position to use for context in error messages. |
|
void |
setReposTxnContext(FarragoReposTxnContext reposTxnContext)
Sets the repository transaction context associated with this statement. |
|
void |
setTimingTracer(EigenbaseTimingTracer timingTracer)
Sets the timing tracer associated with this statement |
|
void |
setWarningQueue(FarragoWarningQueue warningQueue)
Sets the warning queue to be used by this validator |
|
void |
validateDataType(SqlDataTypeSpec dataType)
Validates a data type expression. |
|
void |
validateFeature(org.eigenbase.resgen.ResourceDefinition feature,
SqlParserPos context)
Validates that a particular feature is enabled. |
Methods inherited from interface org.eigenbase.util.ClosableAllocationOwner |
---|
addAllocation |
Methods inherited from interface org.eigenbase.util.ClosableAllocation |
---|
closeAllocation |
Methods inherited from interface org.eigenbase.util.ClosableAllocation |
---|
closeAllocation |
Method Detail |
---|
FarragoSession getSession()
FarragoSessionParser getParser()
FarragoRepos getRepos()
FennelDbHandle getFennelDbHandle()
FarragoTypeFactory getTypeFactory()
FarragoSessionVariables getSessionVariables()
FarragoObjectCache getCodeCache()
FarragoDataWrapperCache getDataWrapperCache()
FarragoSessionIndexMap getIndexMap()
FarragoObjectCache getSharedDataWrapperCache()
FarragoSessionPrivilegeChecker getPrivilegeChecker()
FarragoDdlLockManager getDdlLockManager()
FarragoWarningQueue getWarningQueue()
void setWarningQueue(FarragoWarningQueue warningQueue)
warningQueue
- target queue to usevoid requestPrivilege(CwmModelElement obj, String action)
obj
- object to be accessedaction
- the action to be performed on obj (see PrivilegedActionEnum
for base set)CwmColumn findColumn(CwmNamedColumnSet namedColumnSet, String columnName)
namedColumnSet
- the table to searchcolumnName
- name of column to find
CwmCatalog findCatalog(String catalogName)
catalogName
- name of catalog to look up
CwmCatalog getDefaultCatalog()
FemLocalSchema findSchema(SqlIdentifier schemaName)
schemaName
- name of schema to look up
FemDataWrapper findDataWrapper(SqlIdentifier wrapperName, boolean isForeign)
wrapperName
- name of wrapper to look up (must be simple)isForeign
- true for foreign data wrapper; false for local data
wrapper
FemDataServer findDataServer(SqlIdentifier serverName)
serverName
- name of server to look up (must be simple)
FemDataServer getDefaultLocalDataServer()
<T extends CwmModelElement> T findSchemaObject(SqlIdentifier qualifiedName, Class<T> clazz)
qualifiedName
- name of object to look upclazz
- expected class of object; if the object exists with a
different class, it will be treated as if it did not exist
<T extends CwmModelElement> T findUnqualifiedObject(SqlIdentifier unqualifiedName, Class<T> clazz)
unqualifiedName
- SqlIdentifier which returns true for isSimple()clazz
- class of object to find
List<FemRoutine> findRoutineOverloads(SqlIdentifier invocationName, ProcedureType routineType)
invocationName
- invocation name of routine to look uproutineType
- type of routine to look up, or null for any type
CwmSqldataType findSqldataType(SqlIdentifier typeName)
typeName
- name of type to find
FemJar findJarFromLiteralName(String jarName)
jarName
- string literal representing name of jar
<T extends CwmModelElement> FarragoSessionResolvedObject<T> resolveSchemaObjectName(String[] names, Class<T> clazz)
names
- array of 1 or more name components, from most general to
most specificclazz
- type of object to resolve
List<SqlMoniker> getAllSchemaObjectNames(List<String> names)
names
- the array contains either 2 elements representing a
partially qualified object name in the format of 'schema.object', or an
unqualified name in the format of 'object'
SqlMoniker
object (schema and table)
names under the above criteriavoid setParserPosition(SqlParserPos pos)
pos
- new position to set, or null to clearvoid validateFeature(org.eigenbase.resgen.ResourceDefinition feature, SqlParserPos context)
feature
- feature being used, represented as a resource definition
from EigenbaseResource
context
- parser position context for error reporting, or null if
none availablevoid setTimingTracer(EigenbaseTimingTracer timingTracer)
timingTracer
- tracer to useEigenbaseTimingTracer getTimingTracer()
CwmNamedColumnSet getSampleDataset(CwmNamedColumnSet columnSet, String datasetName)
columnSet
- Schema objectdatasetName
- Name of dataset, not null
void validateDataType(SqlDataTypeSpec dataType) throws SqlValidatorException
SqlValidatorException
void setReposTxnContext(FarragoReposTxnContext reposTxnContext)
reposTxnContext
- repos txn context to useFarragoReposTxnContext getReposTxnContext()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |