Skip to content

Releases: neo4j/cypher-dsl

2022.9.0

24 Jul 11:46
9c143d7
Compare
Choose a tag to compare

🚀 Features

  • Add callbacks for function and procedure invocations. (#758)

🧹 Housekeeping

  • Dependency upgrades:
    • Update Spring Data Neo4j from 6.3.5 to 6.3.14
    • Update Neo4j from 4.4.12 to 4.4.23
    • Update Neo4j Java Driver from 4.4.9 to 4.4.12

2023.5.0

03 Jul 12:44
084b14f
Compare
Choose a tag to compare

Wait what, another minor?
Yes, we added new methods to some builders for #753 and a new method in #756 that takes in the direction of a relationship.
While these are not interfaces for you to implemented and the methods are defaulted, semver requires a minor bump nevertheless.

Thanks to @israelstmz and ss with almost every release this year, to @ikwattro, for your input!

🚀 Features

  • Provide non-builder method for creating relationships. (#756)
  • Allow REMOVE being used after MERGE. (#753)

🧹 Housekeeping

  • Dependency upgrades:
    • Bump guava from 32.0.1-jre to 32.1.1-jre (#755)
    • Bump neo4j-java-driver from 5.9.0 to 5.10.0 (#754)
    • Bump checkstyle from 10.12.0 to 10.12.1 (#752)
    • Bump spring-boot-starter-parent from 3.1.0 to 3.1.1 (#751)

2023.4.0

20 Jun 07:47
18a7111
Compare
Choose a tag to compare

2023.4.0 comes with a whole list of new features. As we deprecated two things (the DEFAULT dialect and org.neo4j.cypherdsl.core.Cypher.use(org.neo4j.cypherdsl.core.SymbolicName, org.neo4j.cypherdsl.core.Statement)), your project might break depending on your warning settings. The DEFAULT dialect is now org.neo4j.cypherdsl.core.renderer.Dialect.NEO4J_4 (which keeps on being the default) and the use method has a new overload taking in an expression. You might need to explicitly cast here until we remove the deprecated method for good. This change was necessary to be able to put all functions in the graph.* namespace to use.

Thanks to our reporters, contributors and supporters @xdelox, @ikwattro, @nmervaillie and Rohan Kharwar.

🚀 Features

  • Introduce event to capture parsed literals. (#742)
  • Allow retrieval of literals. (#741)
  • Add builder methods for FOREACH. (#740)
  • Provide all functions in the graph.* namespaces. (#734)
  • Provide a way to fill parsed parameters with values. (#732)

🐛 Bug Fixes

  • Strip off octal prefix.

🔄️ Refactorings

  • Replace DEFAULT dialect with explicit NEO4J_4 dialect. (#736)
  • Use sorted sets everywhere to keep orders of identifiables in the catalog close to users expectations. (#733)

🧹 Housekeeping

  • Dependency upgrades:
    • Bump neo4j-cypher-javacc-parser from 5.8.0 to 5.9.0 (#743)
    • Bump reactor-bom from 2022.0.7 to 2022.0.8 (#748)
    • Bump mockito.version from 5.3.1 to 5.4.0 (#747)
    • Bump spring-data-neo4j from 7.1.0 to 7.1.1 (#746)
    • Bump native-maven-plugin from 0.9.22 to 0.9.23 (#745)
    • Bump maven-shade-plugin from 3.4.1 to 3.5.0 (#744)
    • Bump guava from 32.0.0-jre to 32.0.1-jre (#726)
    • Bump maven-surefire-plugin from 3.1.0 to 3.1.2 (#725)
    • Bump maven-failsafe-plugin from 3.1.0 to 3.1.2 (#724)
    • Bump asciidoctorj-diagram from 2.2.8 to 2.2.9 (#723)
    • Bump jackson-bom from 2.15.1 to 2.15.2 (#722)
    • Bump testcontainers.version from 1.18.1 to 1.18.3 (#721)
    • Bump checker-qual from 3.34.0 to 3.35.0 (#720)
    • Bump asciidoctorj from 2.5.8 to 2.5.10 (#719)

2023.3.2

31 May 14:07
6fe24cd
Compare
Choose a tag to compare

🐛 Bug Fixes

  • Relationship chains didn't explicitly enter their elements. (#718, thanks @xdelox for your contribution)

🧹 Housekeeping

  • Dependency upgrades:
    • Bump spring-boot-starter-parent from 3.0.6 to 3.1.0 (#711)
    • Bump neo4j-cypher-javacc-parser from 5.7.0 to 5.8.0 (#709)
    • Bump guava from 31.1-jre to 32.0.0-jre (#714)
    • Bump checkstyle from 10.11.0 to 10.12.0 (#717)
    • Bump asciidoctor-maven-plugin from 2.2.3 to 2.2.4 (#716)
    • Bump maven-checkstyle-plugin from 3.2.2 to 3.3.0 (#715)
    • Bump neo4j-java-driver from 5.8.0 to 5.9.0 (#713)
    • Bump jackson-bom from 2.15.0 to 2.15.1 (#710)
    • Bump maven-source-plugin from 3.2.1 to 3.3.0 (#708)
    • Bump testcontainers.version from 1.18.0 to 1.18.1 (#704)
    • Bump native-maven-plugin from 0.9.21 to 0.9.22 (#707)
    • Bump reactor-bom from 2022.0.6 to 2022.0.7 (#706)
    • Bump asciidoctorj-diagram from 2.2.7 to 2.2.8 (#705)
    • Bump checkstyle from 10.10.0 to 10.11.0 (#703)
    • Bump flatten-maven-plugin from 1.4.1 to 1.5.0 (#702)
    • Bump spring-data-neo4j from 7.0.5 to 7.1.0 (#701)

2023.3.1

08 May 09:21
6a4625b
Compare
Choose a tag to compare

📖 Documentation

  • Add an example combining existential sub-queries and custom procedure calls (#694)

🧹 Housekeeping

  • Dependency upgrades:
    • Bump maven-failsafe-plugin from 3.0.0 to 3.1.0 (#698)
    • Bump checker-qual from 3.33.0 to 3.34.0 (#697)
    • Bump maven-surefire-plugin from 3.0.0 to 3.1.0 (#696)
    • Bump moditect-maven-plugin from 1.0.0.RC3 to 1.0.0.Final (#695)
    • Bump checkstyle from 10.9.3 to 10.10.0 (#692)
    • Bump junit-bom from 5.9.2 to 5.9.3 (#691)
    • Bump neo4j-java-driver from 5.7.0 to 5.8.0 (#690)
    • Bump jacoco-maven-plugin from 0.8.9 to 0.8.10 (#689)
    • Bump neo4j-cypher-javacc-parser from 5.6.0 to 5.7.0 (#685)
    • Bump jackson-bom from 2.14.2 to 2.15.0 (#688)
    • Bump spring-boot-starter-parent from 3.0.5 to 3.0.6 (#687)
    • Bump maven-checkstyle-plugin from 3.2.1 to 3.2.2 (#686)
    • Bump mockito.version from 5.3.0 to 5.3.1 (#684)

2023.3.0

17 Apr 07:24
88911b0
Compare
Choose a tag to compare

🚀 Features

  • Allow retrieval of relationship details from the catalog.

🐛 Bug Fixes

  • Collect LabelExpression's into the catalog, too. (#676)

🔄️ Refactorings

  • Deprecate Functions.id() in favor of elementId(). (#678)

🧹 Housekeeping

  • Dependency upgrades:
    • Bump native-maven-plugin from 0.9.20 to 0.9.21 (#683)
    • Bump reactor-bom from 2022.0.5 to 2022.0.6 (#682)
    • Bump asciidoctorj from 2.5.7 to 2.5.8 (#681)
    • Bump mockito.version from 5.2.0 to 5.3.0 (#680)
    • Bump spring-data-neo4j from 7.0.4 to 7.0.5 (#679)
    • Bump jacoco-maven-plugin from 0.8.8 to 0.8.9 (#672)
    • Bump testcontainers.version from 1.17.6 to 1.18.0 (#671)
    • Bump maven-enforcer-plugin from 3.2.1 to 3.3.0 (#673)
    • Bump asciidoctorj-diagram from 2.2.4 to 2.2.7 (#670)
    • Bump checker-qual from 3.32.0 to 3.33.0 (#669)
    • Bump flatten-maven-plugin from 1.4.0 to 1.4.1 (#668)
    • Bump joda-time from 2.12.4 to 2.12.5 (#667)
    • Bump neo4j-java-driver from 5.6.0 to 5.7.0 (#666)

🛠 Build

  • Skip driver IT without docker. (#665)

2023.2.1

27 Mar 10:09
6364787
Compare
Choose a tag to compare

🚀 Features

  • Add adapter for Neo4j driver value.
  • Add support for Duration and Period literals.

🔄️ Refactorings

  • Use StringBuilder with Matcher#appendReplacement.

🧹 Housekeeping

  • Dependency upgrades:
    • Bump neo4j-cypher-javacc-parser from 5.5.0 to 5.6.0 (#657)
    • Bump maven-install-plugin from 3.1.0 to 3.1.1 (#664)
    • Bump joda-time from 2.12.2 to 2.12.4 (#663)
    • Bump spring-boot-starter-parent from 3.0.4 to 3.0.5 (#662)
    • Bump asm from 9.4 to 9.5 (#661)
    • Bump checkstyle from 10.9.2 to 10.9.3 (#660)
    • Bump maven-deploy-plugin from 3.1.0 to 3.1.1 (#659)
    • Bump spring-data-neo4j from 7.0.3 to 7.0.4 (#658)
    • Bump maven-resources-plugin from 3.3.0 to 3.3.1 (#656)

2023.2.0

20 Mar 10:10
06174ff
Compare
Choose a tag to compare

Thanks to @Andy2003 for his input on the 2023.2.0 release. The main topic of this release is adding support for semantic comparison. The Cypher-DSLs builder method creates an AST, so that is in theory an excellent and doable request. The AST has originally been created as good enough means of rendering Cypher proper when we invented the Cypher-DSL for Spring Data Neo4j 6 back in 2019. Good enough here means that it has optimizing potential and a full-blown analysis is - at least at the moment - out of scope.

Instead, we went with another approach: We added ways of normalizing

  • Variable names (identifiers for entities (nodes and relationships) and variables of lists and map comprehensions)
  • Parameter names
  • Aliases

into generated names and optionally make the parsing of literal Cypher maps constant (maps sorted alphabetically and not by order of key appearance).

This allows now for a "poor man's" semantic comparison. Imagine 2 Cypher-DSL Statement objects that you either created using the builder or parsed through our parser module. You can compare them like this:

static boolean areSemanticallyEquivalent(Statement statement1, Map<String, Object> args1, Statement statement2, Map<String, Object> args2) {

    if (!areSemanticallyEquivalent(statement1, statement2)) {
        return false;
    }

    var mapping1 = statement1.getCatalog().getRenamedParameters();
    var mapping2 = statement2.getCatalog().getRenamedParameters();
    for (Map.Entry<String, String> entry : mapping1.entrySet()) {
        String key1 = entry.getKey();
        String mapped = entry.getValue();

        String key2 = mapping2.entrySet().stream().filter(e -> e.getValue().equals(mapped))
            .map(Map.Entry::getKey).findFirst().orElseThrow();
        if (!args1.get(key1).equals(args2.get(key2))) {
            return false;
        }
    }

    return true;
}

The catalog featured added in 2023.1.0 has been enhanced so that it can return now the mapping of the renamed parameters as well, allowing for inspection of parameters from different sources.

Also thanks to @hindog for contributing map literals in #642 and to @sathishkumar294 for inspiring the new dedicated overloads for type and labels that now work with symbolic names, too.

🚀 Features

  • Allow map literals to be parsed into sorted maps. (#644)
  • Add support for Map literals. (#642)
  • Use generated names for aliases too if possible. (#640)
  • Make the Asterisk proper identifiable. (#641)
  • Add Cypher.withAll to create a with clause importing all (*) variables. (#639)
  • Add overloads of Functions.type and Functions.labels taking in a symbolic name. (#633)
  • Add extended meta data and the ability to use generated variables. (#631)

🔄️ Refactorings

  • Replace identifiers in list / pattern comprehensions, too. (#647)
  • Use scope for generated names. (#646)
  • Some general housekeeping. (#643 and #632)
  • Optimize structure of UNWIND.

📖 Documentation

  • Add a list comprehension example.

🧹 Housekeeping

  • Dependency upgrades:
    • Bump checkstyle from 10.8.1 to 10.9.2 (#653)
    • Bump reactor-bom from 2022.0.4 to 2022.0.5 (#652)
    • Bump asciidoctor-maven-plugin from 2.2.2 to 2.2.3 (#651)
    • Bump maven-failsafe-plugin from 3.0.0-M9 to 3.0.0 (#650)
    • Bump maven-surefire-plugin from 3.0.0-M9 to 3.0.0 (#649)
    • Bump flatten-maven-plugin from 1.3.0 to 1.4.0 (#648)
    • Bump moditect-maven-plugin from 1.0.0.RC2 to 1.0.0.RC3 (#637)
    • Bump checkstyle from 10.8.0 to 10.8.1 (#638)
    • Bump mockito.version from 5.1.1 to 5.2.0 (#636)
    • Bump spring-boot-starter-parent from 3.0.3 to 3.0.4 (#629)
    • Bump annotations from 24.0.0 to 24.0.1 (#628)
    • Bump checker-qual from 3.31.0 to 3.32.0 (#627)
    • Bump spring-data-neo4j from 7.0.2 to 7.0.3 (#626)
    • Bump reactor-bom from 2022.0.3 to 2022.0.4 (#625)
    • Bump japicmp-maven-plugin from 0.17.1 to 0.17.2 (#624)

🛠 Build

  • Use correct version numbers for tags.
  • Replace symlink in gh-pages with static href.

2023.1.0

27 Feb 18:28
9fc9331
Compare
Choose a tag to compare

2023.1.0 is the first feat release after 2023.0.0 and contains several ideas and improvements that stem from sql2cypher and from input by @lukaseder. Thank you!

Additionally, we worked again with @ikwattro from Graph Aware on building the catalog feature. Each statement - regardless of being built or parsed with the Cypher-DSL - can be analyzed via it's catalog now. The catalog will contain labels, types and properties used in a statement and the filters created based on those tokens. You can access the catalog like this:

var input = """
    MATCH (m:`Movie` {title: 'The Matrix'})<-[a:`ACTED_IN`]-(p:`Person`)
    WHERE p.born >= $born
    RETURN p
    """;
var statement = CypherParser.parse(input);

var catalog = statement.getCatalog();

Also: All AST elements will now render themselves to Cypher-Fragments when used in toString() scenarios. Apart from that, all bug fixes and dependency upgrades from 2022.8.5 and 2023.0.4 are included:

🚀 Features

  • Add overloads for count and exists taking in a statement and optional imports. (#623)
  • Add label existences conditions to catalog. (#622)
  • Provide a catalog for identifiable items in a statement. (#617)
  • Allow retrieving parameter names
  • Add missing string functions. (#584)
  • Add support for rewriting the MATCH clause after parsing. (#580)
  • Add length() function. (#569)
  • Allow direct rendering of Visitable objects. (#554)

🐛 Bug Fixes

  • Correctly shadow visible nodes in a subquery. (#616)
  • Parse Node pattern predicates correctly. (#615)
  • Ensure getting the type of relationships without type is safe.
  • Apply prefixes after potential separator. (#606)
  • Resolve symbolic names when looking for visited items. (#602)
  • Open implicit scope when entering a UNION clause. (#590)
  • Move resolved symbolic names into StatementContext. (#586)
  • Add support for label expressions. (#583)
  • Correctly track identifiable elements. (#579)

🔄️ Refactorings

  • Replace requires static transitive with requires static.
  • Allow covariant collection overloads for PatternElement and Expression where sensible. (#566)

📖 Documentation

  • Fix title.
  • Improve JavaDoc.

🧹 Housekeeping

  • Dependency upgrades:
    • Bump neo4j-java-driver from 5.5.0 to 5.6.0 (#621)
    • Bump spring-boot-starter-parent from 3.0.2 to 3.0.3 (#619)
    • Bump checkstyle from 10.7.0 to 10.8.0 (#620)
    • Bump spring-data-neo4j from 7.0.1 to 7.0.2 (#614)
    • Bump maven-surefire-plugin from 3.0.0-M8 to 3.0.0-M9 (#613)
    • Bump maven-failsafe-plugin from 3.0.0-M8 to 3.0.0-M9 (#612)
    • Bump checker-qual from 3.30.0 to 3.31.0 (#611)
    • Bump reactor-bom from 2022.0.2 to 2022.0.3 (#610)
    • Bump native-maven-plugin from 0.9.19 to 0.9.20 (#608)
    • Bump maven-javadoc-plugin from 3.4.1 to 3.5.0 (#607)
    • Bump neo4j-cypher-javacc-parser from 5.4.0 to 5.5.0 (#609)
    • Bump maven-deploy-plugin from 3.0.0 to 3.1.0 (#603)
    • Bump checker-qual from 3.29.0 to 3.30.0 (#601)
    • Bump maven-enforcer-plugin from 3.1.0 to 3.2.1 (#600)
    • Bump mockito.version from 5.0.0 to 5.1.1 (#599)
    • Bump checkstyle from 10.6.0 to 10.7.0 (#598)
    • Bump asciidoctorj-diagram from 2.2.3 to 2.2.4 (#597)
    • Bump jackson-bom from 2.14.1 to 2.14.2 (#594)
    • Bump neo4j-java-driver from 5.4.0 to 5.5.0 (#592)
    • Bump neo4j-cypher-javacc-parser from 5.3.0 to 5.4.0 (#593)
    • Bump spring-boot-starter-parent from 3.0.1 to 3.0.2 (#577)
    • Bump assertj-core from 3.24.1 to 3.24.2 (#576)
    • Bump maven-checkstyle-plugin from 3.2.0 to 3.2.1 (#564)
    • Bump junit-bom from 5.9.1 to 5.9.2 (#563)
    • Bump maven-failsafe-plugin from 3.0.0-M7 to 3.0.0-M8 (#560)
    • Bump reactor-bom from 2022.0.1 to 2022.0.2 (#559)
    • Bump mockito.version from 4.11.0 to 5.0.0 (#558)
    • Bump annotations from 23.1.0 to 24.0.0 (#557)
    • Bump jna from 5.12.1 to 5.13.0 (#556)
    • Bump maven-surefire-plugin from 3.0.0-M7 to 3.0.0-M8 (#555)
    • Bump spring-data-neo4j from 7.0.0 to 7.0.1 (#562)
    • Bump neo4j-java-driver from 5.3.1 to 5.4.0 (#561)

🛠 Build

  • Improve configuration of the license plugin.
  • Move the fixed module-info.java somewhere out of IDEAs reach.

2023.0.4

27 Feb 15:20
c6cbf2f
Compare
Choose a tag to compare

2023.0.4 is a bug fix release and fully compatible with 2023.0.3.

🐛 Bug Fixes

  • Correctly shadow visible nodes in a subquery. (#616)
  • Parse Node pattern predicates correctly. (#615)
  • Ensure getting the type of relationships without type is safe.
  • Apply prefixes after potential separator. (#606)

🧹 Housekeeping

  • Dependency upgrades:
    • Bump neo4j-java-driver from 5.5.0 to 5.6.0 (#621)
    • Bump spring-boot-starter-parent from 3.0.2 to 3.0.3 (#619)
    • Bump checkstyle from 10.7.0 to 10.8.0 (#620)
    • Bump spring-data-neo4j from 7.0.0 to 7.0.2 (#614)
    • Bump maven-surefire-plugin from 3.0.0-M8 to 3.0.0-M9 (#613)
    • Bump maven-failsafe-plugin from 3.0.0-M8 to 3.0.0-M9 (#612)
    • Bump checker-qual from 3.30.0 to 3.31.0 (#611)
    • Bump reactor-bom from 2022.0.1 to 2022.0.3 (#610)
    • Bump native-maven-plugin from 0.9.19 to 0.9.20 (#608)
    • Bump maven-javadoc-plugin from 3.4.1 to 3.5.0 (#607)
    • Bump neo4j-cypher-javacc-parser from 5.4.0 to 5.5.0 (#609)