public Selector orderBy(Variable variable) { orderByList.add(new OrderByAttribute(variable)); return this; }
/** * Generates QueryOrderByConfig list from the given Siddhi OrderByAttribute list * @param orderByAttributeList Siddhi OrderByAttribute list * @return QueryOrderByConfig list */ private List<QueryOrderByConfig> generateOrderBy(List<OrderByAttribute> orderByAttributeList) { List<QueryOrderByConfig> orderBy = new ArrayList<>(); for (OrderByAttribute orderByAttribute : orderByAttributeList) { orderBy.add(new QueryOrderByConfig( orderByAttribute.getVariable().getAttributeName(), orderByAttribute.getOrder().name())); } return orderBy; }
public Selector orderBy(Variable variable, OrderByAttribute.Order order) { orderByList.add(new OrderByAttribute(variable, order)); return this; }
public Selector orderBy(Variable variable, OrderByAttribute.Order order) { orderByList.add(new OrderByAttribute(variable, order)); return this; }
public Selector orderBy(Variable variable) { orderByList.add(new OrderByAttribute(variable)); return this; }
/** * {@inheritDoc} * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @Override public OrderByAttribute visitOrder_by_reference(SiddhiQLParser.Order_by_referenceContext ctx) { Variable variable = (Variable) visit(ctx.attribute_reference()); if (ctx.order() != null && ctx.order().DESC() != null) { return new OrderByAttribute(variable, OrderByAttribute.Order.DESC); } return new OrderByAttribute(variable); }