public override void VisitBetweenExpression(SqlBetweenExpressionNode expressionNode) { var testExp = Build(expressionNode.Expression); var minValue = Build(expressionNode.MinValue); var maxValue = Build(expressionNode.MaxValue); var smallerExp = SqlExpression.SmallerOrEqualThan(testExp, maxValue); var greaterExp = SqlExpression.GreaterOrEqualThan(testExp, minValue); outputExpression = SqlExpression.And(smallerExp, greaterExp); if (expressionNode.Not) outputExpression = SqlExpression.Not(outputExpression); }
private static SqlExpression VisitBetweenExpression(SqlBetweenExpressionNode expressionNode) { var testExp = Build(expressionNode.Expression); var minValue = Build(expressionNode.MinValue); var maxValue = Build(expressionNode.MaxValue); var smallerExp = SqlExpression.SmallerOrEqualThan(testExp, maxValue); var greaterExp = SqlExpression.GreaterOrEqualThan(testExp, minValue); SqlExpression exp = SqlExpression.And(smallerExp, greaterExp); if (expressionNode.Not) { exp = SqlExpression.Not(exp); } return(exp); }
public virtual void VisitBetweenExpression(SqlBetweenExpressionNode node) { }
private static SqlExpression VisitBetweenExpression(SqlBetweenExpressionNode expressionNode) { var testExp = Build(expressionNode.Expression); var minValue = Build(expressionNode.MinValue); var maxValue = Build(expressionNode.MaxValue); var smallerExp = SqlExpression.SmallerOrEqualThan(testExp, maxValue); var greaterExp = SqlExpression.GreaterOrEqualThan(testExp, minValue); SqlExpression exp = SqlExpression.And(smallerExp, greaterExp); if (expressionNode.Not) exp = SqlExpression.Not(exp); return exp; }