Search code examples
neo4jcypherneo4jclient

Neo4jClient: specify Cypher parser version?


Is there a way to specify the version of the Cypher parser in Neo4jClient on a per-query basis, as described here?

Thanks!


Solution

  • If you update your Neo4jClient to the most recent (> 1.0.0.604) you will have access to the 'ParserVersion' method, which you use like:

    client.Cypher
        .ParserVersion(1,9)
        .Start( new {n = All.Nodes} )
        .Return<object>("n")
    

    Which creates the cypher:

    CYPHER 1.9
    START n = nodes(*)
    RETURN n
    

    If you use a version less than 1.9, you'll get the CYPHER LEGACY start instead.