Esempio n. 1
0
 protected ScalarExpression UpdateScalar(ScalarExpression scalar, SelectExpression select)
 {
     if (select != scalar.Select)
     {
         return(new ScalarExpression(scalar.Type, select));
     }
     return(scalar);
 }
Esempio n. 2
0
 protected override Expression VisitScalar(ScalarExpression subquery)
 {
     this.Write("(");
     this.WriteLine(Indentation.Inner);
     this.Visit(subquery.Select);
     this.WriteLine(Indentation.Same);
     this.Write(")");
     this.Indent(Indentation.Outer);
     return(subquery);
 }
 protected virtual bool CompareScalar(ScalarExpression a, ScalarExpression b)
 {
     return(this.Compare(a.Select, b.Select));
 }
 public AggregateSubqueryExpression(TableAlias groupByAlias, Expression aggregateInGroupSelect, ScalarExpression aggregateAsSubquery) : base(DbExpressionType.AggregateSubquery, aggregateAsSubquery.Type)
 {
     this.aggregateInGroupSelect = aggregateInGroupSelect;
     this.groupByAlias           = groupByAlias;
     this.aggregateAsSubquery    = aggregateAsSubquery;
 }
Esempio n. 5
0
        protected virtual Expression VisitScalar(ScalarExpression scalar)
        {
            SelectExpression select = (SelectExpression)this.Visit(scalar.Select);

            return(this.UpdateScalar(scalar, select));
        }
Esempio n. 6
0
        protected virtual Expression VisitAggregateSubquery(AggregateSubqueryExpression aggregate)
        {
            ScalarExpression subquery = (ScalarExpression)this.Visit(aggregate.AggregateAsSubquery);

            return(this.UpdateAggregateSubquery(aggregate, subquery));
        }
Esempio n. 7
0
 protected AggregateSubqueryExpression UpdateAggregateSubquery(AggregateSubqueryExpression aggregate, ScalarExpression subquery)
 {
     if (subquery != aggregate.AggregateAsSubquery)
     {
         return(new AggregateSubqueryExpression(aggregate.GroupByAlias, aggregate.AggregateInGroupSelect, subquery));
     }
     return(aggregate);
 }