/** * * @return true if the expression does not appear in the select clause */ public boolean isUnrelated() { return getExpressionPosition() == -1; }
/** * * @return true if the expression does not appear in the select clause */ public boolean isUnrelated() { return getExpressionPosition() == -1; }
/** * * @return true if the expression does not appear in the select clause */ public boolean isUnrelated() { return getExpressionPosition() == -1; }
public int getExpressionPosition(int orderIndex) { return this.orderByItems.get(orderIndex).getExpressionPosition(); }
public int getExpressionPosition(int orderIndex) { return this.orderByItems.get(orderIndex).getExpressionPosition(); }
public int getExpressionPosition(int orderIndex) { return this.orderByItems.get(orderIndex).getExpressionPosition(); }
/** * Checks if a variable is in the ORDER BY * @param position 0-based index of the variable * @return True if the ORDER BY contains the element */ public static boolean orderByContainsVariable(OrderBy orderBy, Expression ses, int position) { for (OrderByItem item : orderBy.getOrderByItems()) { if (item.getExpressionPosition() == position) { return true; } } return false; }
/** * Checks if a variable is in the ORDER BY * @param position 0-based index of the variable * @return True if the ORDER BY contains the element */ public static boolean orderByContainsVariable(OrderBy orderBy, Expression ses, int position) { for (OrderByItem item : orderBy.getOrderByItems()) { if (item.getExpressionPosition() == position) { return true; } } return false; }
/** * Checks if a variable is in the ORDER BY * @param position 0-based index of the variable * @return True if the ORDER BY contains the element */ public static boolean orderByContainsVariable(OrderBy orderBy, Expression ses, int position) { for (OrderByItem item : orderBy.getOrderByItems()) { if (item.getExpressionPosition() == position) { return true; } } return false; }
@Override public void visit(OrderByItem obj) { obj.setSymbol(replaceSymbol(obj.getSymbol(), obj.getExpressionPosition() != -1)); }
@Override public void visit(OrderByItem obj) { obj.setSymbol(replaceSymbol(obj.getSymbol(), obj.getExpressionPosition() != -1)); }
@Override public void visit(OrderByItem obj) { obj.setSymbol(replaceSymbol(obj.getSymbol(), obj.getExpressionPosition() != -1)); }
int pos = item.getExpressionPosition(); if (pos < visitor.namingContext.currentSymbols.size()) { ArrayList<Map.Entry<Expression, String>> list = new ArrayList<Map.Entry<Expression,String>>(visitor.namingContext.currentSymbols.entrySet());
int pos = item.getExpressionPosition(); if (pos < visitor.namingContext.currentSymbols.size()) { ArrayList<Map.Entry<Expression, String>> list = new ArrayList<Map.Entry<Expression,String>>(visitor.namingContext.currentSymbols.entrySet());
int pos = item.getExpressionPosition(); if (pos < visitor.namingContext.currentSymbols.size()) { ArrayList<Map.Entry<Expression, String>> list = new ArrayList<Map.Entry<Expression,String>>(visitor.namingContext.currentSymbols.entrySet());
@Override public void visit(OrderByItem obj) { validateSortable(obj.getSymbol()); if (obj.getExpressionPosition() < 0) { for (SubqueryContainer subquery : ValueIteratorProviderCollectorVisitor.getValueIteratorProviders(obj)) { for (ElementSymbol es : ElementCollectorVisitor.getElements(obj, true, true)) { if (es.isExternalReference()) { handleValidationError(QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31156, subquery), obj); } } } } }
@Override public void visit(OrderByItem obj) { validateSortable(obj.getSymbol()); if (obj.getExpressionPosition() < 0) { for (SubqueryContainer subquery : ValueIteratorProviderCollectorVisitor.getValueIteratorProviders(obj)) { for (ElementSymbol es : ElementCollectorVisitor.getElements(obj, true, true)) { if (es.isExternalReference()) { handleValidationError(QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31156, subquery), obj); } } } } }
@Override public void visit(OrderByItem obj) { validateSortable(obj.getSymbol()); if (obj.getExpressionPosition() < 0) { for (SubqueryContainer subquery : ValueIteratorProviderCollectorVisitor.getValueIteratorProviders(obj)) { for (ElementSymbol es : ElementCollectorVisitor.getElements(obj, true, true)) { if (es.isExternalReference()) { handleValidationError(QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31156, subquery), obj); } } } } }
int pos1 = parentkeys.get(i).getExpressionPosition(); int pos2 = keys.get(i).getExpressionPosition(); if (pos1 == -1 || pos2 == -1 || pos1 != pos2) { continue outer; for (int i = 0; i < parentkeys.size(); i++) { OrderByItem item = parentkeys.get(i).clone(); if (item.getExpressionPosition() == -1) { continue outer; Expression ex = cols.get(item.getExpressionPosition()); item.setSymbol((Expression) ex.clone()); newOrderBy.getOrderByItems().add(item);
int pos1 = parentkeys.get(i).getExpressionPosition(); int pos2 = keys.get(i).getExpressionPosition(); if (pos1 == -1 || pos2 == -1 || pos1 != pos2) { continue outer; for (int i = 0; i < parentkeys.size(); i++) { OrderByItem item = parentkeys.get(i).clone(); if (item.getExpressionPosition() == -1) { continue outer; Expression ex = cols.get(item.getExpressionPosition()); item.setSymbol((Expression) ex.clone()); newOrderBy.getOrderByItems().add(item);