コード例 #1
0
ファイル: SqlFormatter.cs プロジェクト: jeswin/AgileFx
 protected override Expression VisitAggregate(AggregateExpression aggregate)
 {
     this.WriteAggregateName(aggregate.AggregateName);
     this.Write("(");
     if (aggregate.IsDistinct)
     {
         this.Write("DISTINCT ");
     }
     if (aggregate.Argument != null)
     {
         this.VisitValue(aggregate.Argument);
     }
     else if (RequiresAsteriskWhenNoArgument(aggregate.AggregateName))
     {
         this.Write("*");
     }
     this.Write(")");
     return(aggregate);
 }
コード例 #2
0
        protected virtual Expression VisitAggregate(AggregateExpression aggregate)
        {
            var arg = Visit(aggregate.Argument);

            return(UpdateAggregate(aggregate, aggregate.Type, aggregate.AggregateName, arg, aggregate.IsDistinct));
        }
コード例 #3
0
 protected override Expression VisitAggregate(AggregateExpression aggregate)
 {
     this.hasAggregate = true;
     return(aggregate);
 }
コード例 #4
0
 protected virtual bool CompareAggregate(AggregateExpression a, AggregateExpression b)
 {
     return(a.AggregateName == b.AggregateName && this.Compare(a.Argument, b.Argument));
 }