protected BetweenExpression UpdateBetween(BetweenExpression between, Expression expression, Expression lower, Expression upper)
 {
     if (expression != between.Expression || lower != between.Lower || upper != between.Upper)
     {
         return new BetweenExpression(expression, lower, upper);
     }
     return between;
 }
Exemple #2
0
 protected override Expression VisitBetween(BetweenExpression between)
 {
     this.VisitValue(between.Expression);
     this.Write(" BETWEEN ");
     this.VisitValue(between.Lower);
     this.Write(" AND ");
     this.VisitValue(between.Upper);
     return between;
 }
 protected virtual Expression VisitBetween(BetweenExpression between)
 {
     var expr = this.Visit(between.Expression);
     var lower = this.Visit(between.Lower);
     var upper = this.Visit(between.Upper);
     return this.UpdateBetween(between, expr, lower, upper);
 }
 protected virtual bool CompareBetween(BetweenExpression a, BetweenExpression b)
 {
     return this.Compare(a.Expression, b.Expression)
         && this.Compare(a.Lower, b.Lower)
         && this.Compare(a.Upper, b.Upper);
 }