net.sf.farrago.test
Class FarragoAutoCalcRulesTest.TestDbSessionPersonality
java.lang.Object
net.sf.farrago.defimpl.FarragoDefaultSessionPersonality
net.sf.farrago.test.FarragoAutoCalcRulesTest.TestDbSessionPersonality
- All Implemented Interfaces:
- FarragoSessionPersonality, FarragoStreamFactoryProvider
- Enclosing class:
- FarragoAutoCalcRulesTest
private static class FarragoAutoCalcRulesTest.TestDbSessionPersonality
- extends FarragoDefaultSessionPersonality
TestDbSession extends FarragoDefaultSessionPersonality to provide our
custom OJRexImplementor table in place of Farrago's normal
implementation.
Fields inherited from class net.sf.farrago.defimpl.FarragoDefaultSessionPersonality |
CACHE_STATEMENTS, CACHE_STATEMENTS_DEFAULT, database, DEGREE_OF_PARALLELISM, DEGREE_OF_PARALLELISM_DEFAULT, LABEL, LABEL_DEFAULT, paramValidator, REDUCE_NON_CORRELATED_SUBQUERIES, REDUCE_NON_CORRELATED_SUBQUERIES_FARRAGO_DEFAULT, SQUEEZE_JDBC_NUMERIC, SQUEEZE_JDBC_NUMERIC_DEFAULT, VALIDATE_DDL_ON_PREPARE, VALIDATE_DDL_ON_PREPARE_DEFAULT |
Methods inherited from class net.sf.farrago.defimpl.FarragoDefaultSessionPersonality |
addRowCount, createInheritedSessionVariables, defineDdlHandlers, definePlannerListeners, definePrivileges, getDefaultLocalDataServerName, getRowCounts, getRuntimeContextClass, initPreparingStmt, isAlterTableAddColumnIncremental, isJavaUdxRestartable, isSupportedType, loadDefaultSessionVariables, newDdlValidator, newJmiQueryProcessor, newParser, newPreparingStmt, newPreparingStmt, newPreparingStmt, newRuntimeContext, newTypeFactory, registerRelMetadataProviders, registerStreamFactories, resetRowCounts, shouldReplacePreserveOriginalSql, supportsFeature, updateIndexRoot, updateRowCounts, validateSessionVariable |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ojRexImplementor
private OJRexImplementorTable ojRexImplementor
calcRexImplementor
private CalcRexImplementorTable calcRexImplementor
FarragoAutoCalcRulesTest.TestDbSessionPersonality
public FarragoAutoCalcRulesTest.TestDbSessionPersonality(FarragoDbSession session,
OJRexImplementorTable ojRexImplementor,
CalcRexImplementorTable calcRexImplementorTable)
newPlanner
public FarragoSessionPlanner newPlanner(FarragoSessionPreparingStmt stmt,
boolean init)
- Description copied from interface:
FarragoSessionPersonality
- Creates a new planner.
- Specified by:
newPlanner
in interface FarragoSessionPersonality
- Overrides:
newPlanner
in class FarragoDefaultSessionPersonality
- Parameters:
stmt
- stmt on whose behalf planner will operateinit
- whether to initialize default rules in new planner
- Returns:
- new planner
getSqlOperatorTable
public SqlOperatorTable getSqlOperatorTable(FarragoSessionPreparingStmt preparingStmt)
- Description copied from interface:
FarragoSessionPersonality
- Gets the SQL operator table to use for validating a statement.
- Specified by:
getSqlOperatorTable
in interface FarragoSessionPersonality
- Overrides:
getSqlOperatorTable
in class FarragoDefaultSessionPersonality
- Parameters:
preparingStmt
- statement being prepared
- Returns:
- table of builtin SQL operators and functions to use for
validation; user-defined functions are not included here
getOJRexImplementorTable
public OJRexImplementorTable getOJRexImplementorTable(FarragoSessionPreparingStmt preparingStmt)
- Description copied from interface:
FarragoSessionPersonality
- Gets the implementation table to use for compiling a statement that uses
a Java calculator.
- Specified by:
getOJRexImplementorTable
in interface FarragoSessionPersonality
- Overrides:
getOJRexImplementorTable
in class FarragoDefaultSessionPersonality
- Parameters:
preparingStmt
- statement being prepared
- Returns:
- table of implementations corresponding to result of
FarragoSessionPersonality.getSqlOperatorTable(FarragoSessionPreparingStmt)
newComponentImpl
public <C> C newComponentImpl(Class<C> componentInterface)
- Description copied from interface:
FarragoSessionPersonality
- Gets the component associated with the given Class object from the
personality. If the personality does not support (or recognize) the
component type, it returns null. The returned instance is guaranteed to
be of type
C
or a subclass.
- Specified by:
newComponentImpl
in interface FarragoSessionPersonality
- Overrides:
newComponentImpl
in class FarragoDefaultSessionPersonality
- Parameters:
componentInterface
- the interface desired
- Returns:
- an implementation of
componentInterface
or null