|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface FarragoSessionPersonality
FarragoSessionPersonality defines the SPI for plugging in custom FarragoSession behavior.
| Method Summary | ||
|---|---|---|
FarragoSessionVariables |
createInheritedSessionVariables(FarragoSessionVariables variables)
Creates a set of session variables for use in a cloned session. |
|
void |
defineDdlHandlers(FarragoSessionDdlValidator ddlValidator,
List<DdlHandler> handlerList)
See FarragoSessionModelExtension.defineDdlHandlers(net.sf.farrago.session.FarragoSessionDdlValidator, java.util.List. |
|
void |
definePlannerListeners(FarragoSessionPlanner planner)
Defines listeners for events which occur during planning. |
|
void |
definePrivileges(FarragoSessionPrivilegeMap map)
Defines privileges allowed on various object types. |
|
String |
getDefaultLocalDataServerName(FarragoSessionStmtValidator stmtValidator)
Gets the name of the local data server to use for tables when none is specified by CREATE TABLE. |
|
OJRexImplementorTable |
getOJRexImplementorTable(FarragoSessionPreparingStmt preparingStmt)
Gets the implementation table to use for compiling a statement that uses a Java calculator. |
|
void |
getRowCounts(ResultSet resultSet,
List<Long> rowCounts,
TableModificationRelBase.Operation tableModOp)
Gives this personality the opportunity to retrieve rowcount information returned by a DML operation. |
|
Class |
getRuntimeContextClass(FarragoSessionPreparingStmt stmt)
Determines the class to use for runtime context. |
|
SqlOperatorTable |
getSqlOperatorTable(FarragoSessionPreparingStmt preparingStmt)
Gets the SQL operator table to use for validating a statement. |
|
boolean |
isAlterTableAddColumnIncremental()
Tests whether this session personality implements ALTER TABLE ADD COLUMN in an incremental fashion (only adding on the new column as opposed to reformatting existing rows). |
|
boolean |
isJavaUdxRestartable()
Returns whether a JavaUDX is implemented as a restartable data source. |
|
boolean |
isSupportedType(SqlTypeName type)
Returns whether a type is valid in this database. |
|
void |
loadDefaultSessionVariables(FarragoSessionVariables variables)
Loads variables from the session personality into a session variables object. |
|
|
newComponentImpl(Class<C> componentInterface)
Gets the component associated with the given Class object from the personality. |
|
FarragoSessionDdlValidator |
newDdlValidator(FarragoSessionStmtValidator stmtValidator)
Creates a new validator for DDL commands. |
|
JmiQueryProcessor |
newJmiQueryProcessor(String language)
Creates a new processor for JMI queries. |
|
FarragoSessionParser |
newParser(FarragoSession session)
Creates a new SQL parser. |
|
FarragoSessionPlanner |
newPlanner(FarragoSessionPreparingStmt stmt,
boolean init)
Creates a new planner. |
|
FarragoSessionPreparingStmt |
newPreparingStmt(FarragoSessionStmtContext stmtContext,
FarragoSessionStmtContext rootStmtContext,
FarragoSessionStmtValidator stmtValidator)
Creates a new preparing statement tied to this session and its underlying database. |
|
FarragoSessionPreparingStmt |
newPreparingStmt(FarragoSessionStmtContext stmtContext,
FarragoSessionStmtValidator stmtValidator)
Creates a new preparing statement tied to this session and its underlying database. |
|
FarragoSessionPreparingStmt |
newPreparingStmt(FarragoSessionStmtValidator stmtValidator)
Deprecated. Use the two-arg version instead, passing null for stmtContext. |
|
FarragoSessionRuntimeContext |
newRuntimeContext(FarragoSessionRuntimeParams params)
Creates a new runtime context. |
|
RelDataTypeFactory |
newTypeFactory(FarragoRepos repos)
Creates a new type factory. |
|
void |
registerRelMetadataProviders(ChainedRelMetadataProvider chain)
Gives this personality a chance to register one or more RelMetadataProviders in the chain which will be used to answer
relational expression metadata queries during optimization. |
|
void |
resetRowCounts(FemAbstractColumnSet table)
Gives this personality the opportunity to reset rowcount information in the catalog tables for a specified table |
|
boolean |
shouldReplacePreserveOriginalSql()
Tests whether this personality wants original SQL to be preserved for dependent objects where possible during the revalidation triggered by CREATE OR REPLACE. |
|
boolean |
supportsFeature(org.eigenbase.resgen.ResourceDefinition feature)
Tests whether a feature is supported in this personality. |
|
void |
updateIndexRoot(FemLocalIndex index,
FarragoDataWrapperCache wrapperCache,
FarragoSessionIndexMap baseIndexMap,
Long newRoot)
Gives the personality the opportunity to update an index root page when the index is rebuilt |
|
long |
updateRowCounts(FarragoSession session,
List<String> tableName,
List<Long> rowCounts,
TableModificationRelBase.Operation tableModOp,
FarragoSessionRuntimeContext runningContext)
Gives this personality the opportunity to update rowcount information in the catalog tables for a specified table as a result of a particular DML operation. |
|
void |
validateSessionVariable(FarragoSessionDdlValidator ddlValidator,
FarragoSessionVariables variables,
String name,
String value)
Checks whether a parameter value is appropriate for a session variable and, if the value is appropriate, sets the session variable. |
|
| Methods inherited from interface net.sf.farrago.session.FarragoStreamFactoryProvider |
|---|
registerStreamFactories |
| Method Detail |
|---|
SqlOperatorTable getSqlOperatorTable(FarragoSessionPreparingStmt preparingStmt)
preparingStmt - statement being prepared
OJRexImplementorTable getOJRexImplementorTable(FarragoSessionPreparingStmt preparingStmt)
preparingStmt - statement being prepared
getSqlOperatorTable(FarragoSessionPreparingStmt)<C> C newComponentImpl(Class<C> componentInterface)
C or a subclass.
componentInterface - the interface desired
componentInterface or nullString getDefaultLocalDataServerName(FarragoSessionStmtValidator stmtValidator)
stmtValidator - validator for statement being prepared
boolean isAlterTableAddColumnIncremental()
boolean isJavaUdxRestartable()
FarragoSessionParser newParser(FarragoSession session)
session - session which will use the parser
FarragoSessionPreparingStmt newPreparingStmt(FarragoSessionStmtContext stmtContext,
FarragoSessionStmtContext rootStmtContext,
FarragoSessionStmtValidator stmtValidator)
stmtContext - embracing stmt context, if any; otherwise, null.rootStmtContext - the root stmt contextstmtValidator - generic stmt validator
FarragoSessionPreparingStmt.
FarragoSessionPreparingStmt newPreparingStmt(FarragoSessionStmtContext stmtContext,
FarragoSessionStmtValidator stmtValidator)
stmtContext - embracing stmt context, if any; otherwise, null.stmtValidator - generic stmt validator
FarragoSessionPreparingStmt.FarragoSessionPreparingStmt newPreparingStmt(FarragoSessionStmtValidator stmtValidator)
FarragoSessionDdlValidator newDdlValidator(FarragoSessionStmtValidator stmtValidator)
stmtValidator - generic stmt validator
void defineDdlHandlers(FarragoSessionDdlValidator ddlValidator,
List<DdlHandler> handlerList)
FarragoSessionModelExtension.defineDdlHandlers(net.sf.farrago.session.FarragoSessionDdlValidator, java.util.List) .
ddlValidator - validator which will invoke handlershandlerList - receives handler objects in order in which they
should be invokedvoid definePrivileges(FarragoSessionPrivilegeMap map)
map - receives allowed privileges
FarragoSessionPlanner newPlanner(FarragoSessionPreparingStmt stmt,
boolean init)
stmt - stmt on whose behalf planner will operateinit - whether to initialize default rules in new planner
void definePlannerListeners(FarragoSessionPlanner planner)
planner - planner to which listeners should be addedClass getRuntimeContextClass(FarragoSessionPreparingStmt stmt)
stmt - stmt on whose behalf planner will operate
FarragoSessionRuntimeContextFarragoSessionRuntimeContext newRuntimeContext(FarragoSessionRuntimeParams params)
params - context initialization parameters
RelDataTypeFactory newTypeFactory(FarragoRepos repos)
repos - a repository containing Farrago metadata
void loadDefaultSessionVariables(FarragoSessionVariables variables)
This method should be called when initializing a new session or when loading a new session personality for an existing session. This method "leaves a mark", as it has the side effect of permanently updating the session variables. Even if the session personality is swapped out, the changes will remain.
variables - the session variables objectFarragoSessionVariables createInheritedSessionVariables(FarragoSessionVariables variables)
variables - set of variables to be inherited
void validateSessionVariable(FarragoSessionDdlValidator ddlValidator,
FarragoSessionVariables variables,
String name,
String value)
EigenbaseException. Possible errors include when no
session variable has the specified name, when a non-numeric value was
specified for a numeric variable, when a directory does not exist, or
other errors.
ddlValidator - a ddl statement validatorvariables - a session variables objectname - name of the session variable to be validatedvalue - value to set for the session variableJmiQueryProcessor newJmiQueryProcessor(String language)
language - query language (e.g. "LURQL")
boolean isSupportedType(SqlTypeName type)
type - Type
boolean supportsFeature(org.eigenbase.resgen.ResourceDefinition feature)
feature - EigenbaseResource resource definition
representing the feature to be tested
boolean shouldReplacePreserveOriginalSql()
void registerRelMetadataProviders(ChainedRelMetadataProvider chain)
RelMetadataProviders in the chain which will be used to answer
relational expression metadata queries during optimization. Personalities
which define their own relational expressions will generally need to
supply corresponding metadata providers.
chain - receives personality's custom providers, if any
void getRowCounts(ResultSet resultSet,
List<Long> rowCounts,
TableModificationRelBase.Operation tableModOp)
throws SQLException
resultSet - result set returned by DML operationrowCounts - list of rowcounts returned by the DML operationtableModOp - table modification operation that caused the rowcounts
to be modified
SQLException
long updateRowCounts(FarragoSession session,
List<String> tableName,
List<Long> rowCounts,
TableModificationRelBase.Operation tableModOp,
FarragoSessionRuntimeContext runningContext)
session - session that needs to update rowcountstableName - fully qualified table name for which rowcounts will be
updatedrowCounts - list of row counts returned by the DML statementtableModOp - table modification operation that caused the rowcounts
to be modifiedrunningContext - the currently running session context.
void resetRowCounts(FemAbstractColumnSet table)
table - column set corresponding to table
void updateIndexRoot(FemLocalIndex index,
FarragoDataWrapperCache wrapperCache,
FarragoSessionIndexMap baseIndexMap,
Long newRoot)
index - index whose root is being updatedwrapperCache - cache for looking up data wrappersbaseIndexMap - map for managing index storagenewRoot - index's new root page
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||