Database Reference
In-Depth Information
Note
It's mandatory to name the output fields of the
with
clause before they're used in a
chained query.
IfCypherisevolving that quickly,will youhavetorewrite yourCypherqueries everytime
you upgrade to the next Neo4j version? We'll look at how you can deal with different ver-
sions of Cypher syntax next.
6.4.4. Cypher compatibility
We've already mentioned that Cypher is a quickly evolving language, and its syntax is
subject to frequent change. To add valuable new functionality to Cypher, its developers
sometimes need to introduce breaking changes, which will make queries written for earlier
Neo4j versions fail when they're run against a Neo4j database with a newer version.
Fortunately, there's a simple configuration that will allow you to run queries against any
of the supported Neo4j Cypher engines. You can specify the exact version of Neo4j your
query syntax conforms to just before you query:
You can specify the required Neo4j version using the
CYPHER
keyword followed by the
Neo4j version at the beginning of your query, just before the
start
clause
.
Note
The Cypher examples in this chapter have been tested with Neo4j version 2.0.