You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Neo4j Cypher-DSL in its current form is a spin-off from Spring Data Neo4j 6+ (né Spring Data Neo4j⚡️RX), where it is used to generate all Cypher queries.
We thank all contributors to all branches prior to 2020.0 for their effort in creating the previous versions.
The primary goal of this project is to have a type safe way of creating Cypher queries targeted at Neo4j 4.0+.
Most of the constructs used here are modelled after openCypher, but we include several constructs specific to Neo4j.
The core module of the Neo4j Cypher-DSL has no required runtime dependencies.
Versioning
This rebooted version of the Neo4j Cypher-DSL uses CalVer in the same way Spring does
since early 2020 (see Updates to Spring Versions),
starting at 2020.0.0.
The year digit is treated in a semver fashion for the core module.
That means that you won’t experience any breaking changes when staying in a release line.
However, the first or the latest release in a given year does not necessarily reflect the current calendar year.
It’s kind of a trade-off, but one that we think is valuable, otherwise we would need to postpone the first release in a year until we need todo some breaking changes.
Manual
For a gentle introduction and some getting started guides, please use our
Manual.
Getting Started
Adding the necessary dependencies
First, include the dependency to the Neo4j Cypher-DSL under the following coordinates: org.neo4j:neo4j-cypher-dsl:
Maven configuration
Inclusion of the Neo4j Cypher-DSL in a Maven project
With the Cypher-DSL, you can build your queries starting with the static methods provided through org.neo4j.cypherdsl.core.Cypher.
Static imports for those packages should be allowed:
importstaticorg.neo4j.cypherdsl.core.Cypher.*;
importorg.neo4j.cypherdsl.core.Cypher;
classSimpleExample {
publicstaticvoidmain(String... a) {
varm = node("Movie").named("m");
varstatement = Cypher.match(m)
.returning(m)
.build();
System.out.println(statement.getCypher());
// Prints MATCH (m:`Movie`) RETURN m
}
}
Required Java Version
From version 2023.0.0 onwards, the minimal required Java version to use and build the Cypher-DSL is Java 17. If you need a version that is compatible with Java 8, please use 2022.9.x.