public class QueryRewriter extends Object
Modifier and Type | Field and Description |
---|---|
static CompareCriteria |
FALSE_CRITERIA |
static CompareCriteria |
TRUE_CRITERIA |
static CompareCriteria |
UNKNOWN_CRITERIA |
public static final CompareCriteria TRUE_CRITERIA
public static final CompareCriteria FALSE_CRITERIA
public static final CompareCriteria UNKNOWN_CRITERIA
public static Command evaluateAndRewrite(Command command, Evaluator eval, CommandContext context, QueryMetadataInterface metadata) throws TeiidProcessingException, TeiidComponentException
public static Criteria evaluateAndRewrite(Criteria criteria, Evaluator eval, CommandContext context, QueryMetadataInterface metadata) throws TeiidProcessingException, TeiidComponentException
public static Command rewrite(Command command, QueryMetadataInterface metadata, CommandContext context, Map<ElementSymbol,Expression> variableValues) throws TeiidComponentException, TeiidProcessingException
public static Command rewrite(Command command, QueryMetadataInterface metadata, CommandContext context) throws TeiidComponentException, TeiidProcessingException
public static boolean isDistinctWithGroupBy(Query query)
public QueryCommand rewriteOrderBy(QueryCommand queryCommand) throws TeiidComponentException, TeiidProcessingException
query
- TeiidComponentException,
- MetaMatrixProcessingExceptionTeiidProcessingException
TeiidComponentException
public static void rewriteOrderBy(QueryCommand queryCommand, OrderBy orderBy, List projectedSymbols, CommandContext context, QueryMetadataInterface metadata) throws TeiidComponentException, TeiidProcessingException
public static Criteria rewriteCriteria(Criteria criteria, CommandContext context, QueryMetadataInterface metadata) throws TeiidComponentException, TeiidProcessingException
criteria
- The criteria to rewritemetadata
- userCriteria
- The criteria on user's command, used in rewriting HasCriteria
in the procedural language.TeiidComponentException
TeiidProcessingException
public static Criteria optimizeCriteria(CompoundCriteria criteria, QueryMetadataInterface metadata)
criteria
- public static boolean isNull(Expression expr)
public static Expression rewriteExpression(Expression expression, CommandContext context, QueryMetadataInterface metadata) throws TeiidComponentException, TeiidProcessingException
public static Expression rewriteExpression(Expression expression, CommandContext context, QueryMetadataInterface metadata, boolean rewriteSubcommands) throws TeiidComponentException, TeiidProcessingException
public static Command rewriteAsUpsertProcedure(Insert insert, QueryMetadataInterface metadata, CommandContext context) throws TeiidComponentException, QueryMetadataException, QueryValidatorException, QueryResolverException, TeiidProcessingException
public static Query createInlineViewQuery(GroupSymbol inlineGroup, Command nested, QueryMetadataInterface metadata, List<? extends Expression> actualSymbols) throws QueryMetadataException, QueryResolverException, TeiidComponentException
public static void makeSelectUnique(Select select, boolean expressionSymbolsOnly)
public static Command createDeleteProcedure(Delete delete, QueryMetadataInterface metadata, CommandContext context) throws QueryResolverException, QueryMetadataException, TeiidComponentException, TeiidProcessingException
public static Command createUpdateProcedure(Update update, QueryMetadataInterface metadata, CommandContext context) throws QueryResolverException, QueryMetadataException, TeiidComponentException, TeiidProcessingException
Copyright © 2018 JBoss by Red Hat. All rights reserved.