示例#1
0
        public void Init()
        {
            _testExpression = Expression.GreaterThanOrEqual(TestLeftExpression, TestRightExpression);

            TestObject = new GreaterThanOrEqualNode(
                MockNodeFactory.Object,
                TestExpression);
        }
示例#2
0
        public void GreaterThanOrEqualExpressionHasExpectedRight()
        {
            IExpressionNode actual = TestObject.Build(TestGreaterThanOrEqualExpression);

            GreaterThanOrEqualNode actualNode = actual.VerifyIsActually <GreaterThanOrEqualNode>();
            ConstantNode           rightNode  = actualNode.Right.VerifyIsActually <ConstantNode>();

            Assert.AreSame(TestConstantOne, rightNode.SourceExpression);
        }
示例#3
0
        public void GreaterThanOrEqualExpressionIsExpected()
        {
            Expression testExpression = TestGreaterThanOrEqualExpression;

            IExpressionNode actual = TestObject.Build(testExpression);

            GreaterThanOrEqualNode actualNode = actual.VerifyIsActually <GreaterThanOrEqualNode>();

            Assert.AreSame(testExpression, actualNode.SourceExpression);
        }
        protected virtual BaseQuery HandleGreaterThanOrEqual(GreaterThanOrEqualNode node, ElasticSearchQueryMapperState state)
        {
            BaseQuery query;

            var fieldNode = node.GetFieldNode();
            var valueNode = QueryHelper.GetValueNode(node, fieldNode.FieldType);

            if (ProcessAsVirtualField(fieldNode, valueNode, node.Boost, ComparisonType.GreaterThanOrEqual, state, out query))
            {
                return(query);
            }

            return(HandleGreaterThanOrEqual(fieldNode.FieldKey, valueNode.Value, node.Boost));
        }
示例#5
0
 public virtual void VisitGreaterThanOrEqual(GreaterThanOrEqualNode greaterThanOrEqualNode) => throw new NotImplementedException();
 protected virtual QueryNode VisitGreaterThanOrEqual(GreaterThanOrEqualNode node, AzureQueryOptimizerState state)
 {
     return((QueryNode) new GreaterThanOrEqualNode(this.Visit(node.LeftNode, state), this.Visit(node.RightNode, state)));
 }
        protected virtual QueryNode VisitGreaterThanOrEqual(GreaterThanOrEqualNode node, ElasticSearchQueryOptimizerState state)
        {
            var node2 = Visit(node.LeftNode, state);

            return(new GreaterThanOrEqualNode(node2, Visit(node.RightNode, state)));
        }
 protected QueryBase VisitGreaterThanOrEqual(GreaterThanOrEqualNode node, ElasticQueryMapperState state)
 {
     return(GetSingleTermRangeQuery(node, RangeQueryPropertyNames.GreaterThanOrEqualTo));
 }