示例#1
0
        protected override Expression VisitAggregateSubquery(SqlAggregateSubqueryExpression aggregate)
        {
            SqlAggregateSubqueryExpression current;

            if (!TryGetCurrent(aggregate, out current))
            {
                return(aggregate);
            }

            result = result && (current.GroupByAlias == aggregate.GroupByAlias);

            if (result)
            {
                currentObject = current.AggregateAsSubquery;
                Visit(aggregate.AggregateAsSubquery);

                if (result)
                {
                    currentObject = current.AggregateInGroupSelect;
                    Visit(aggregate.AggregateInGroupSelect);
                }
            }

            currentObject = current;

            return(aggregate);
        }
		protected override Expression VisitAggregateSubquery(SqlAggregateSubqueryExpression aggregate)
		{
			Expression mapped;

			if (this.aggregateSubqueryInstances.TryGetValue(aggregate, out mapped))
			{
				return mapped;
			}

			return this.Visit(aggregate.AggregateAsSubquery);
		}
示例#3
0
        protected virtual Expression VisitAggregateSubquery(SqlAggregateSubqueryExpression aggregate)
        {
            var e = this.Visit(aggregate.AggregateAsSubquery);

            var subquery = (SqlSubqueryExpression)e;

            if (subquery != aggregate.AggregateAsSubquery)
            {
                return(new SqlAggregateSubqueryExpression(aggregate.GroupByAlias, aggregate.AggregateInGroupSelect, subquery));
            }

            return(aggregate);
        }
示例#4
0
 protected override Expression VisitAggregateSubquery(SqlAggregateSubqueryExpression expression)
 {
     this.hashCode ^= expression.GroupByAlias?.GetHashCode() ?? 0;
     return(base.VisitAggregateSubquery(expression));
 }
示例#5
0
        protected override Expression VisitAggregateSubquery(SqlAggregateSubqueryExpression aggregate)
        {
            this.aggregatesFound.Add(aggregate);

            return base.VisitAggregateSubquery(aggregate);
        }
 protected override Expression VisitAggregateSubquery(SqlAggregateSubqueryExpression expression)
 {
     this.hashCode ^= expression.GroupByAlias?.GetHashCode() ?? 0;
     return base.VisitAggregateSubquery(expression);
 }
        protected override Expression VisitAggregateSubquery(SqlAggregateSubqueryExpression expression)
        {
            SqlAggregateSubqueryExpression current;
            if (!TryGetCurrent(expression, out current))
            {
                return expression;
            }

            if (!(this.result &= object.Equals(current.GroupByAlias, expression.GroupByAlias)))
            {
                return expression;
            }

            if (!(this.result &= current.NodeType == expression.NodeType))
            {
                return expression;
            }

            if (!(this.result &= current.Type == expression.Type))
            {
                return expression;
            }

            this.currentObject = current.AggregateInGroupSelect;
            this.Visit(expression.AggregateInGroupSelect);
            if (!this.result)
            {
                return expression;
            }

            this.currentObject = current.AggregateAsSubquery;
            this.VisitSubquery(expression.AggregateAsSubquery);
            if (!this.result)
            {
                return expression;
            }

            this.currentObject = current;
            return expression;
        }
示例#8
0
		protected virtual Expression VisitAggregateSubquery(SqlAggregateSubqueryExpression aggregate)
		{
			var e = this.Visit(aggregate.AggregateAsSubquery);

			var subquery = (SqlSubqueryExpression)e;

			if (subquery != aggregate.AggregateAsSubquery)
			{
				return new SqlAggregateSubqueryExpression(aggregate.GroupByAlias, aggregate.AggregateInGroupSelect, subquery);
			}

			return aggregate;
		}
示例#9
0
 protected override Expression VisitAggregateSubquery(SqlAggregateSubqueryExpression aggregate)
 {
     return(base.VisitAggregateSubquery(aggregate));
 }
示例#10
0
        protected override Expression VisitAggregateSubquery(SqlAggregateSubqueryExpression aggregate)
        {
            this.output.Append(aggregate.ToString());

            return aggregate;
        }