Beispiel #1
0
        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);
        }
Beispiel #2
0
        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)
 {
 }
Beispiel #4
0
        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;
        }
Beispiel #5
0
 public virtual void VisitBetweenExpression(SqlBetweenExpressionNode node)
 {
 }