|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.query.rewriter.QueryRewriter
public class QueryRewriter
Rewrites commands and command fragments to a form that is better for planning and execution. There is a current limitation that command objects themselves cannot change type, since the same object is always used.
Field Summary | |
---|---|
static CompareCriteria |
FALSE_CRITERIA
|
static CompareCriteria |
TRUE_CRITERIA
|
static CompareCriteria |
UNKNOWN_CRITERIA
|
Method Summary | |
---|---|
static java.lang.String |
convertString(java.lang.String string)
|
static Query |
createInlineViewQuery(GroupSymbol group,
QueryCommand nested,
QueryMetadataInterface metadata,
java.util.List actualSymbols)
|
static boolean |
isNull(Expression expr)
|
static void |
makeSelectUnique(Query query,
boolean expressionSymbolsOnly)
|
static Criteria |
optimizeCriteria(CompoundCriteria criteria)
Performs simple expression flattening |
static Command |
rewrite(Command command,
Command procCommand,
QueryMetadataInterface metadata,
CommandContext context)
|
static Criteria |
rewriteCriteria(Criteria criteria,
Command procCommand,
CommandContext context,
QueryMetadataInterface metadata)
Rewrite the criteria by evaluating some trivial cases. |
static Expression |
rewriteExpression(Expression expression,
Command procCommand,
CommandContext context,
QueryMetadataInterface metadata)
|
static void |
rewriteOrderBy(QueryCommand query,
Command procCommand,
QueryMetadataInterface metadata,
CommandContext context)
Rewrite the order by clause. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final CompareCriteria TRUE_CRITERIA
public static final CompareCriteria FALSE_CRITERIA
public static final CompareCriteria UNKNOWN_CRITERIA
Method Detail |
---|
public static Command rewrite(Command command, Command procCommand, QueryMetadataInterface metadata, CommandContext context) throws QueryValidatorException
QueryValidatorException
public static void rewriteOrderBy(QueryCommand query, Command procCommand, QueryMetadataInterface metadata, CommandContext context) throws QueryValidatorException
query
-
QueryValidatorException
public static Criteria rewriteCriteria(Criteria criteria, Command procCommand, CommandContext context, QueryMetadataInterface metadata) throws QueryValidatorException
criteria
- The criteria to rewritemetadata
- userCriteria
- The criteria on user's command, used in rewriting HasCriteria
in the procedural language.
QueryValidatorException
public static Criteria optimizeCriteria(CompoundCriteria criteria)
criteria
-
public static boolean isNull(Expression expr)
public static Expression rewriteExpression(Expression expression, Command procCommand, CommandContext context, QueryMetadataInterface metadata) throws QueryValidatorException
QueryValidatorException
public static java.lang.String convertString(java.lang.String string)
public static Query createInlineViewQuery(GroupSymbol group, QueryCommand nested, QueryMetadataInterface metadata, java.util.List actualSymbols) throws QueryMetadataException, QueryResolverException, MetaMatrixComponentException
QueryMetadataException
QueryResolverException
MetaMatrixComponentException
public static void makeSelectUnique(Query query, boolean expressionSymbolsOnly)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |