private QlExpression PushOrderByIn(Expression result, EJournalExpressionType expr, QlExpression column, QlToken toQlToken) { var take = result as SliceExpression; if (take == null) { return(new OrderExpression(result, expr, column, toQlToken)); } return(new SliceExpression(PushOrderByIn(take.Body, expr, column, toQlToken), take.Operation, take.Count)); }
public void ApplyLinq(EJournalExpressionType operation, int count) { if (operation == EJournalExpressionType.Skip && count == 0) { return; } if (operation == EJournalExpressionType.Take && count == int.MaxValue) { return; } if (operation == EJournalExpressionType.Take && count == 0) { // No rows to be selected. MakeEmpty(); return; } _directExpressions.Add(new DirectExpression(operation, count)); }
public QueryRowsResult(IEnumerable <long> rowids, EJournalExpressionType postExpression) : this() { PostExpression = postExpression; Rowids = rowids; }
public SliceExpression(Expression body, EJournalExpressionType operation, Expression count, QlToken token) : base(body, operation, token) { Count = count; }
public DirectExpression(EJournalExpressionType expression, int count) : this() { Expression = expression; Count = count; }
public DirectExpression(EJournalExpressionType expression, IColumnMetadata column) : this() { Expression = expression; Column = column; }
public DirectExpression(EJournalExpressionType expression) : this() { Expression = expression; }
public void ApplyOrderBy(IColumnMetadata column, EJournalExpressionType expression) { _directExpressions.Add(new DirectExpression(expression, column)); }
public void ApplyLinq(EJournalExpressionType operation) { _directExpressions.Add(new DirectExpression(operation)); }
private Expression BindPostResult(Type resultType, ReadOnlyCollection <Expression> arguments, EJournalExpressionType expressionType) { if (resultType != typeof(T)) { throw QueryExceptionExtensions.NotSupported("{0} operation canonly be bound to JournalQueryable of {1} but used on {2}", expressionType, typeof(T).Name, resultType); } var source = arguments[0]; if (arguments.Count > 1) { var lambda = GetLambda(arguments[1]); return(new PostResultExpression(new FilterExpression(Visit(lambda.Body), Visit(source)), expressionType)); } return(new PostResultExpression(Visit(source), expressionType)); }
private Expression BindOrderBy(Expression source, LambdaExpression lambdaExpression, EJournalExpressionType direction) { return(new OrderExpression(Visit(source), direction, lambdaExpression)); }
public PostResultExpression(Expression body, EJournalExpressionType operation) : base(QlToken.QUERIABLE_TOKEN) { _body = body; _operation = operation; }
public PostResultExpression(Expression body, EJournalExpressionType operation, QlToken token) : base(token) { _body = body; _operation = operation; }
public OrderExpression(Expression body, EJournalExpressionType operation, LambdaExpression predicate) : base(body, operation) { _predicate = predicate; }
public OrderExpression(Expression body, EJournalExpressionType operation, Expression predicate, QlToken token) : base(body, operation, token) { _predicate = predicate; }
public OrderExpression(Expression body, EJournalExpressionType operation) : base(body, operation) { }