Esempio n. 1
0
        public void WhereStatementIncludingTwoAndCompoundCondition()
        {
            var  visitor = new CypherVisitor();
            Node movie   = Node.Create("Movie").Named("m");

            Node bike = Node.Create("Bike").Named("b");

            Condition condition1 =
                movie.Property("Title").IsEqualTo(Cypher.LiteralOf("The Matrix"));
            Condition condition2   = movie.Property("Rating").IsEqualTo(Cypher.LiteralOf(3.2));
            Condition condition3   = bike.Property("Broken").IsEqualTo(Cypher.LiteralTrue());
            Condition orCondition  = Condition.Or(condition1, condition2);
            Condition andCondition = Condition.And(orCondition, condition3);

            Where where = new(andCondition);
            where.Visit(visitor);
            visitor.Print().MatchSnapshot();
        }