Пример #1
0
        protected internal virtual Expression VisitAggregateRequest(AggregateRequestsExpression request)
        {
            var ag = (AggregateExpression)this.Visit(request.Aggregate);

            if (ag != request.Aggregate)
            {
                return(new AggregateRequestsExpression(request.GroupByAlias, ag));
            }

            return(request);
        }
Пример #2
0
        protected internal override Expression VisitAggregateRequest(AggregateRequestsExpression request)
        {
            var ag       = (AggregateExpression)this.Visit(request.Aggregate);
            var newAlias = aliasMap.TryGetC(request.GroupByAlias) ?? request.GroupByAlias;

            if (ag != request.Aggregate || request.GroupByAlias != newAlias)
            {
                return(new AggregateRequestsExpression(newAlias, ag));
            }

            return(request);
        }
Пример #3
0
 protected internal override Expression VisitAggregateRequest(AggregateRequestsExpression aggregate)
 {
     throw InvalidSqlExpression(aggregate);
 }
Пример #4
0
 protected virtual bool CompareAggregateSubquery(AggregateRequestsExpression a, AggregateRequestsExpression b)
 {
     return(Compare(a.Aggregate, b.Aggregate) &&
            a.GroupByAlias == b.GroupByAlias);
 }
Пример #5
0
 protected internal override Expression VisitAggregateRequest(AggregateRequestsExpression aggregate)
 {
     this.aggregates.Add(aggregate);
     return(base.VisitAggregateRequest(aggregate));
 }
Пример #6
0
 protected internal override Expression VisitAggregateRequest(AggregateRequestsExpression aggregate)
 {
     return(this.map.GetOrThrow(aggregate));
 }