Hi,

I have made a first stab at integrating the new Cypher DSL with 
QueryDSL(.com). The first feature is simply being able to use QueryDSL 
expressions in the WHERE clause. Example:
QPerson person = QPerson.person;
Assert.assertEquals( "START person=node(1,2,3) WHERE 
person.firstName=\"P\" and person.age>25 RETURN person",
                      CypherQueryDSL.start( node( "person", 1, 2, 3 ) )
                          .where( person.firstName.eq( "P" ).and( 
person.age.gt( 25 ) ) )
                          .returns( nodes( "person" ) )
                          .toString() );
---
QPerson is a generated class from QueryDSL, and comes from a simple Java 
class Person that has two fields. With that I can then construct the 
WHERE expression quite easily, as is shown above.

And that's about it! Very straightforward. Look at the Cypher DSL in 
GitHub for example on how to set it up, and what Maven dependencies you 
need to use it.

/Rickard

-- 
Rickard Öberg
Developer
Neo Technology
Twitter: @rickardoberg, Skype: rickardoberg
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to