Repository: neo4j-contrib/cypher-dsl
Branch: main
Commit: ef1860afa69b
Files: 793
Total size: 2.9 MB
Directory structure:
gitextract_i8wbytku/
├── .git-blame-ignore-revs
├── .github/
│ ├── CODEOWNERS
│ ├── ISSUE_TEMPLATE/
│ │ └── config.yml
│ ├── dependabot.yml
│ └── workflows/
│ ├── build.yml
│ ├── publish_docs.yml
│ └── release.yml
├── .gitignore
├── .mvn/
│ ├── extensions.xml
│ ├── jvm.config
│ └── wrapper/
│ ├── maven-wrapper.jar
│ └── maven-wrapper.properties
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.adoc
├── LICENSE.txt
├── README.adoc
├── bin/
│ ├── extract-version.sh
│ ├── prepare-release.sh
│ ├── remove-shaded-modules.sh
│ └── runtests.java
├── docs/
│ ├── appendix/
│ │ ├── 2020.0.adoc
│ │ ├── 2020.1.adoc
│ │ ├── 2021.0.adoc
│ │ ├── 2021.1.adoc
│ │ ├── 2021.2.adoc
│ │ ├── 2021.3.adoc
│ │ ├── 2021.4.adoc
│ │ ├── 2022.0.adoc
│ │ ├── 2022.1.adoc
│ │ ├── 2022.10.adoc
│ │ ├── 2022.11.adoc
│ │ ├── 2022.2.adoc
│ │ ├── 2022.3.adoc
│ │ ├── 2022.4.adoc
│ │ ├── 2022.5.adoc
│ │ ├── 2022.6.adoc
│ │ ├── 2022.7.adoc
│ │ ├── 2022.8.adoc
│ │ ├── 2022.9.adoc
│ │ ├── 2023.0.adoc
│ │ ├── 2023.1.adoc
│ │ ├── 2023.2.adoc
│ │ ├── 2023.3.adoc
│ │ ├── 2023.4.adoc
│ │ ├── 2023.5.adoc
│ │ ├── 2023.6.adoc
│ │ ├── 2023.7.adoc
│ │ ├── 2023.8.adoc
│ │ ├── 2023.9.adoc
│ │ ├── 2024.0.adoc
│ │ ├── 2024.1.adoc
│ │ ├── 2024.2.adoc
│ │ ├── 2024.3.adoc
│ │ ├── 2024.4.adoc
│ │ ├── 2024.5.adoc
│ │ ├── 2024.6.adoc
│ │ ├── 2024.7.adoc
│ │ ├── 2025.0.adoc
│ │ ├── 2025.1.adoc
│ │ ├── 2025.2.adoc
│ │ ├── building.adoc
│ │ ├── changes.adoc
│ │ ├── index.adoc
│ │ └── query-dsl-support.adoc
│ ├── cypher-parser/
│ │ ├── cypher-parser.adoc
│ │ └── index.adoc
│ ├── functions/
│ │ ├── arbitrary-procedures-and-functions.adoc
│ │ ├── index.adoc
│ │ ├── lists.adoc
│ │ └── mathematical.adoc
│ ├── getting-started/
│ │ ├── getting-started.adoc
│ │ └── index.adoc
│ ├── index.adoc
│ ├── introduction-and-preface/
│ │ ├── index.adoc
│ │ └── introduction.adoc
│ ├── properties/
│ │ └── index.adoc
│ └── static-meta-model/
│ ├── concepts.adoc
│ ├── index.adoc
│ ├── ogm-annotation-processor.adoc
│ ├── possible-usage.adoc
│ └── sdn6-annotation-processor.adoc
├── etc/
│ ├── architecture/
│ │ ├── api.adoc
│ │ ├── index.adoc
│ │ ├── naming.adoc
│ │ └── structure.adoc
│ ├── changelog.tpl
│ ├── checkstyle/
│ │ ├── config.xml
│ │ └── suppressions.xml
│ ├── index.tpl
│ ├── license.tpl
│ └── recipes/
│ └── rewrite.yml
├── mvnw
├── mvnw.cmd
├── neo4j-cypher-dsl/
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ ├── java/
│ │ │ ├── module-info.java
│ │ │ └── org/
│ │ │ └── neo4j/
│ │ │ └── cypherdsl/
│ │ │ └── core/
│ │ │ ├── AbstractCase.java
│ │ │ ├── AbstractClause.java
│ │ │ ├── AbstractNode.java
│ │ │ ├── AbstractPropertyContainer.java
│ │ │ ├── AbstractStatement.java
│ │ │ ├── Aliased.java
│ │ │ ├── AliasedExpression.java
│ │ │ ├── Arguments.java
│ │ │ ├── Asterisk.java
│ │ │ ├── BooleanFunctionCondition.java
│ │ │ ├── BooleanLiteral.java
│ │ │ ├── BuiltInFunctions.java
│ │ │ ├── Case.java
│ │ │ ├── Clause.java
│ │ │ ├── Clauses.java
│ │ │ ├── ClausesBasedStatement.java
│ │ │ ├── CollectExpression.java
│ │ │ ├── Comparison.java
│ │ │ ├── CompoundCondition.java
│ │ │ ├── Condition.java
│ │ │ ├── Conditions.java
│ │ │ ├── ConflictingParametersException.java
│ │ │ ├── ConstantCondition.java
│ │ │ ├── CountExpression.java
│ │ │ ├── Create.java
│ │ │ ├── Cypher.java
│ │ │ ├── DecoratedQuery.java
│ │ │ ├── DefaultLoadCSVStatementBuilder.java
│ │ │ ├── DefaultStatementBuilder.java
│ │ │ ├── Delete.java
│ │ │ ├── DistinctExpression.java
│ │ │ ├── DurationLiteral.java
│ │ │ ├── ExistentialSubquery.java
│ │ │ ├── ExposesAndThen.java
│ │ │ ├── ExposesCall.java
│ │ │ ├── ExposesCreate.java
│ │ │ ├── ExposesFinish.java
│ │ │ ├── ExposesHints.java
│ │ │ ├── ExposesLoadCSV.java
│ │ │ ├── ExposesLogicalOperators.java
│ │ │ ├── ExposesMatch.java
│ │ │ ├── ExposesMerge.java
│ │ │ ├── ExposesPatternLengthAccessors.java
│ │ │ ├── ExposesProperties.java
│ │ │ ├── ExposesRelationships.java
│ │ │ ├── ExposesReturning.java
│ │ │ ├── ExposesSubqueryCall.java
│ │ │ ├── ExposesUnwind.java
│ │ │ ├── ExposesWhere.java
│ │ │ ├── ExposesWith.java
│ │ │ ├── Expression.java
│ │ │ ├── ExpressionCondition.java
│ │ │ ├── ExpressionList.java
│ │ │ ├── Expressions.java
│ │ │ ├── Finish.java
│ │ │ ├── Foreach.java
│ │ │ ├── ForeignAdapter.java
│ │ │ ├── ForeignAdapterFactory.java
│ │ │ ├── FunctionInvocation.java
│ │ │ ├── Functions.java
│ │ │ ├── HasLabelCondition.java
│ │ │ ├── Hint.java
│ │ │ ├── IdentifiableElement.java
│ │ │ ├── ImportingWith.java
│ │ │ ├── InTransactions.java
│ │ │ ├── InternalNodeImpl.java
│ │ │ ├── InternalPropertyImpl.java
│ │ │ ├── InternalRelationshipImpl.java
│ │ │ ├── KeyValueMapEntry.java
│ │ │ ├── LabelExpression.java
│ │ │ ├── Labels.java
│ │ │ ├── Limit.java
│ │ │ ├── ListComprehension.java
│ │ │ ├── ListExpression.java
│ │ │ ├── ListLiteral.java
│ │ │ ├── ListOperator.java
│ │ │ ├── ListPredicate.java
│ │ │ ├── Literal.java
│ │ │ ├── LiteralBase.java
│ │ │ ├── LoadCSVStatementBuilder.java
│ │ │ ├── MapExpression.java
│ │ │ ├── MapLiteral.java
│ │ │ ├── MapProjection.java
│ │ │ ├── Match.java
│ │ │ ├── Merge.java
│ │ │ ├── MergeAction.java
│ │ │ ├── MessageKeys.java
│ │ │ ├── MultiPartElement.java
│ │ │ ├── MultiPartQuery.java
│ │ │ ├── Named.java
│ │ │ ├── NamedPath.java
│ │ │ ├── Neo4jVersion.java
│ │ │ ├── NestedExpression.java
│ │ │ ├── Node.java
│ │ │ ├── NodeBase.java
│ │ │ ├── NodeLabel.java
│ │ │ ├── NullLiteral.java
│ │ │ ├── NumberLiteral.java
│ │ │ ├── OngoingListBasedPredicateFunction.java
│ │ │ ├── OngoingListBasedPredicateFunctionWithList.java
│ │ │ ├── Operation.java
│ │ │ ├── Operations.java
│ │ │ ├── Operator.java
│ │ │ ├── Order.java
│ │ │ ├── Parameter.java
│ │ │ ├── ParameterCollectingVisitor.java
│ │ │ ├── ParameterLiteral.java
│ │ │ ├── Pattern.java
│ │ │ ├── PatternComprehension.java
│ │ │ ├── PatternElement.java
│ │ │ ├── PatternExpression.java
│ │ │ ├── PatternExpressionImpl.java
│ │ │ ├── PatternSelector.java
│ │ │ ├── PeriodLiteral.java
│ │ │ ├── Predicates.java
│ │ │ ├── ProcedureCall.java
│ │ │ ├── ProcedureCallImpl.java
│ │ │ ├── Properties.java
│ │ │ ├── Property.java
│ │ │ ├── PropertyAccessor.java
│ │ │ ├── PropertyContainer.java
│ │ │ ├── PropertyLookup.java
│ │ │ ├── QuantifiedPathPattern.java
│ │ │ ├── QueryDSLAdapter.java
│ │ │ ├── RawLiteral.java
│ │ │ ├── ReadingClause.java
│ │ │ ├── Reduction.java
│ │ │ ├── Relationship.java
│ │ │ ├── RelationshipBase.java
│ │ │ ├── RelationshipChain.java
│ │ │ ├── RelationshipPattern.java
│ │ │ ├── Remove.java
│ │ │ ├── RendererBridge.java
│ │ │ ├── ResultStatement.java
│ │ │ ├── Return.java
│ │ │ ├── ReturnBody.java
│ │ │ ├── Set.java
│ │ │ ├── SinglePartQuery.java
│ │ │ ├── Skip.java
│ │ │ ├── SortItem.java
│ │ │ ├── Statement.java
│ │ │ ├── StatementBuilder.java
│ │ │ ├── StatementCatalog.java
│ │ │ ├── StatementCatalogBuildingVisitor.java
│ │ │ ├── StatementContext.java
│ │ │ ├── StringLiteral.java
│ │ │ ├── Subquery.java
│ │ │ ├── SubqueryExpression.java
│ │ │ ├── SubqueryExpressionBuilder.java
│ │ │ ├── SymbolicName.java
│ │ │ ├── TemporalLiteral.java
│ │ │ ├── TreeNode.java
│ │ │ ├── UnionPart.java
│ │ │ ├── UnionQueryImpl.java
│ │ │ ├── Unwind.java
│ │ │ ├── UpdatingClause.java
│ │ │ ├── Use.java
│ │ │ ├── UseClauseImpl.java
│ │ │ ├── Where.java
│ │ │ ├── With.java
│ │ │ ├── annotations/
│ │ │ │ ├── CheckReturnValue.java
│ │ │ │ └── package-info.java
│ │ │ ├── ast/
│ │ │ │ ├── EnterResult.java
│ │ │ │ ├── ProvidesAffixes.java
│ │ │ │ ├── TypedSubtree.java
│ │ │ │ ├── Visitable.java
│ │ │ │ ├── Visitor.java
│ │ │ │ ├── VisitorWithResult.java
│ │ │ │ └── package-info.java
│ │ │ ├── internal/
│ │ │ │ ├── CaseElse.java
│ │ │ │ ├── CaseWhenThen.java
│ │ │ │ ├── ConstantParameterHolder.java
│ │ │ │ ├── DefaultStatementContext.java
│ │ │ │ ├── Distinct.java
│ │ │ │ ├── FixedNamesStrategy.java
│ │ │ │ ├── GeneratedNamesStrategy.java
│ │ │ │ ├── HandlerException.java
│ │ │ │ ├── LoadCSV.java
│ │ │ │ ├── NameResolvingStrategy.java
│ │ │ │ ├── Namespace.java
│ │ │ │ ├── ProcedureName.java
│ │ │ │ ├── ReflectiveVisitor.java
│ │ │ │ ├── RelationshipLength.java
│ │ │ │ ├── RelationshipPatternCondition.java
│ │ │ │ ├── RelationshipTypes.java
│ │ │ │ ├── SchemaNamesBridge.java
│ │ │ │ ├── ScopingStrategy.java
│ │ │ │ ├── UsingPeriodicCommit.java
│ │ │ │ ├── YieldItems.java
│ │ │ │ └── package-info.java
│ │ │ ├── package-info.java
│ │ │ ├── querydsl/
│ │ │ │ ├── CypherContext.java
│ │ │ │ ├── CypherTemplates.java
│ │ │ │ ├── ToCypherFormatStringVisitor.java
│ │ │ │ ├── UnsupportedOperatorException.java
│ │ │ │ └── package-info.java
│ │ │ ├── renderer/
│ │ │ │ ├── ConfigurableRenderer.java
│ │ │ │ ├── Configuration.java
│ │ │ │ ├── DefaultVisitor.java
│ │ │ │ ├── Dialect.java
│ │ │ │ ├── GeneralizedRenderer.java
│ │ │ │ ├── Neo4j523SubqueryVisitor.java
│ │ │ │ ├── Neo4j5ComparisonVisitor.java
│ │ │ │ ├── Neo4j5FunctionInvocationVisitor.java
│ │ │ │ ├── Neo4j5Pre26LabelsVisitor.java
│ │ │ │ ├── PatternSelectorVisitorPreNeo4j521.java
│ │ │ │ ├── PrettyPrintingVisitor.java
│ │ │ │ ├── Renderer.java
│ │ │ │ ├── RenderingVisitor.java
│ │ │ │ ├── SchemaEnforcementFailedException.java
│ │ │ │ ├── Symbols.java
│ │ │ │ └── package-info.java
│ │ │ └── utils/
│ │ │ ├── Assertions.java
│ │ │ ├── LRUCache.java
│ │ │ ├── Strings.java
│ │ │ └── package-info.java
│ │ └── resources/
│ │ ├── META-INF/
│ │ │ └── native-image/
│ │ │ └── org.neo4j/
│ │ │ └── neo4j-cypher-dsl/
│ │ │ ├── native-image.properties
│ │ │ └── resources-config.json
│ │ └── org/
│ │ └── neo4j/
│ │ └── cypherdsl/
│ │ └── core/
│ │ └── messages.properties
│ └── test/
│ ├── java/
│ │ └── org/
│ │ └── neo4j/
│ │ └── cypherdsl/
│ │ └── core/
│ │ ├── BooleanLiteralTests.java
│ │ ├── BuiltInFunctionsTests.java
│ │ ├── ClausesTests.java
│ │ ├── ComparisonTests.java
│ │ ├── Cypher5IT.java
│ │ ├── CypherIT.java
│ │ ├── CypherTests.java
│ │ ├── DefaultStatementBuilderTests.java
│ │ ├── DeleteTests.java
│ │ ├── DialectIT.java
│ │ ├── DurationLiteralTests.java
│ │ ├── ExpressionTests.java
│ │ ├── ExpressionsIT.java
│ │ ├── ForeignAdapterFactoryTests.java
│ │ ├── FunctionInvocationTests.java
│ │ ├── FunctionsIT.java
│ │ ├── FunctionsTests.java
│ │ ├── HintsIT.java
│ │ ├── IdentifiableExpressionsIT.java
│ │ ├── InternalNodeImplTests.java
│ │ ├── InternalPropertyImplTests.java
│ │ ├── InternalRelationshipImplTests.java
│ │ ├── IssueRelatedIT.java
│ │ ├── LabelsTests.java
│ │ ├── LoadCSVIT.java
│ │ ├── PackageAndAPIStructureTests.java
│ │ ├── ParameterIT.java
│ │ ├── ParameterLiteralTests.java
│ │ ├── PredicatesTests.java
│ │ ├── ProcedureCallsIT.java
│ │ ├── RawLiteralTests.java
│ │ ├── RelationshipChainTests.java
│ │ ├── RelationshipTests.java
│ │ ├── StatementCatalogBuildingVisitorTests.java
│ │ ├── StringLiteralTests.java
│ │ ├── SubqueriesGQLIT.java
│ │ ├── SubqueriesIT.java
│ │ ├── SymbolicNameTests.java
│ │ ├── TemporalLiteralTests.java
│ │ ├── TestUtils.java
│ │ ├── ToStringSmokeTests.java
│ │ ├── TreeNodeTests.java
│ │ ├── UseIT.java
│ │ ├── internal/
│ │ │ ├── LoadCSVTests.java
│ │ │ └── ReflectiveVisitorTests.java
│ │ ├── querydsl/
│ │ │ ├── Person.java
│ │ │ ├── Place.java
│ │ │ ├── QueryDSLAdapterTests.java
│ │ │ ├── Stuff.java
│ │ │ └── UnsupportedOperatorExceptionTests.java
│ │ └── renderer/
│ │ ├── ConfigurableRendererTests.java
│ │ ├── ConfigurationTests.java
│ │ ├── DefaultVisitorTests.java
│ │ └── PrettyPrintingVisitorTests.java
│ └── resources/
│ └── mockito-extensions/
│ └── org.mockito.plugins.MockMaker
├── neo4j-cypher-dsl-bom/
│ └── pom.xml
├── neo4j-cypher-dsl-build/
│ ├── annotations/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── java/
│ │ ├── module-info.java
│ │ └── org/
│ │ └── neo4j/
│ │ └── cypherdsl/
│ │ └── build/
│ │ └── annotations/
│ │ ├── RegisterForReflection.java
│ │ └── package-info.java
│ ├── pom.xml
│ └── processor/
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── org/
│ │ │ └── neo4j/
│ │ │ └── cypherdsl/
│ │ │ └── build/
│ │ │ └── processor/
│ │ │ ├── Entry.java
│ │ │ ├── RegisterForReflectionProcessor.java
│ │ │ └── package-info.java
│ │ └── resources/
│ │ └── META-INF/
│ │ └── services/
│ │ └── javax.annotation.processing.Processor
│ └── test/
│ ├── java/
│ │ └── org/
│ │ └── neo4j/
│ │ └── cypherdsl/
│ │ └── build/
│ │ └── processor/
│ │ └── RegisterForReflectionProcessorTests.java
│ └── resources/
│ └── test_classes/
│ ├── Class0.java
│ ├── Class1.java
│ ├── Class2.java
│ └── Class3.java
├── neo4j-cypher-dsl-codegen/
│ ├── neo4j-cypher-dsl-codegen-core/
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ ├── module-info.java
│ │ │ └── org/
│ │ │ └── neo4j/
│ │ │ └── cypherdsl/
│ │ │ └── codegen/
│ │ │ └── core/
│ │ │ ├── AbstractClassNameGenerator.java
│ │ │ ├── AbstractMappingAnnotationProcessor.java
│ │ │ ├── AbstractModelBuilder.java
│ │ │ ├── ClassNameGenerator.java
│ │ │ ├── Configuration.java
│ │ │ ├── FieldNameGenerator.java
│ │ │ ├── Identifiers.java
│ │ │ ├── ModelBuilder.java
│ │ │ ├── NodeImplBuilder.java
│ │ │ ├── NodeModelBuilder.java
│ │ │ ├── NodeNameGenerator.java
│ │ │ ├── PropertyDefinition.java
│ │ │ ├── RelationshipFactoryDefinition.java
│ │ │ ├── RelationshipImplBuilder.java
│ │ │ ├── RelationshipModelBuilder.java
│ │ │ ├── RelationshipNameGenerator.java
│ │ │ ├── RelationshipPropertyDefinition.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ └── java/
│ │ └── org/
│ │ └── neo4j/
│ │ └── cypherdsl/
│ │ └── codegen/
│ │ └── core/
│ │ ├── ConfigurationTests.java
│ │ ├── ConstantFieldNamingStrategyTests.java
│ │ ├── ModelBuilderTests.java
│ │ ├── NodeImplBuilderTests.java
│ │ ├── NodeNameGeneratorTests.java
│ │ └── RelationshipNameGeneratorTests.java
│ ├── neo4j-cypher-dsl-codegen-ogm/
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── org/
│ │ │ │ └── neo4j/
│ │ │ │ └── cypherdsl/
│ │ │ │ └── codegen/
│ │ │ │ └── ogm/
│ │ │ │ ├── OGMAnnotationProcessor.java
│ │ │ │ └── package-info.java
│ │ │ └── resources/
│ │ │ └── META-INF/
│ │ │ └── services/
│ │ │ └── javax.annotation.processing.Processor
│ │ └── test/
│ │ ├── java/
│ │ │ └── org/
│ │ │ └── neo4j/
│ │ │ └── cypherdsl/
│ │ │ └── codegen/
│ │ │ └── ogm/
│ │ │ ├── OGMAnnotationProcessorTests.java
│ │ │ └── models/
│ │ │ ├── abstract_rels/
│ │ │ │ ├── Actor.java
│ │ │ │ ├── Movie.java
│ │ │ │ └── Person.java
│ │ │ ├── different_properties_for_rel_type/
│ │ │ │ ├── Movie.java
│ │ │ │ ├── MovieAppearance.java
│ │ │ │ ├── Person.java
│ │ │ │ ├── Play.java
│ │ │ │ ├── TheaterAppearance.java
│ │ │ │ └── package-info.java
│ │ │ ├── enums_and_inner_classes/
│ │ │ │ ├── AnotherConverter.java
│ │ │ │ ├── ConnectorTransport.java
│ │ │ │ ├── InnerInnerClassConverter.java
│ │ │ │ └── OtherEnum.java
│ │ │ ├── ids/
│ │ │ │ ├── ExternalGeneratedId.java
│ │ │ │ ├── ExternalGeneratedIdImplicit.java
│ │ │ │ ├── InternalGeneratedId.java
│ │ │ │ └── InternalGeneratedPrimitiveLongId.java
│ │ │ ├── labels/
│ │ │ │ └── NodesWithDifferentLabelAnnotations.java
│ │ │ ├── primitives/
│ │ │ │ └── Connector.java
│ │ │ ├── records/
│ │ │ │ ├── NodeWithRecordProperties.java
│ │ │ │ └── RecordTarget.java
│ │ │ ├── same_properties_for_rel_type/
│ │ │ │ ├── Movie.java
│ │ │ │ ├── MovieAppearance.java
│ │ │ │ ├── Person.java
│ │ │ │ ├── Play.java
│ │ │ │ ├── TheaterAppearance.java
│ │ │ │ └── package-info.java
│ │ │ ├── same_rel_different_source/
│ │ │ │ ├── Book.java
│ │ │ │ ├── Movie.java
│ │ │ │ └── Person.java
│ │ │ ├── same_rel_different_target/
│ │ │ │ ├── Book.java
│ │ │ │ ├── Movie.java
│ │ │ │ ├── Person.java
│ │ │ │ └── package-info.java
│ │ │ ├── same_rel_mixed/
│ │ │ │ ├── Book.java
│ │ │ │ ├── Movie.java
│ │ │ │ └── Person.java
│ │ │ ├── same_rel_mixed_different_directions/
│ │ │ │ ├── Book.java
│ │ │ │ ├── Movie.java
│ │ │ │ └── Person.java
│ │ │ ├── self_referential/
│ │ │ │ └── Example.java
│ │ │ └── simple/
│ │ │ ├── Actor.java
│ │ │ ├── Movie.java
│ │ │ ├── Person.java
│ │ │ └── package-info.java
│ │ └── resources/
│ │ ├── abstract_rels/
│ │ │ ├── Directed_.java
│ │ │ ├── Movie_.java
│ │ │ └── Person_.java
│ │ ├── different_properties_for_rel_type/
│ │ │ ├── ActedInMovie_.java
│ │ │ ├── ActedInPlay_.java
│ │ │ ├── Movie_.java
│ │ │ ├── Person_.java
│ │ │ └── Play_.java
│ │ ├── enums_and_inner_classes/
│ │ │ └── ConnectorTransport_.java
│ │ ├── ids/
│ │ │ ├── ExternalGeneratedIdImplicit_.java
│ │ │ ├── ExternalGeneratedId_.java
│ │ │ ├── InternalGeneratedId_.java
│ │ │ └── InternalGeneratedPrimitiveLongId_.java
│ │ ├── labels/
│ │ │ └── nodeswithdifferentlabelannotations/
│ │ │ ├── LabelOnNode1_.java
│ │ │ └── LabelOnNode2_.java
│ │ ├── org/
│ │ │ └── neo4j/
│ │ │ └── cypherdsl/
│ │ │ └── codegen/
│ │ │ └── ogm/
│ │ │ └── models/
│ │ │ └── related_classes_not_on_cp_like_in_reallife/
│ │ │ ├── Movie.java
│ │ │ └── Person.java
│ │ ├── primitives/
│ │ │ └── Connector_.java
│ │ ├── records/
│ │ │ ├── NodeWithRecordProperties_.java
│ │ │ ├── RecordAsRelationship_.java
│ │ │ └── RecordTarget_.java
│ │ ├── related_classes_not_on_cp_like_in_reallife/
│ │ │ ├── Movie_.java
│ │ │ └── Person_.java
│ │ ├── same_properties_for_rel_type/
│ │ │ ├── ActedIn_.java
│ │ │ ├── Movie_.java
│ │ │ ├── Person_.java
│ │ │ └── Play_.java
│ │ ├── same_rel_different_source/
│ │ │ ├── Book_.java
│ │ │ ├── Movie_.java
│ │ │ ├── Person_.java
│ │ │ └── Wrote_.java
│ │ ├── same_rel_different_target/
│ │ │ ├── Book_.java
│ │ │ ├── Movie_.java
│ │ │ ├── Person_.java
│ │ │ └── Wrote_.java
│ │ ├── same_rel_mixed/
│ │ │ ├── Book_.java
│ │ │ ├── Movie_.java
│ │ │ ├── Person_.java
│ │ │ └── Wrote_.java
│ │ ├── same_rel_mixed_different_directions/
│ │ │ ├── Book_.java
│ │ │ ├── Movie_.java
│ │ │ ├── Person_.java
│ │ │ └── Wrote_.java
│ │ ├── self_referential/
│ │ │ └── Example_.java
│ │ └── simple/
│ │ ├── ActedIn_.java
│ │ ├── Directed_.java
│ │ ├── Follows_.java
│ │ ├── Movie_.java
│ │ ├── Person_.java
│ │ └── Produced_.java
│ ├── neo4j-cypher-dsl-codegen-sdn6/
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── org/
│ │ │ │ └── neo4j/
│ │ │ │ └── cypherdsl/
│ │ │ │ └── codegen/
│ │ │ │ └── sdn6/
│ │ │ │ ├── SDN6AnnotationProcessor.java
│ │ │ │ └── package-info.java
│ │ │ └── resources/
│ │ │ └── META-INF/
│ │ │ └── services/
│ │ │ └── javax.annotation.processing.Processor
│ │ └── test/
│ │ ├── java/
│ │ │ └── org/
│ │ │ └── neo4j/
│ │ │ └── cypherdsl/
│ │ │ └── codegen/
│ │ │ └── sdn6/
│ │ │ ├── SDN6AnnotationProcessorTests.java
│ │ │ └── models/
│ │ │ ├── abstract_rels/
│ │ │ │ ├── Actor.java
│ │ │ │ ├── Movie.java
│ │ │ │ └── Person.java
│ │ │ ├── bidi/
│ │ │ │ ├── Element.java
│ │ │ │ └── Point.java
│ │ │ ├── different_properties_for_rel_type/
│ │ │ │ ├── Movie.java
│ │ │ │ ├── MovieAppearance.java
│ │ │ │ ├── Person.java
│ │ │ │ ├── Play.java
│ │ │ │ ├── TheaterAppearance.java
│ │ │ │ └── package-info.java
│ │ │ ├── enums_and_inner_classes/
│ │ │ │ ├── ConnectorTransport.java
│ │ │ │ ├── InnerInnerClassConverter.java
│ │ │ │ ├── OtherEnum.java
│ │ │ │ └── SpringBasedConverter.java
│ │ │ ├── ids/
│ │ │ │ ├── ExternalGeneratedId.java
│ │ │ │ ├── ExternalGeneratedIdImplicit.java
│ │ │ │ ├── InternalGeneratedId.java
│ │ │ │ ├── InternalGeneratedIdWithSpringId.java
│ │ │ │ └── InternalGeneratedPrimitiveLongId.java
│ │ │ ├── labels/
│ │ │ │ └── NodesWithDifferentLabelAnnotations.java
│ │ │ ├── primitives/
│ │ │ │ └── Connector.java
│ │ │ ├── records/
│ │ │ │ ├── NodeWithRecordProperties.java
│ │ │ │ └── RecordTarget.java
│ │ │ ├── same_properties_for_rel_type/
│ │ │ │ ├── Movie.java
│ │ │ │ ├── MovieAppearance.java
│ │ │ │ ├── Person.java
│ │ │ │ ├── Play.java
│ │ │ │ ├── TheaterAppearance.java
│ │ │ │ └── package-info.java
│ │ │ ├── same_rel_different_package/
│ │ │ │ ├── application/
│ │ │ │ │ ├── CompanyModel.java
│ │ │ │ │ └── PlaceModel.java
│ │ │ │ └── domain/
│ │ │ │ ├── Company.java
│ │ │ │ ├── DomainEntity.java
│ │ │ │ ├── DomainEntity2.java
│ │ │ │ └── Place.java
│ │ │ ├── same_rel_different_source/
│ │ │ │ ├── Book.java
│ │ │ │ ├── Movie.java
│ │ │ │ └── Person.java
│ │ │ ├── same_rel_different_target/
│ │ │ │ ├── Book.java
│ │ │ │ ├── Movie.java
│ │ │ │ ├── Person.java
│ │ │ │ └── package-info.java
│ │ │ ├── same_rel_mixed/
│ │ │ │ ├── Book.java
│ │ │ │ ├── Movie.java
│ │ │ │ └── Person.java
│ │ │ ├── same_rel_mixed_different_directions/
│ │ │ │ ├── Book.java
│ │ │ │ ├── Movie.java
│ │ │ │ └── Person.java
│ │ │ ├── self_referential/
│ │ │ │ └── Example.java
│ │ │ └── simple/
│ │ │ ├── Actor.java
│ │ │ ├── Bridge.java
│ │ │ ├── Edge.java
│ │ │ ├── Kante.java
│ │ │ ├── Movie.java
│ │ │ ├── Person.java
│ │ │ ├── Src.java
│ │ │ ├── Target.java
│ │ │ ├── Target2.java
│ │ │ ├── Target3.java
│ │ │ ├── TotallyIgnored.java
│ │ │ └── package-info.java
│ │ └── resources/
│ │ ├── abstract_rels/
│ │ │ ├── Directed_.java
│ │ │ ├── Movie_.java
│ │ │ └── Person_.java
│ │ ├── bidi/
│ │ │ ├── Element_.java
│ │ │ ├── HasPathPoints_.java
│ │ │ └── Point_.java
│ │ ├── different_properties_for_rel_type/
│ │ │ ├── ActedInMovie_.java
│ │ │ ├── ActedInPlay_.java
│ │ │ ├── Movie_.java
│ │ │ ├── Person_.java
│ │ │ └── Play_.java
│ │ ├── enums_and_inner_classes/
│ │ │ ├── ConnectorTransportWithGlobalConverter_.java
│ │ │ └── ConnectorTransport_.java
│ │ ├── ids/
│ │ │ ├── ExternalGeneratedIdImplicit_.java
│ │ │ ├── ExternalGeneratedId_.java
│ │ │ ├── InternalGeneratedIdWithSpringId_.java
│ │ │ ├── InternalGeneratedId_.java
│ │ │ └── InternalGeneratedPrimitiveLongId_.java
│ │ ├── labels/
│ │ │ └── nodeswithdifferentlabelannotations/
│ │ │ ├── LabelOnNode1_.java
│ │ │ ├── LabelOnNode2_.java
│ │ │ ├── LabelOnNode3_.java
│ │ │ ├── MultipleLabels1_.java
│ │ │ ├── MultipleLabels2_.java
│ │ │ └── MultipleLabels3_.java
│ │ ├── org/
│ │ │ └── neo4j/
│ │ │ └── cypherdsl/
│ │ │ └── codegen/
│ │ │ └── sdn6/
│ │ │ └── models/
│ │ │ └── related_classes_not_on_cp_like_in_reallife/
│ │ │ ├── Movie.java
│ │ │ └── Person.java
│ │ ├── primitives/
│ │ │ └── Connector_.java
│ │ ├── records/
│ │ │ ├── NodeWithRecordProperties_.java
│ │ │ ├── RecordAsRelationship_.java
│ │ │ └── RecordTarget_.java
│ │ ├── related_classes_not_on_cp_like_in_reallife/
│ │ │ ├── Directed_.java
│ │ │ ├── Movie_.java
│ │ │ └── Person_.java
│ │ ├── same_properties_for_rel_type/
│ │ │ ├── ActedIn_.java
│ │ │ ├── Movie_.java
│ │ │ ├── Person_.java
│ │ │ └── Play_.java
│ │ ├── same_rel_different_package/
│ │ │ ├── Abuses1_.java
│ │ │ ├── CompanyModel_.java
│ │ │ ├── Company_.java
│ │ │ ├── DomainEntity2_.java
│ │ │ ├── DomainEntity_.java
│ │ │ ├── In1_.java
│ │ │ ├── In2_.java
│ │ │ ├── PlaceModel_.java
│ │ │ ├── Place_.java
│ │ │ ├── Uses1_.java
│ │ │ └── Uses2_.java
│ │ ├── same_rel_different_source/
│ │ │ ├── Book_.java
│ │ │ ├── Movie_.java
│ │ │ ├── Person_.java
│ │ │ └── Wrote_.java
│ │ ├── same_rel_different_target/
│ │ │ ├── Book_.java
│ │ │ ├── Movie_.java
│ │ │ ├── Person_.java
│ │ │ └── Wrote_.java
│ │ ├── same_rel_mixed/
│ │ │ ├── Book_.java
│ │ │ ├── Movie_.java
│ │ │ ├── Person_.java
│ │ │ └── Wrote_.java
│ │ ├── same_rel_mixed_different_directions/
│ │ │ ├── Book_.java
│ │ │ ├── Movie_.java
│ │ │ ├── Person_.java
│ │ │ └── Wrote_.java
│ │ ├── self_referential/
│ │ │ ├── BelongsTo_.java
│ │ │ └── Example_.java
│ │ └── simple/
│ │ ├── ActedIn_.java
│ │ ├── Directed_.java
│ │ ├── Follows_.java
│ │ ├── Movie_.java
│ │ ├── Person_.java
│ │ ├── Produced_.java
│ │ ├── Rel21_.java
│ │ ├── Rel22_.java
│ │ ├── Src_.java
│ │ └── Target2_.java
│ └── pom.xml
├── neo4j-cypher-dsl-examples/
│ ├── README.adoc
│ ├── neo4j-cypher-dsl-examples-core/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── test/
│ │ └── java/
│ │ └── org/
│ │ └── neo4j/
│ │ └── cypherdsl/
│ │ └── examples/
│ │ ├── core/
│ │ │ ├── ArbitraryProceduresAndFunctionsTests.java
│ │ │ ├── CypherDSLExamplesTests.java
│ │ │ ├── FunctionsListTests.java
│ │ │ ├── IssuesExamplesTests.java
│ │ │ └── PropertiesTests.java
│ │ └── model/
│ │ ├── AbstractNodeDefinition.java
│ │ ├── AbstractRelationshipDefinition.java
│ │ ├── ActedIn.java
│ │ ├── BelongsTo.java
│ │ ├── Department.java
│ │ ├── Directed.java
│ │ ├── Division.java
│ │ ├── Movie.java
│ │ ├── Person.java
│ │ ├── StaticModelIT.java
│ │ └── UnboundRelation.java
│ ├── neo4j-cypher-dsl-examples-ogm-quarkus/
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── org/
│ │ │ │ └── neo4j/
│ │ │ │ └── cypherdsl/
│ │ │ │ └── examples/
│ │ │ │ └── ogm/
│ │ │ │ ├── books/
│ │ │ │ │ ├── Book.java
│ │ │ │ │ ├── BookGenre.java
│ │ │ │ │ ├── UserDetails.java
│ │ │ │ │ ├── UserPreferences.java
│ │ │ │ │ ├── UserSuggestionActivity.java
│ │ │ │ │ └── package-info.java
│ │ │ │ ├── misc/
│ │ │ │ │ ├── Example.java
│ │ │ │ │ └── package-info.java
│ │ │ │ └── movies/
│ │ │ │ ├── Actor.java
│ │ │ │ ├── Movie.java
│ │ │ │ ├── MovieRepository.java
│ │ │ │ ├── MovieResource.java
│ │ │ │ ├── PeopleRepository.java
│ │ │ │ ├── PeopleResource.java
│ │ │ │ ├── Person.java
│ │ │ │ └── package-info.java
│ │ │ └── resources/
│ │ │ └── application.properties
│ │ └── test/
│ │ ├── java/
│ │ │ └── org/
│ │ │ └── neo4j/
│ │ │ └── cypherdsl/
│ │ │ └── examples/
│ │ │ └── ogm/
│ │ │ ├── Neo4jOgmResourcesIT.java
│ │ │ ├── UsageTests.java
│ │ │ └── books/
│ │ │ └── ScopingTests.java
│ │ └── resources/
│ │ └── movies.cypher
│ ├── neo4j-cypher-dsl-examples-parser/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── test/
│ │ └── java/
│ │ └── org/
│ │ └── neo4j/
│ │ └── cypherdsl/
│ │ └── examples/
│ │ └── parser/
│ │ ├── ConditionExtractingMatchFactory.java
│ │ ├── CypherDSLParserExamplesTests.java
│ │ └── StatementCatalogBuildingVisitorViaParserTests.java
│ ├── neo4j-cypher-dsl-examples-sdn6/
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── org/
│ │ │ │ └── neo4j/
│ │ │ │ └── cypherdsl/
│ │ │ │ └── examples/
│ │ │ │ └── sdn6/
│ │ │ │ ├── Application.java
│ │ │ │ ├── books/
│ │ │ │ │ ├── Book.java
│ │ │ │ │ ├── BookGenre.java
│ │ │ │ │ ├── UserDetails.java
│ │ │ │ │ ├── UserPreferences.java
│ │ │ │ │ ├── UserSuggestionActivity.java
│ │ │ │ │ └── package-info.java
│ │ │ │ ├── misc/
│ │ │ │ │ ├── Example.java
│ │ │ │ │ └── package-info.java
│ │ │ │ ├── movies/
│ │ │ │ │ ├── Actor.java
│ │ │ │ │ ├── Genre.java
│ │ │ │ │ ├── GenreRepository.java
│ │ │ │ │ ├── Movie.java
│ │ │ │ │ ├── MovieRepository.java
│ │ │ │ │ ├── MovieService.java
│ │ │ │ │ ├── MoviesController.java
│ │ │ │ │ ├── NewPersonCmd.java
│ │ │ │ │ ├── PeopleController.java
│ │ │ │ │ ├── PeopleRepository.java
│ │ │ │ │ ├── PeopleService.java
│ │ │ │ │ ├── Person.java
│ │ │ │ │ ├── PersonDetails.java
│ │ │ │ │ └── package-info.java
│ │ │ │ └── package-info.java
│ │ │ └── resources/
│ │ │ └── application.properties
│ │ └── test/
│ │ ├── java/
│ │ │ └── org/
│ │ │ └── neo4j/
│ │ │ └── cypherdsl/
│ │ │ └── examples/
│ │ │ └── sdn6/
│ │ │ ├── ApplicationIT.java
│ │ │ ├── UsageTests.java
│ │ │ └── books/
│ │ │ └── ScopingTests.java
│ │ └── resources/
│ │ ├── logback-test.xml
│ │ └── movies.cypher
│ └── pom.xml
├── neo4j-cypher-dsl-native-tests/
│ ├── README.adoc
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── org/
│ │ └── neo4j/
│ │ └── cypherdsl/
│ │ └── graalvm/
│ │ ├── Application.java
│ │ └── package-info.java
│ └── test/
│ └── java/
│ └── org/
│ └── neo4j/
│ └── cypherdsl/
│ └── graalvm/
│ └── NativeApplicationIT.java
├── neo4j-cypher-dsl-parser/
│ ├── NOTICE.txt
│ ├── README.adoc
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ └── java/
│ │ ├── module-info.java
│ │ └── org/
│ │ └── neo4j/
│ │ └── cypherdsl/
│ │ └── parser/
│ │ ├── CyperDslParseException.java
│ │ ├── CypherDslASTExceptionFactory.java
│ │ ├── CypherDslASTFactory.java
│ │ ├── CypherParser.java
│ │ ├── DatabaseName.java
│ │ ├── EntityType.java
│ │ ├── ExpressionAsPatternElementWrapper.java
│ │ ├── ExpressionCreatedEventType.java
│ │ ├── InfinityLiteral.java
│ │ ├── InputPosition.java
│ │ ├── InvocationCreatedEventType.java
│ │ ├── LabelParsedEventType.java
│ │ ├── MatchDefinition.java
│ │ ├── NaNLiteral.java
│ │ ├── NodeAtom.java
│ │ ├── Options.java
│ │ ├── ParenthesizedPathPatternAtom.java
│ │ ├── PathAtom.java
│ │ ├── PathLength.java
│ │ ├── PatternAtom.java
│ │ ├── PatternElementAsExpressionWrapper.java
│ │ ├── PatternElementCreatedEventType.java
│ │ ├── PatternElementFunctions.java
│ │ ├── ReturnDefinition.java
│ │ ├── Statements.java
│ │ ├── TypeParsedEventType.java
│ │ ├── UnsupportedCypherException.java
│ │ └── package-info.java
│ └── test/
│ ├── java/
│ │ └── org/
│ │ └── neo4j/
│ │ └── cypherdsl/
│ │ └── parser/
│ │ ├── ComparisonIT.java
│ │ ├── CypherChallengeTests.java
│ │ ├── CypherDslASTFactoryTests.java
│ │ ├── CypherParserTests.java
│ │ ├── ExtractionIT.java
│ │ ├── IdentifiableExpressionsTests.java
│ │ ├── OptionsTests.java
│ │ ├── ParserIssuesIT.java
│ │ ├── PathLengthTests.java
│ │ ├── QPPPrimerIT.java
│ │ ├── RewriteTests.java
│ │ ├── StatementsTests.java
│ │ ├── TckTests.java
│ │ └── UnsupportedCypherExceptionTests.java
│ └── resources/
│ ├── cypher-challenge.csv
│ └── qpp-primer.csv
├── neo4j-cypher-dsl-schema-name-support/
│ ├── README.adoc
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ └── java/
│ │ ├── module-info.java
│ │ └── org/
│ │ └── neo4j/
│ │ └── cypherdsl/
│ │ └── support/
│ │ └── schema_name/
│ │ ├── SchemaNames.java
│ │ └── package-info.java
│ └── test/
│ └── java/
│ └── org/
│ └── neo4j/
│ └── cypherdsl/
│ └── support/
│ └── schema_name/
│ ├── SchemaNamesIT.java
│ └── SchemaNamesTests.java
├── neo4j-cypher-dsl-test-results/
│ └── pom.xml
└── pom.xml
================================================
FILE CONTENTS
================================================
================================================
FILE: .git-blame-ignore-revs
================================================
8f35f73471d06957498b5fc09dd83ceb49fd342b
================================================
FILE: .github/CODEOWNERS
================================================
/.github/ @michael-simons @meistermeier
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: true
================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: weekly
time: "04:00"
open-pull-requests-limit: 10
================================================
FILE: .github/workflows/build.yml
================================================
name: build
on:
push:
branches:
- main
pull_request:
jobs:
build:
name: Neo4j Cypher-DSL
runs-on: ubuntu-latest
outputs:
revision: ${{ steps.revision_step.outputs.revision }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 25
- name: Enable Sonar for local PRs not from Dependabot
if: ${{ github.event.sender.login != 'dependabot[bot]' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
run: echo "USE_SONAR=sonar" >> $GITHUB_ENV
- name: Disable Sonar for foreign PRs or from Dependabot
if: ${{ github.event.sender.login == 'dependabot[bot]' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }}
run: echo "USE_SONAR=-sonar" >> $GITHUB_ENV
- name: Determine revision
id: revision_step
run: |
REVISION=$(./bin/extract-version.sh)
echo "REVISION=$REVISION" >> $GITHUB_ENV
echo "OLD_VERSION=$(./bin/extract-version.sh latest)" >> $GITHUB_ENV
echo "::set-output name=revision::$REVISION"
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Run Maven build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: >
./mvnw --no-transfer-progress clean deploy -DSCHEMA_NAMES_TEST_ALL_VERSIONS=false -P$USE_SONAR -Drevision=$REVISION -Dsha1=-$GITHUB_SHA -Dchangelist= -Dcypher-dsl.version.old=$OLD_VERSION
-DaltDeploymentRepository=releases::default::file://$GITHUB_WORKSPACE/target/repository
-pl !org.neo4j:neo4j-cypher-dsl-native-tests
-pl !org.neo4j:neo4j-cypher-dsl-examples-core
-pl !org.neo4j:neo4j-cypher-dsl-examples-parser
-pl !org.neo4j:neo4j-cypher-dsl-examples-ogm-quarkus
-pl !org.neo4j:neo4j-cypher-dsl-examples-sdn6
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: artifacts
path: target/repository
test_native:
name: Verify compilation on GraalVM native
runs-on: ubuntu-latest
needs: build
steps:
- uses: graalvm/setup-graalvm@v1
with:
distribution: 'graalvm-community'
java-version: 25
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Determine revision
run: echo "REVISION=${{ needs.build.outputs.revision }}" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: artifacts
path: repository
- name: Install dependencies
run: "mkdir -p ~/.m2 && mv $GITHUB_WORKSPACE/repository ~/.m2"
- name: Run Maven build
run: >
./mvnw --no-transfer-progress clean verify -Djqassistant.skip=true -Drevision=$REVISION -Dsha1=-$GITHUB_SHA -Dchangelist=
-pl org.neo4j:neo4j-cypher-dsl-native-tests
build_examples:
name: Verify examples with ${{ matrix.java }}
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17', '21', '25' ]
needs: build
steps:
- name: Determine revision
run: echo "REVISION=${{ needs.build.outputs.revision }}" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: artifacts
path: repository
- name: Install dependencies
run: "mkdir -p $HOME/.m2 && mv $GITHUB_WORKSPACE/repository $HOME/.m2/"
- uses: actions/setup-java@v4
with:
distribution: zulu
java-version: ${{ matrix.java }}
- name: Run Maven build
run: >
./mvnw --no-transfer-progress clean verify -Djqassistant.skip=true -Drevision=$REVISION -Dsha1=-$GITHUB_SHA -Dchangelist=
-pl org.neo4j:neo4j-cypher-dsl-examples
-pl org.neo4j:neo4j-cypher-dsl-examples-core
-pl org.neo4j:neo4j-cypher-dsl-examples-parser
-pl org.neo4j:neo4j-cypher-dsl-examples-ogm-quarkus
-pl org.neo4j:neo4j-cypher-dsl-examples-sdn6
================================================
FILE: .github/workflows/publish_docs.yml
================================================
name: publish_docs
on:
push:
branches:
- main
create:
tags:
- '*'
jobs:
publish_docs:
if: github.event_name == 'push' || (github.event_name == 'create' && github.event.ref_type == 'tag')
runs-on: ubuntu-latest
steps:
- name: Prepare branch name
run: >
echo "refName=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Checkout relevant branch
uses: actions/checkout@v4
with:
ref: ${{ env.refName }}
- name: Checkout gh-pages
uses: actions/checkout@v4
with:
ref: gh-pages
path: target/gh-pages
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 25
- name: Run docs generation
run: >
./mvnw --no-transfer-progress install -pl neo4j-cypher-dsl-bom &&
./mvnw --no-transfer-progress asciidoctor:process-asciidoc@generate-docs -pl org.neo4j:neo4j-cypher-dsl-parent -Dproject.build.docs=target/gh-pages/${refName} -Duse-latest-version-for-docs=`[ $refName = "main" ] && echo "0" || echo "1"` &&
./mvnw --no-transfer-progress site -pl org.neo4j:neo4j-cypher-dsl-build-proc -pl org.neo4j:neo4j-cypher-dsl -am &&
rm -rf target/gh-pages/${refName}/project-info &&
mv neo4j-cypher-dsl/target/site target/gh-pages/${refName}/project-info
- name: Update index
if: (github.event_name == 'create' && github.event.ref_type == 'tag')
run: sed -e "s/\${current}/${refName}/g" ./etc/index.tpl > ./target/gh-pages/index.html
- name: Commit to gh-pages
working-directory: ./target/gh-pages
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update GH-Pages."
- name: Push changes
uses: ad-m/github-push-action@v0.6.0
with:
directory: target/gh-pages
branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
================================================
FILE: .github/workflows/release.yml
================================================
name: release
on:
workflow_dispatch:
create:
tags:
- '*'
jobs:
release:
if: (github.event_name == 'create' && github.event.ref_type == 'tag') || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: 'Set up JDK'
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 25
- name: 'Prepare git'
run: git config --global core.autocrlf false
- name: 'Prepare branch name'
if: (github.event_name == 'create' && github.event.ref_type == 'tag')
run: >
echo "refName=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: 'Checkout relevant branch'
uses: actions/checkout@v4
with:
ref: ${{ env.refName }}
fetch-depth: 0
- name: Determine revision
id: revision_step
run: |
REVISION=$(./bin/extract-version.sh latest)
echo "REVISION=$REVISION" >> $GITHUB_ENV
- name: 'Create release'
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.JRELEASER_TOKEN }}
JRELEASER_SLACK_WEBHOOK: ${{ secrets.JRELEASER_SLACK_WEBHOOK }}
run: ./mvnw --no-transfer-progress -Djreleaser -Drevision=$REVISION -Dsha1= -Dchangelist= jreleaser:announce -pl org.neo4j:neo4j-cypher-dsl-parent
================================================
FILE: .gitignore
================================================
target/
!.mvn/wrapper/maven-wrapper.jar
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
.gradle
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
/build/
### Visual Studio Code ###
.vscode
### Misc ###
.DS_Store
.flattened-pom.xml
dependency-reduced-pom.xml
================================================
FILE: .mvn/extensions.xml
================================================
org.torquebox.mojomavengem-wagon1.0.3
================================================
FILE: .mvn/jvm.config
================================================
-XX:+IgnoreUnrecognizedVMOptions
-Dguice_custom_class_loading=CHILD
--enable-native-access=ALL-UNNAMED
================================================
FILE: .mvn/wrapper/maven-wrapper.properties
================================================
wrapperVersion=3.3.4
distributionType=bin
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.4/maven-wrapper-3.3.4.jar
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
admins@neo4j.com.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
================================================
FILE: CONTRIBUTING.adoc
================================================
= Contributing to the Neo4j Ecosystem
:sectanchors:
At http://neo4j.com/[Neo4j], we develop our software in the open at
GitHub. This provides transparency for you, our users, and allows you to
fork the software to make your own additions and enhancements. We also
provide areas specifically for community contributions, in particular
the https://github.com/neo4j-contrib[neo4j-contrib] space.
There's an active https://community.neo4j.com/[Neo4j Online Community]
where we work directly with the community. If you're not already a
member, sign up!
We love our community and wouldn't be where we are without you. Please remember:
Many things are contributions, among them issues, code, documentation and examples.
== Building and compiling the Neo4j-Cypher-DSL
// tag::building-manual[]
=== Requirements
For the full project, including examples and native tests:
* https://www.graalvm.org/release-notes/JDK_24/[GraalVM for JDK 24]
For the project, including examples but skipping native tests:
* JDK 17+ (Can be https://openjdk.java.net[OpenJDK] or https://www.oracle.com/technetwork/java/index.html[Oracle JDK])
Maven 3.8.4 is our build tool of choice. We provide the Maven wrapper, see `mvnw` respectively `mvnw.cmd` in the project root;
the wrapper downloads the appropriate Maven version automatically.
The build requires a local copy of the project:
[source,console,subs="verbatim,attributes"]
[[clone-cypher-dsl]]
.Clone the Neo4j Cypher-DSL
----
$ git clone git@github.com:neo4j-contrib/cypher-dsl.git
----
=== Fast build
NOTE: This is useful if you want to just have an installation of a snapshot version. No tests are run, no verification is done.
[source,console,subs="verbatim,attributes"]
[[build-fast-bash]]
.Fast build (only compiling and producing packages)
----
$ ./mvnw -Dfast package
----
For a local install - maybe to try out a future release - you can also specify the version number:
[source,console,subs="verbatim,attributes"]
[[build-fast-and-install-bash]]
.Fast build (locally installed, with an artificial version number)
----
$ ./mvnw -Dfast -Drevision=1337 -Dchangelist= install
----
=== Full build (including examples and native tests)
Before you proceed, verify your locally installed JDK version.
The output should be similar:
[source,console,subs="verbatim,attributes"]
[[verify-jdk]]
.Verify your JDK
----
$ java -version
openjdk version "24" 2025-03-18
OpenJDK Runtime Environment GraalVM CE 24+36.1 (build 24+36-jvmci-b01)
OpenJDK 64-Bit Server VM GraalVM CE 24+36.1 (build 24+36-jvmci-b01, mixed mode, sharing)
----
Check whether GraalVM `native-image` is present with:
[source,console,subs="verbatim,attributes"]
[[verify-native-image]]
.Check for the present of `native-image`
----
$ which native-image
/Users/msimons/.sdkman/candidates/java/24-graalce/bin/native-image
----
You should see `native-image` in the list. If not, you are most likely on a GraalVM version we don't support with this project.
After that, use `./mvnw` on a Unix-like operating system to build the Cypher-DSL:
[source,console,subs="verbatim,attributes"]
[[build-default-bash]]
.Build with default settings on Linux / macOS
----
$ ./mvnw clean verify
----
On a Windows machine, use
[source,console,subs="verbatim,attributes"]
[[build-default-windows]]
.Build with default settings on Windows
----
$ mvnw.cmd clean verify
----
=== Skipping native tests
On a plain JDK 17 or higher, run the following to skip the native tests:
[source,console,subs="verbatim,attributes"]
[[build-skip-native-bash]]
.Skipping native tests
----
$ ./mvnw clean verify -pl \!org.neo4j:neo4j-cypher-dsl-native-tests
----
=== Build only the core module
The core module can be built on plain JDK 17 with:
[source,console,subs="verbatim,attributes"]
[[build-only-core-bash]]
.Build only the core module
----
$ ./mvnw clean verify -am -pl org.neo4j:neo4j-cypher-dsl
----
=== CI-friendly version numbers
We use CI-friendly version numbers, the current build will always identify itself as 9999-SNAPSHOT.
If you need to create a specific version you can specify the revision, the changelist and an optional hash like this:
[source,console,subs="verbatim,attributes"]
.Specifying revision and changelist
----
$ ./mvnw clean package -pl org.neo4j:neo4j-cypher-dsl -Drevision=2022.1.0 -Dchangelist=-SNAPSHOT
----
=== Releasing (Only relevant for the current maintainers)
Prepare a release with:
[source,console,subs="verbatim,attributes"]
----
./mvnw exec:exec@prepare-release -pl :neo4j-cypher-dsl-parent -Drevision=2020.0.1 -Dchangelist= -Dcypher-dsl.version.next=2020.0.2-SNAPSHOT
----
and then let do Teamcity the rest, but chose the same version number there, too.
// end::building-manual[]
== Tasks
=== Keep the build descriptor (`pom.xml`) sorted
[source,bash]
----
./mvnw sortpom:sort
----
=== Formatting sources / adding headers
When you add new files, you can run
[source,bash]
----
./mvnw license:format
----
to add required headers automatically.
We use https://github.com/spring-io/spring-javaformat[spring-javaformat] to format the source files.
[source,bash]
----
./mvnw spring-javaformat:apply
----
TIP: The Spring Developers write: "The source formatter does not fundamentally change your code. For example, it will not change the order of import statements. It is effectively limited to adding or removing whitespace and line feeds."
This means the following checkstyle check might still fail.
Some common errors include the wrong import order.
There are plugins for https://github.com/spring-io/spring-javaformat#eclipse[Eclipse] and https://github.com/spring-io/spring-javaformat#intellij-idea[IntelliJ IDEA] and the Checkstyle settings https://github.com/spring-io/spring-javaformat#checkstyle-idea-plugin[can be imported as well].
We took those "as is" and just disabled the lambda check (requiring even single parameters to have parenthesis).
Public classes do require an author tag.
Please add yourself as an `@author` to the `.java` files you added or that modified substantially (more than cosmetic changes).
== General considerations
=== Need to raise an issue?
Where you raise an issue depends largely on the nature of the problem.
Firstly, if you are an Enterprise customer, you might want to head over
to our http://support.neo4j.com/[Customer Support Portal].
There are plenty of public channels available too, though. If you simply
want to get started or have a question on how to use a particular
feature, ask a question in https://community.neo4j.com/[Neo4j Online
Community]. If you think you might have hit a bug in our software (it
happens occasionally!) or you have specific feature request then use the
issue feature on the relevant GitHub repository. Check first though as
someone else may have already raised something similar.
http://stackoverflow.com/questions/tagged/neo4j[StackOverflow] also
hosts a ton of questions and might already have a discussion around your
problem. Make sure you have a look there too.
Include as much information as you can in any request you make:
* Which versions of our products are you using?
* Which language (and which version of that language) are you developing
with?
* What operating system are you on?
* Are you working with a cluster or on a single machine?
* What code are you running?
* What errors are you seeing?
* What solutions have you tried already?
=== Want to contribute?
It's easier for all of us if you try to follow these steps before creating a pull request:
* Do all your work in a personal fork of the original repository
* https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request[Rebase],
don't merge (we prefer to keep our history clean)
* Create a branch (with a useful name) for your contribution
* Make sure you're familiar with the appropriate coding style (this
varies by language so ask if you're in doubt)
* Include unit tests if appropriate (obviously not necessary for
documentation changes)
NOTE: Small things that doesn't change the public API or documented behaviour and of course bug fixes usually
go in quickly. If you want to add new features with public API changes or additions or want to customize or
change a feature, please do reach out to us on one of the available channels, preferable by creating a
https://github.com/neo4j-contrib/cypher-dsl/issues/new[new issue] first in which we can discuss the proposed changes.
We can't guarantee that we'll accept pull requests and may ask you to
make some changes before they go in. Occasionally, we might also have
logistical, commercial, or legal reasons why we can't accept your work,
but we'll try to find an alternative way for you to contribute in that
case. Remember that many community members have become regular
contributors and some are now even Neo employees!
=== Further reading
If you want to find out more about how you can contribute, head over to
our website for http://neo4j.com/developer/contributing-code/[more
information].
== Got an idea for a new project?
If you have an idea for a new tool or library, start by talking to other
people in the community. Chances are that someone has a similar idea or
may have already started working on it. The best software comes from
getting like minds together to solve a problem. And we'll do our best to
help you promote and co-ordinate your Neo ecosystem projects.
================================================
FILE: LICENSE.txt
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: README.adoc
================================================
= The Neo4j Cypher-DSL
:sectanchors:
// tag::properties[]
:groupId: org.neo4j
:artifactId: neo4j-cypher-dsl
// This will be next version and also the one that will be put into the manual for the main branch
:neo4j-cypher-dsl-version: 2025.2.8-SNAPSHOT
// This is the latest released version, used only in the readme
:neo4j-cypher-dsl-version-latest: 2025.2.7
// end::properties[]
image:https://github.com/neo4j-contrib/cypher-dsl/workflows/build/badge.svg[link=https://github.com/neo4j-contrib/cypher-dsl/actions]
image:https://sonarcloud.io/api/project_badges/measure?project=org.neo4j%3Aneo4j-cypher-dsl-parent&metric=coverage[link=https://sonarcloud.io/summary/new_code?id=org.neo4j%3Aneo4j-cypher-dsl-parent]
image:https://sonarcloud.io/api/project_badges/measure?project=org.neo4j%3Aneo4j-cypher-dsl-parent&metric=alert_status[link=https://sonarcloud.io/dashboard?id=org.neo4j%3Aneo4j-cypher-dsl-parent]
image:https://maven-badges.herokuapp.com/maven-central/org.neo4j/neo4j-cypher-dsl/badge.svg[Maven Central,link=http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.neo4j%22%20AND%20a%3A%22neo4j-cypher-dsl%22]
[abstract]
--
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 https://neo4j.com[Neo4j 4.0+].
Most of the constructs used here are modelled after https://www.opencypher.org[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 https://calver.org[CalVer] in the same way Spring does
since early 2020 (see https://spring.io/blog/2020/04/30/updates-to-spring-versions[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
https://neo4j.github.io/cypher-dsl[Manual].
== Getting Started
=== Adding the necessary dependencies
First, include the dependency to the Neo4j Cypher-DSL under the following coordinates: `{groupId}:{artifactId}`:
==== Maven configuration
[source,xml,subs="verbatim,attributes"]
.Inclusion of the Neo4j Cypher-DSL in a Maven project
----
{groupId}{artifactId}{neo4j-cypher-dsl-version-latest}
----
==== Gradle configuration
[source,groovy,subs="verbatim,attributes"]
.Inclusion of the Neo4j Cypher-DSL in a Gradle project
----
dependencies {
compile '{groupId}:{artifactId}:{neo4j-cypher-dsl-version-latest}'
}
----
=== A simple example
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:
[source,java,tabsize=4]
----
import static org.neo4j.cypherdsl.core.Cypher.*;
import org.neo4j.cypherdsl.core.Cypher;
class SimpleExample {
public static void main(String... a) {
var m = node("Movie").named("m");
var statement = 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.
== Licensing
The Cypher-DSL itself is licenced under the https://www.apache.org/licenses/LICENSE-2.0[Apache License 2.0].
================================================
FILE: bin/extract-version.sh
================================================
#!/usr/bin/env bash
set -euo pipefail
DIR="$(dirname "$(realpath "$0")")"
if test -n "${1-}"; then
sed -n 's/\(:neo4j-cypher-dsl-version-'"${1}"':\) \(.*\)/\2/p' $DIR/../README.adoc
else
sed -n 's/\(:neo4j-cypher-dsl-version:\) \(.*\)/\2/p' $DIR/../README.adoc
fi
================================================
FILE: bin/prepare-release.sh
================================================
#!/usr/bin/env bash
set -euo pipefail
DIR="$(dirname "$(realpath "$0")")"
sed -i .bak 's/\(:neo4j-cypher-dsl-version-latest:\) \(.*\)/\1 '"${1}"'/g' $DIR/../README.adoc
if test -n "${2-}"; then
sed -i .bak 's/\(:neo4j-cypher-dsl-version:\) \(.*\)/\1 '"${2}"'/g' $DIR/../README.adoc
fi
rm $DIR/../README.adoc.bak
git add README.adoc
git commit -sm "Prepare release."
================================================
FILE: bin/remove-shaded-modules.sh
================================================
#!/usr/bin/env bash
set -euo pipefail
DIR="$(dirname "$(realpath "$0")")"
mkdir -p $DIR/../neo4j-cypher-dsl/target/modules
sed 's/requires org.neo4j.cypherdsl.support.schema_name;$//g' $DIR/../neo4j-cypher-dsl/src/main/java/module-info.java > $DIR/../neo4j-cypher-dsl/target/modules/module-info.java
================================================
FILE: bin/runtests.java
================================================
///usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS org.junit.platform:junit-platform-console-standalone:1.8.1
//DEPS org.assertj:assertj-core:3.22.0
//DEPS org.mockito:mockito-junit-jupiter:3.6.0
import org.junit.platform.console.ConsoleLauncher;
/**
* This script is mainly used to execute our tests standalone in CI with JDK 8.
*/
public class runtests {
public static void main(String... a) {
ConsoleLauncher.main(a);
}
}
================================================
FILE: docs/appendix/2020.0.adoc
================================================
== 2020.0
=== 2020.0.1
This is the first patch release for the rebooted Cypher-DSL project.
==== 🚀 Features
* GH-64 - Add function invocation for builtin point function.
* GH-65 - Add support for defining calls to stored procedures.
* `Cypher.literalOf` accepts now `boolean` values as well
==== 🧹 Housekeeping
* Improvements to the manual and Java Docs.
Thanks to @Andy2003 for contributing to this release.
=== 2020.0.0
This is the first version of the rebooted Neo4j Cypher-DSL project. This version has been extracted from https://github.com/neo4j/sdn-rx[SDN-RX].
It's a completely revamped API and we use it in all places in SDN/RX for generating Cypher-Queries.
We use https://calver.org[CalVer] in the same way Spring does
since early 2020 (see https://spring.io/blog/2020/04/30/updates-to-spring-versions[Updates to Spring Versions]) from this release onwards.
You'll find the manual of the latest release version under http://neo4j-contrib.github.io/cypher-dsl/current/ and the current development version - or _main_ - under http://neo4j-contrib.github.io/cypher-dsl/main/.
================================================
FILE: docs/appendix/2020.1.adoc
================================================
== 2020.1
=== 2020.1.6
No new features.
Re-released 2020.1.5 due downtime and staging issues of oss.sonatype.org.
=== 2020.1.5
==== 🚀 Features
* GH-116 - Add support for creating calls to Neo4j reduce().
* GH-119 - Add support for passing symbolic names to nodes and relationships functions.
* GH-117 - Introduce mutating operator.
=== 2020.1.4
==== 🚀 Features
* GH-114 - Support chained properties.
* GH-115 - Support named items in YIELD and symbolic names as NamedPath reference.
=== 2020.1.3
==== 🚀 Features
* GH-111 - Provide a programmatic way of creating an optional match.
==== 🐛 Bug Fixes
* GH-110 - Fix collapsing of empty conditions.
=== 2020.1.2
==== 🚀 Features
* GH-88 - Add support for Neo4j 4.0 subqueries.
* GH-104 - Add support for merge actions.
* GH-101 - Introduce asFunction on an ongoing call definition.
==== 🐛 Bug Fixes
* GH-106 - Escape symbolic names, property lookups, aliases and map keys.
==== 🧹 Housekeeping
* GH-105 - Remove ::set-env from GH-Actions ci.
==== Further improvements:
* Add support for EXPLAIN and PROFILE keywords.
* Qualify a yield call (only relevant for JDK15+)
* Fix wrong offsets in the documentation.
* Improve JavaDoc and document internal API.
* Allow `WITH` clause after `YIELD`.
* Improve reusability of fragments.
* Make ORDER clause buildable.
* Remove parts of an experimental API.
We do publish the Project info now: http://neo4j-contrib.github.io/cypher-dsl/current/project-info/project-info.html[Project info],
including the http://neo4j-contrib.github.io/cypher-dsl/current/project-info/apidocs/index.html[Java API].
=== 2020.1.1
==== 🚀 Features
* List comprehensions can now be build based on named paths.
=== 2020.1.0
==== 🚀 Features
* GH-74 - Automatically generate symbolic name if required: `Node` and `Relationship` objects generate a symbolic name if required and not set
* Added several new functions
** GH-77 `properties()`
** GH-81 `relationships()`
** GH-83 `startNode()`, `endNode()`,
** GH-89 All temporal functions
* GH-76 - Added the list operator (`[]` for accessing sub lists and indexes).
==== 🐛 Bug Fixes
* GH-82 - Expose all necessary interfaces for `call`
* GH-84 - Fix rendering of nested sub trees.
* GH-95 - NPE during the creation of map projections
* GH-96 - Make sure aliased expressions are not rendered multiple times.
==== 🧹 Housekeeping
* GH-67 - Improvements in regards of Java generics.
* GH-68 - Clean up the Functions api.
* GH-69 - Avoid star and static imports.
* GH-72 - Some release cleanup
* GH-75 - Move Assert to internal utils package.
* GH-89 - `RelationshipDetails` is now internal API.
* GH-93 - Ensure compatibility with GraalVM native.
* GH-94 - Bring back SymbolicName#concat.
================================================
FILE: docs/appendix/2021.0.adoc
================================================
== 2021.0
=== 2021.0.2
WARNING: This will already be the last release of the 2021.0 line.
2021.1 will be API compatible but not ABI compatible, as some classes have
been changed into interfaces.
That means it is not a drop in replacement, but your application needs to be recompiled.
==== 🚀 Features
* GH-157 - Provide a method to turn a Java map into an expression.
* GH-158 - Improve pretty printing of subqueries.
* Allow the use of raw cypher as expressions.
* Allow symbolic names to be used as aliases.
* Cache some symbolic names.
* Add support for the keys() function.
==== 📖 Documentation
* GH-152 - Document usage of PatterElement in tests.
==== 🐛 Bug Fixes
* GH-149 - Avoid possible stackoverflow exception during visitor traversal.
* GH-159 - Fix missing labels for nodes after `WITH`.
==== 🧹 Housekeeping
* GH-148 - Add jQAssistant rules and improve building documentation.
* Add Maven PMD plugin.
Thanks https://github.com/Andy2003[Andy] for the improvements of the pretty printer.
=== 2021.0.1
==== 🚀 Features
* GH-147 - Configuration infrastructure for renderer.
First use case being a simple, pretty printing renderer.
The feature looks like this:
[source,java]
----
var c = node("Configuration").named("c");
var d = node("Cypher-DSL").named("d");
var mergeStatement = merge(c.relationshipTo(d, "CONFIGURES"))
.onCreate()
.set(
d.property("version").to(literalOf("2021.0.1")),
c.property("prettyPrint").to(literalTrue())
)
.onMatch().set(c.property("indentStyle").to(literalOf("TAB")))
.returning(d).build();
var renderer = Renderer.getRenderer(Configuration.prettyPrinting());
System.out.println(renderer.render(mergeStatement));
----
and gives you:
[source,cypher]
----
MERGE (c:Configuration)-[:CONFIGURES]->(d:`Cypher-DSL`)
ON CREATE SET d.version = '2021.0.1', c.prettyPrint = true
ON MATCH SET c.indentStyle = 'TAB'
RETURN d
----
=== 2021.0.0
2021.0.0 comes with a lot of new features.
Thanks to https://github.com/Andy2003[Andy] for his contributions!
Andy is one of our first users outside https://github.com/spring-projects/spring-data-neo4j[Spring Data Neo4j 6].
He started to use the Cypher-DSL in https://github.com/neo4j-graphql/neo4j-graphql-java[Neo4j GraphQL Java].
Neo4j GraphQL Java is a library to translate GraphQL based schemas and queries to Cypher and execute those statements with the Neo4j database.
It can be used from a wide variety of frameworks.
We are happy and proud to be part of this and even more so about the input and contribution we got back from Andy.
Of course thanks for your input in form of tickets and discussions go out to @utnaf, @aaramg, @K-Lovelace and @maximelovino as well!
==== Noteworthy
Two things should be mentioned:
The https://github.com/neo4j-contrib/cypher-dsl/commit/2d0c98af853c72d4cd61099c9d8f3209b7e4c7c6[bugfix for GH-121] might
change behavior for some users:
The changes prevents the forced rendering of an alias for objects when the original object - the one that has been aliased
- is passed down to the DSL after an alias has been created.
The original intention for that behaviour was related to Map projection, in which the alias is actually rendered before the object.
So now the use of an aliased expression the first time triggers `a AS b` respectively `b: a` in a map projection.
All further calls will just render `b`. If the *original* object is used again, `a` will be rendered. If that is not desired
in your query and you rely on the alias, make sure you use the aliased expression returned from `.as("someAlias")`.
The other thing are the combined features GH-135 and GH-146.
The `Statement` class has become a fully fledged accessor to the Cypher String and the parameters used and if provided,
the values for those. The following shows a small example:
[source,java]
----
var person = Cypher.node("Person").named("p");
var statement = Cypher
.match(person)
.where(person.property("nickname").isEqualTo(Cypher.parameter("nickname")))
.set(
person.property("firstName").to(Cypher.parameter("firstName").withValue("Thomas")),
person.property("name").to(Cypher.parameter("name", "Anderson"))
)
.returning(person)
.build();
assertThat(statement.getCypher())
.isEqualTo("MATCH (p:`Person`) WHERE p.nickname = $nickname SET p.firstName = $firstName, p.name = $name RETURN p");
Collection parameterNames = statement.getParameterNames();
assertThat(parameterNames).containsExactlyInAnyOrder("nickname", "firstName", "name");
Map parameters = statement.getParameters();
assertThat(parameters).hasSize(2);
assertThat(parameters).containsEntry("firstName", "Thomas");
assertThat(parameters).containsEntry("name", "Anderson");
----
==== 🚀 Features
* GH-122 - Add support for index hints.
* GH-123 - Expose nested building of nested properties as public API.
* GH-124 - Add support for Neo4j's mathematical functions.
* GH-127 - Allow dynamic property lookup.
* GH-128 - Provide asConditions for RelationshipPatterns.
* GH-129 - Allow Expressions as Parameter for Skip and Limit.
* GH-131 - Add support for projections on symbolic names.
* GH-133 - Allow symbolic names to be used as condition.
* GH-135 - Collect parameters defined on a statement.
* GH-141 - Provide a property function on all expressions.
* GH-142 - Provide a point function accepting generic expressions as parameter.
* GH-146 - Allow a statement to render itself.
==== 📖 Documentation
* GH-126 - Document how to call arbitrary functions and procedures.
==== 🐛 Bug Fixes
* Prevent double rendering of Node content when using generated names.
* GH-121 - Don't force rendering of aliases when the original object is used.
* GH-137 - Fix grouping of nested conditions.
==== 🧹 Housekeeping
* Switch to GraalVM 20.3.0.
* GH-125 - Use GraalVM image from ghcr.io.
* GH-139 - Ensure indention via tabs.
* GH-140 - Provide editorconfig.
* GH-143 - Remove union types.
================================================
FILE: docs/appendix/2021.1.adoc
================================================
== 2021.1
=== 2021.1.2
This release comes with two notable things: It uses a couple of annotations on the API to guide developers using it correctly.
IDEs like IDEA will now issue warnings if you don't use a returned builder, or a new instance of an object while wrongly assuming
you mutated state.
In the light of that we discovered that the `RelationshipChain` pattern was mutable and returning a mutated instance while
it should have returned a fresh one.
_Warning_ This might be a breaking change for users having code like this:
```
var pattern = Cypher.node("Start").named("s")
.relationshipTo(Cypher.anyNode())
.relationshipTo(Cypher.node("End").named("e"));
pattern.named("x");
```
Prior to 2021.1.2 this would give the pattern the name `x` and modify it in place.
From 2021.1.2 onwards you *must* use the returned value:
```
pattern = pattern.named("x");
```
We think that this change is crucial and necessary as all other patterns are immutable as intended and in sum, they build
up truly immutable statements. One pattern that is mutable like the above invalides the whole guarantee about the statement.
==== 🚀 Features
* Add `named(SymbolicName s)` to RelationshipChain.
* Generate $TYPE field containing the relationship type. [SDN 6 Annotation Processor]
* Introduce some optional annotations for guidance along the api.
==== 📖 Documentation
* GH-173 - Improve documentation. [A collection of small improvements]
==== 🐛 Bug Fixes
* GH-174 - Extract types via the visitor API and avoid casting element types. [SDN 6 Annotation Processor]
* Ensure immutability of `RelationshipChain`.
==== 🧹 Housekeeping
* Remove unnecessary close (will be taken care of via `@Container`). [Only test related]
* Run tests on JDK 16
=== 2021.1.1
This is a drop-in replacement for <>. Introducing the interface for `Property` broke the `mutate` operation,
for which no test was in place. This and the bug has been fixed.
==== 🐛 Bug Fixes
* GH-168 - Fix mutating containers by properties.
[[v2021.1.0]]
=== 2021.1.0
2021.1.0 comes with a ton of new features and a handful of breaking changes.
Fear not, the breaking changes are resolvable by recompiling your application.
We turned `Node`, `Relationship` and `Property` into interfaces and provide now `NodeBase` and `RelationshipBase` so that you can
use them to build a static meta-model of your application. A `PropertyBase` might follow.
Find out everything about the new possibility to define a static meta model in <>.
The manual also includes a major part about the two new modules we offer:
`{groupId}:neo4j-cypher-dsl-codegen-core` and `{groupId}:neo4j-cypher-dsl-codegen-sdn6`.
`neo4j-cypher-dsl-codegen-core` provides the infrastructure necessary to build code generators for creating a domain model
following our recommendation and `neo4j-cypher-dsl-codegen-sdn6` is a first implementation of that:
A Java annotation processor that can be added to any Spring Data Neo4j 6 project in version 6.0.6 or higher.
It will find your annotated domain classes and turn them into a model you can use to build queries.
Last but not least: We added support for some expressions of the more generic http://www.querydsl.com[QueryDSL].
This will require `com.querydsl:querydsl-core` on the class path but only if you decide to call `Cypher#adapt(foreignExpression)`.
This is a feature that is driven by Spring Data Neo4j 6.1 in which we build upon this to provide a `QuerydslPredicateExecutor`.
Find more in <>.
==== 🚀 Features
* GH-154 - Make Node and Relationship extendable.
* GH-155 - Provide infrastructure for generating a static meta model.
* GH-156 - Create an annotation processor for Spring Data Neo4j 6.
* GH-167 - Add support for some Query-DSL expressions.
* Introduce a statement context for allowing anonymous parameters
(use `Cypher#anonParameter()` to define a parameter with a value but without a name. The name will be accessible on the statement
after rendering).
* Make rendering of constants as parameters configurable.
* Allow specification of the direction while creating a sort item.
* Introduce an interface for Property.
==== 📖 Documentation
* GH-152 - Document usage of PatterElement in tests.
* GH-164 - Improve public extendable API and add documentation.
==== 🐛 Bug Fixes
* Fix SymbolicName#toString.
* Clear visited name cache after single queries.
==== 🧹 Housekeeping
* GH-165 - Simplify poms.
* GH-166 - Improve Cypher.literalOf.
* Exclude all example projects from release.
================================================
FILE: docs/appendix/2021.2.adoc
================================================
== 2021.2
=== 2021.2.4
2021.2.4 is a pure bug fix release.
==== 🐛 Bug Fixes
* GH-203 - Introduce a scope for the `PatternComprehension`.
=== 2021.2.3
2021.2.3 is a rather big release as it contains many small improvements and API functionality required by our next major
release. Those are brought in now so that they can be benefial to others without bumping a major version.
==== 🚀 Features
* GH-195 - Add collection parameter support for `ExposesReturning`.
* Introduce a `ExposesPatternLengthAccessors` for uniform access to relationships and chains thereof. [improvement]
* Allow creating instances of `FunctionInvocation` directly. [improvement]
* Provide factory methods of `MapProjection` and `KeyValueMapEntry` as public API.
* Provide `set` and `remove` labels operation as public API.
* Provide `set` and `mutate` of expressions as public API.
* Provide factory methods of `Hints` as public API.
* GH-200 - Provide an API to define named paths based on a `Node` pattern.
* Provide an option to escape names only when necessary. [improvement]
==== 📖 Documentation
* Add documentation for escaping names.
* GH-198 - Fix spelling errors in JavaDoc and documentation.
==== 🐛 Bug Fixes
* Make `Case` an interface and let it extend `Expression`. [bug]
* GH-197 - Fix eagerly resolved symbolic names in negated pattern conditions.
* GH-197 - Clear name cache after leaving a statement.
* GH-199 - Bring back `with(Named… vars)`.
==== 🧹 Housekeeping
* Don't use fixed driver versions in doc.
* Pass builder as constructor argument.
* Improve `Return` and `With` internals.
* Update Driver, SDN integration and Spring Boot example dependencies.
* GH-202 - Make API Guardian an optional / provided dependency.
Thanks to https://github.com/meistermeier[@meistermeier] and https://github.com/aldrinm[@aldrinm] for their contributions.
=== 2021.2.2
==== 🚀 Features
* Allow all expresions to be used as conditions. [improvement]
* Add support for unary minus and plus operations. [new-feature]
* Add support for generatic dynamic distinct aggregating function calls. [new-feature]
* GH-190 - Introduce a union type for named things and aliased expressions.
* Provide means to pass additional types to the relationship base class. [new-feature]
* GH-193 - Allow MATCH after YIELD.
* GH-189 - Provide an alternate api for methods consuming collections via vargs.
==== 📖 Documentation
* Improve inheritance example. [static-model, codegen]
==== 🐛 Bug Fixes
* Fix parameter collector when running as GraalVM native image
* GH-192 - Don't introduce new symbolic names in conditional pattern expressions.
==== 🧹 Housekeeping
* GH-178 - Upgrade SDN 6 examples to Spring Boot 2.5 final.
Thanks to https://github.com/meistermeier[@meistermeier] for the contribution of the API improvements in regard to collections.
=== 2021.2.1
==== 🚀 Features
* Distinguish between statements and result statements: The Cypher-DSL knows whether a statement would actually return
data or not
* Provide optional integration with the Neo4j-Java-Driver to execute statements.
* Allow to register Spring converters with the annotation processor. [codegen]
* GH-182 - Add support for scalar converter functions.
* GH-183 - Add trim function.
* GH-184 - Add split function.
* GH-180 - Add support for LOAD CSV and friends.
* GH-187 - Add `returningRaw` for returning arbitrary (aliased) Cypher fragments (bot as part of a statement or as a
general `RETURN xxx` clause without preceding query)
* Resolve named parameters in raw literals: You can mix now the expression placeholder `$E` and named parameters in raw
Cypher literals giving you much more flexibility in regards what to pass to the raw litera.
==== 🐛 Bug Fixes
* GH-177 - Create a valid loadable and instantiable name when working on nested, inner classes. [codegen]
* GH-186 - Pretty print subqueries and fix double rendering of Labels after subquery.
==== 🧹 Housekeeping
* Remove unnecessary subpackage 'valid'. [codegen] (test code only)
* Upgrade to GraalVM 21.1.0.
* Update Spring dependencies for codegen.
Thanks to https://github.com/Andy2003[@Andy2003] for contributing to this release.
=== 2021.2.0
2021.2 doesn't bring any new features apart from being now a Java library supporting the Java module system not only with
automatic module names but also with a correct `module-info.java` when running on JDK 11+ on the module path.
The Cypher-DSL uses the technique of https://openjdk.java.net/jeps/238[JEP 238: Multi-Release JAR Files] to provide a
`module-info.java` for projects being on JDK 11+.
The MR-Jar allows us to compile for JDK 8 but also support JDK 11 (we choose 11 as it is the current LTS release as time of writing).
To use the Cypher-DSL in a modular application you would need to require the following modules:
[source,java]
----
module org.neo4j.cypherdsl.examples.core {
requires org.neo4j.cypherdsl.core;
}
----
This release comes with a small catch: We do support using some https://github.com/querydsl/querydsl[QueryDSL] constructs.
Query-DSL will have correct automatic module names in their 5.x release and we asked them to backport those to the
4.x line on which the Cypher-DSL *optionally* depends (See https://github.com/querydsl/querydsl/pull/2805[2805]).
Until then we statically require (that is "optional" in module speak) Query-DSL via the artifact name.
This can cause errors when the artifact (`querydsl-core.jar`) is renamed via the build process or similar.
We are gonna improve that as soon as we can depend on fixed automatic module names.
Apart from this big change there is no change in any public API.
This release should be a drop-in replacement for the prior release.
A big thank you to https://github.com/sormuras[@sormuras] for his invaluable lessons about the Java module system.
================================================
FILE: docs/appendix/2021.3.adoc
================================================
== 2021.3
=== 2021.3.4
2021.3.4 is a pure bug fix release.
==== 🐛 Bug Fixes
* GH-252 - Use a namespace for the message bundle.
=== 2021.3.3
2021.3.3 is a pure housekeeping release, however a release we are proud of. We do analyze this project now with https://www.sonarqube.org[SonarQube]
vie https://sonarcloud.io[Sonarcloud] and are happy to announce that we have a quadruple A rating:
image::20211027_sonarcoud.jpg[]
In addition, we finally invited https://dependabot.com[Dependabot] taking care of at least creating the PRs.
==== 🧹 Housekeeping
* Fix reliability and security issues
* Fix a minor amounts of remaining code smells
* Bump several dependencies (only test and build related)
=== 2021.3.2
==== 🚀 Features
* Add support for QueryDSL's `equalsIgnoreCase` operator
* GH-204 - Provide access to identifiable expressions (See <>)
==== 🧹 Housekeeping
* Fix several (compile) warnings
* Fix several spelling errors in api docs
* Upgrade Spring Data Neo4j to 6.1.5 (In module `org.neo4j.cypherdsl.codegen.sdn6`)
* Upgrade Neo4j Cypher Parser to 4.3.4 (In module `neo4j-cypher-dsl-parser`).
* Verify examples on JDK 17
=== 2021.3.1
2021.3.1 is a pure bug fix release. API Guardian cannot be an optional dependency, otherwise compiling programs with `-Werror`
will fail, as the `@API`-annotation has runtime and not class retention.
==== 🐛 Bug Fixes
* GH-203 - Introduce a scope for the `PatternComprehension`.
* Revert "GH-202 - Make API Guardian an optional / provided dependency."
* Support empty BooleanBuilder in QueryDSL adapter.
=== 2021.3.0
==== 🚀 New module: The Cypher-DSL-Parser
2021.3 builds straight upon <<2021.2.3>>, with few additions to the existing API, that didn't quite fit with a patch release,
but belong conceptually into this release, which brings a completely new module: The `neo4j-cypher-dsl-parser`.
What's behind that name? A Cypher-Parser build on the official Neo4j 4.3 parser frontend and creating a Cypher-DSL-AST or
single expressions usable in the context of the Cypher-DSL.
The module lives under the following coordinates `org.neo4j:neo4j-cypher-dsl-parser` and requires JDK 11+ (the same version like Neo4j does).
We created a couple of <>, but we are sure you will have tons of more ideas and therefore
a looking for your feedback.
Here's a sneak preview. It shows you can add a user supplied Cypher fragment to something you are building using the DSL.
[source,java]
----
var userProvidedCypher
= "MATCH (this)-[:LINK]-(o:Other) RETURN o as result";
var userStatement = CypherParser.parse(userProvidedCypher);
var node = Cypher.node("Node").named("node");
var result = Cypher.name("result");
var cypher = Cypher
.match(node)
.call(
userStatement,
node.as("this")
)
.returning(result.project("foo", "bar"))
.build()
.getCypher();
----
For this release a big thank you goes out to the Cypher-operations team at Neo4j, listening to our requests and ideas!
================================================
FILE: docs/appendix/2021.4.adoc
================================================
== 2021.4
=== 2021.4.2
==== 🐛 Bug Fixes
* GH-252 - Use a namespace for the message bundle.
Thanks to @Andy2003 for spotting this.
==== 🧹 Housekeeping
* Tons of dependency upgrades in test scope
* The parser module now uses the Neo4j 4.3.7 parser
* Bump apiguardian-api from 1.1.1 to 1.1.2 (#250)
=== 2021.4.1
==== 🚀 Features
GH-230 - Add a way for a programmatic sort definition on expressions.
==== 🧹 Housekeeping
* Tons of dependency upgrades in test scope
* Upgrade to Neo4j-Java-Driver 4.4.1. (a provided dependency)
* The parser module now uses the Neo4j 4.3.6 parser
=== 2021.4.0
2021.4.0 updates the optional dependency to https://github.com/querydsl/querydsl[Querydsl] to 5.0.0. While this is API
not a breaking change, it can be when the Cypher-DSL is run together with Querydsl on the Java Module path. Querydsl
maintainer finally introduced automatic module names for all their module on which we can no reliable depend. As that
module name is however different from the generated one, it will be a breaking change on the module path. Therefore
we bump our version, too.
==== 🧹 Housekeeping
* Upgrade Querydsl to 5.0.0
================================================
FILE: docs/appendix/2022.0.adoc
================================================
== 2022.0
=== 2022.0.0
Starting with the 2022 release line, all current experimental warnings have been removed, and we consider our API stable.
==== Noteworthy
As we have marked the API as stable we do enforce semantic versioning in our builds now.
The parser module `neo4j-cypher-dsl-parser` has been updated to the Neo4j 4.4 parser and therefore doesn't bring in Scala dependencies anymore.
And last but not least, we added the _Contributor Covenant Code of Conduct_.
==== 🚀 Features
* Indent `CREATE` in subqueries. (#254)
==== 🐛 Bug Fixes
* Fix broken asciidoc includes.
* Give messages constant a better name (The bundle name we used might clash with other bundle names).
==== 🧹 Housekeeping
* Tons of dependency upgrades:
** Bump reactor-bom from 2020.0.13 to 2020.0.14 (#265)
** Bump checker-qual from 3.20.0 to 3.21.0 (#264)
** Bump mockito.version from 4.1.0 to 4.2.0 (#263)
** Bump neo4j-cypher-javacc-parser from 4.4.0 to 4.4.2 (#262)
** Bump checker-qual from 3.19.0 to 3.20.0 (#261)
** Bump neo4j-java-driver from 4.4.1 to 4.4.2 (#260)
** Bump spring-boot-starter-parent from 2.5.6 to 2.6.1 (#259)
** Bump checkstyle from 9.1 to 9.2 (#256)
** Bump junit-bom from 5.8.1 to 5.8.2 (#257)
** Bump mockito.version from 4.0.0 to 4.1.0 (#255)
Thanks again to https://github.com/Andy2003[Andy] for his contributions and feedback.
================================================
FILE: docs/appendix/2022.1.adoc
================================================
== 2022.1
=== 2022.1.0
*No breaking changes*. The minor version has been incremented to notify about new default methods in our interfaces. Those
shouldn't concern you as a user though, as they are not meant to be implemented by you.
==== Noteworthy
Our integration tests on GitHub now uses the official GraalVM action: https://github.com/marketplace/actions/github-action-for-graalvm.
Thanks, https://github.com/meistermeier[Gerrit], for integrating it.
==== 🚀 Features
* Add `size` and `hasSize` on expressions. (#267)
==== 🧹 Housekeeping
* Some polishing (mainly working on getting a "warning free" build in all the tools)
* Tons of dependency upgrades:
** Bump testcontainers.version from 1.16.2 to 1.16.3 (#289)
** Bump spring-boot-starter-parent from 2.6.2 to 2.6.3 (#290)
** Bump mockito.version from 4.2.0 to 4.3.1 (#291)
** Bump slf4j.version from 1.7.33 to 1.7.35 (#292)
** Bump japicmp-maven-plugin from 0.15.4 to 0.15.6 (#293)
** Bump neo4j-java-driver from 4.4.2 to 4.4.3 (#294)
** Bump checkstyle from 9.2.1 to 9.3 (#295)
** Bump asciidoctor-maven-plugin from 2.2.1 to 2.2.2 (#296)
** Bump asciidoctorj from 2.5.2 to 2.5.3 (#285)
** Bump maven-jar-plugin from 3.2.1 to 3.2.2 (#284)
** Bump spring-data-neo4j from 6.2.0 to 6.2.1 (#283)
** Bump reactor-bom from 2020.0.14 to 2020.0.15 (#282)
** Bump slf4j.version from 1.7.32 to 1.7.33 (#281)
** Bump neo4j-cypher-javacc-parser from 4.4.2 to 4.4.3 (#280)
** Bump maven-jar-plugin from 3.2.0 to 3.2.1 (#277)
** Bump checker-qual from 3.21.0 to 3.21.1 (#276)
** Bump assertj-core from 3.21.0 to 3.22.0 (#272)
** Bump maven-site-plugin from 3.9.1 to 3.10.0 (#270)
** Bump maven-deploy-plugin from 3.0.0-M1 to 3.0.0-M2 (#271)
** Bump checkstyle from 9.2 to 9.2.1 (#269)
** Bump spring-boot-starter-parent from 2.6.1 to 2.6.2 (#268)
** Bump Maven to 3.8.4.
================================================
FILE: docs/appendix/2022.10.adoc
================================================
== 2022.10
=== 2022.10.0
Welcome @ali-ince to the list of contributors to Cypher-DSL.
We are glad that you and your team are users of this module.
==== 🚀 Features
* Allow retrieving parameter names (#1071)
* Allow chainable foreach. (#988)
* Add builder methods for `FOREACH`. (#740)
==== 🧹 Housekeeping
* Dependency upgrades:
** Update Neo4j from 4.4.29 to 4.4.37
** Update Neo4j Java Driver from 4.4.15 to 4.4.18
================================================
FILE: docs/appendix/2022.11.adoc
================================================
== 2022.11
=== 2022.11.0
==== 🚀 Features
* Allow to call raw cypher from top level entry point (#1073) (#1074)
================================================
FILE: docs/appendix/2022.2.adoc
================================================
== 2022.2
=== 2022.2.1
*No breaking changes*.
==== 🚀 Features
* Add randomUUID to predefined functions.
* Support additional mutate expression types. (#312)
==== 🐛 Bug Fixes
* Don't create empty `WITH` clause without renames. (#320)
* Fix rendering of nested FOREACH statements. (#318)
* Check for field type too when computing internalId usage.
==== 📝 Documentation
* Add example how to merge-find things via Springs `CypherdslStatementExecutor`.
==== 🧹 Housekeeping
* Remove Awaitility test-dependency.
* Dependency upgrades:
** Bump spring-data-neo4j from 6.2.2 to 6.2.3 (#332)
** Bump neo4j-cypher-javacc-parser from 4.4.4 to 4.4.5 (#330)
** Bump checkstyle from 10.0 to 10.1 (#329)
** Bump jna from 5.10.0 to 5.11.0 (#331)
** Bump spring-boot-starter-parent from 2.6.4 to 2.6.5 (#333)
** Bump native-maven-plugin from 0.9.10 to 0.9.11 (#334)
** Bump neo4j-java-driver from 4.4.3 to 4.4.5 (#328)
** Bump reactor-bom from 2020.0.16 to 2020.0.17 (#327)
** Bump mockito.version from 4.3.1 to 4.4.0 (#325)
** Bump checkstyle from 9.3 to 10.0 (#323)
** Bump guava from 31.0.1-jre to 31.1-jre (#324)
** Bump checker-qual from 3.21.2 to 3.21.3 (#322)
** Bump awaitility from 4.1.1 to 4.2.0 (#321)
** Bump japicmp-maven-plugin from 0.15.6 to 0.15.7 (#313)
** Bump spring-boot-starter-parent from 2.6.3 to 2.6.4 (#314)
=== 2022.2.0
*No breaking changes*. The minor version has been incremented to notify about a couple of new methods in the parser module, allowing for more and different types of parsing events to be emitted.
Thanks to @ikwattro for his input and feedback in this release.
==== 🚀 Features
* Emit pattern created event on merge clauses.
* Add callbacks for a "pattern element created event". (#303)
==== 📝 Documentation
* Add an example how to track changed properties to nodes.
* Add rewrite example.
* Add examples how to extract modified labels for the Cypher parser.
==== 🛠 Build
* Fix surefire settings.
* Add a 'fast' profile.
* Reorder module-info.java creation before shading so that javadoc wont fail on vanilla JDK.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump maven-site-plugin from 3.10.0 to 3.11.0 (#311)
** Bump native-maven-plugin from 0.9.9 to 0.9.10 (#310)
** Bump maven-pmd-plugin from 3.15.0 to 3.16.0 (#309)
** Bump spring-data-neo4j from 6.2.1 to 6.2.2 (#308)
** Bump reactor-bom from 2020.0.15 to 2020.0.16 (#307)
** Bump slf4j.version from 1.7.35 to 1.7.36 (#306)
** Bump maven-javadoc-plugin from 3.3.1 to 3.3.2 (#305)
** Bump neo4j-cypher-javacc-parser from 4.4.3 to 4.4.4 (#304)
** Bump checker-qual from 3.21.1 to 3.21.2 (#298)
================================================
FILE: docs/appendix/2022.3.adoc
================================================
== 2022.3
=== 2022.3.0
*No breaking changes*. The minor version has been incremented due to the following changes:
* Changes in the `ExposesSubqueryCall` (new methods to expose `callInTransactions`, but that interface is not meant for
external implementations anyway)
* Added a new type `Dialect` and a new default method `enterWithResult` on the `Visitor` interface (have a look at the JavaDoc
for the rationale behind it).
==== 🚀 Features
* Add support for dialects.
* Add support for toString(Expression). (#344)
* Support `CALL {} IN TRANSACTIONS`.
* Add parameter callbacks to the parser. (#336)
==== 🐛 Bug Fixes
* Prevent `ClassCastException` when using `String` arguments to import variables into a subquery.
* Make generated static model usable with self referential associations. (#337, Thanks to @ChristophB for his input on #335).
* Fix tag of CypherParser entry point. (docs)
==== 📝 Documentation
* Add information about GraalVM 21.3.0 and `org.graalvm.buildtools:native-maven-plugin` to CONTRIBUTING.adoc.
==== 🛠 Build
* Fix publish_docs workflow.
* Add support for registering `allDeclaredConstructors`. (#342)
* Add `RegisterForReflection` and processor replacing static reflection-config.json. (#341)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump jackson-bom from 2.13.2 to 2.13.2.20220328 (#346)
** Bump asm from 9.2 to 9.3 (#347)
** Bump jacoco-maven-plugin from 0.8.7 to 0.8.8 (#345)
** Update managed version of error_prone_annotations to 2.12.1, avoiding compilation issues in IDEA.
** Bump spring-boot-starter-parent from 2.6.5 to 2.6.6 (#340)
** Bump checker-qual from 3.21.3 to 3.21.4 (#339)
** Bump maven-shade-plugin from 3.2.4 to 3.3.0 (#338)
================================================
FILE: docs/appendix/2022.4.adoc
================================================
== 2022.4
=== 2022.4.0
* Added `withoutResults` to both in-statement and standalone call-builders so that one can use procedures without results
inside a pipeline. This won't break anything, as the corresponding interface is not meant to implemented by downstream
libraries
* Compound conditions are now correctly immutable (as stated by the contract and its JavaDoc).
This might break things if you have them changed inflight.
Thanks to @Andy2003 for his input on this release.
==== 🚀 Features
* Allow procedure calls without results after a match clause. (#361)
==== 🐛 Bug Fixes
* Make `CompoundCondition` immutable obliging the interfaces contract. (#365)
* Don't skip symbolic names if present and already in scope. (#363)
==== 🛠 Build
* Update github-push-action to 0.6.0.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump testcontainers.version from 1.16.3 to 1.17.1 (#352)
** Bump reactor-bom from 2020.0.17 to 2020.0.18 (#353)
** Bump mockito.version from 4.4.0 to 4.5.1 (#354)
** Bump checkstyle from 10.1 to 10.2 (#355)
** Bump spring-boot-starter-parent from 2.6.6 to 2.6.7 (#356)
** Bump maven-javadoc-plugin from 3.3.2 to 3.4.0 (#357)
** Bump maven-site-plugin from 3.11.0 to 3.12.0 (#358)
** Bump spring-data-neo4j from 6.2.3 to 6.2.4 (#359)
** Bump neo4j-cypher-javacc-parser from 4.4.5 to 4.4.6 (#360)
** Bump checker-qual from 3.21.4 to 3.22.0 (#364)
================================================
FILE: docs/appendix/2022.5.adoc
================================================
== 2022.5
=== 2022.5.0
*No breaking changes*, the minor version has been bumped due to new default methods of internal interfaces.
This release is - again - a safe drop-in replacement for the prior (2022.4.0) one.
Thanks to @hindog, @bhspencer, @Hardu2203 and @irene221b for their input on this release.
==== 🚀 Features
* Add explicit `set` operation to `PropertyContainer`. (#394)
* Support "WITH *, " by handling the 'returnAll' flag received from parser (#367)
==== 🔄️ Refactorings
* refactor: Remove superfluous whitespaces before `MapExpression` in pretty printer. (#401)
==== 📝 Documentation
* Add an example how to use Cypher parameters with`CypherdslStatementExecutor`. (#395)
* Improve JavaDoc of `TemporalLiteral`.
* Add correction method description.
==== 🛠 Build
* Use latest Neo4j 4.4 for integration tests.
* Add a CODEOWNERS declaration.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump jna from 5.11.0 to 5.12.0 (#399)
** Bump spring-boot-starter-parent from 2.7.0 to 2.7.1 (#398)
** Bump spring-data-neo4j from 6.3.0 to 6.3.1 (#397)
** Bump native-maven-plugin from 0.9.11 to 0.9.12 (#396)
** Bump reactor-bom from 2020.0.19 to 2020.0.20 (#392)
** Bump checker-qual from 3.22.1 to 3.22.2 (#390)
** Bump neo4j-cypher-javacc-parser from 4.4.7 to 4.4.8 (#391)
** Bump maven-enforcer-plugin from 3.0.0 to 3.1.0 (#386)
** Bump joda-time from 2.10.10 to 2.10.14 (#387)
** Bump asciidoctorj from 2.5.3 to 2.5.4 (#380)
** Bump assertj-core from 3.22.0 to 3.23.1 (#383)
** Bump checker-qual from 3.22.0 to 3.22.1 (#382)
** Bump mockito.version from 4.6.0 to 4.6.1 (#381)
** Bump neo4j-java-driver from 4.4.5 to 4.4.6 (#379)
** Bump maven-pmd-plugin from 3.16.0 to 3.17.0 (#378)
** Bump asciidoctorj-diagram from 2.2.1 to 2.2.3 (#377)
** Bump mockito.version from 4.5.1 to 4.6.0 (#376)
** Bump checkstyle from 10.2 to 10.3 (#375)
** Bump neo4j-cypher-javacc-parser from 4.4.6 to 4.4.7 (#373)
** Bump testcontainers.version from 1.17.1 to 1.17.2 (#371)
** Bump spring-data-neo4j from 6.2.4 to 6.3.0 (#368)
** Bump jackson-bom from 2.13.2.20220328 to 2.13.3 (#370)
** Bump reactor-bom from 2020.0.18 to 2020.0.19 (#369)
================================================
FILE: docs/appendix/2022.6.adoc
================================================
== 2022.6
=== 2022.6.1
==== 🐛 Bug Fixes
* Include aliased expression in local scopes. (#420)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump neo4j-cypher-javacc-parser from 4.4.8 to 4.4.9 (#418)
** Bump maven-install-plugin from 3.0.0-M1 to 3.0.1 (#417)
** Bump spring-boot-starter-parent from 2.7.1 to 2.7.2 (#416)
** Bump maven-deploy-plugin from 3.0.0-M2 to 3.0.0 (#415)
** Bump exec-maven-plugin from 3.0.0 to 3.1.0 (#414)
** Bump native-maven-plugin from 0.9.12 to 0.9.13 (#413)
** Bump spring-data-neo4j from 6.3.1 to 6.3.2 (#412)
** Bump reactor-bom from 2020.0.20 to 2020.0.21 (#411)
** Bump checker-qual from 3.22.2 to 3.23.0 (#410)
=== 2022.6.0
`Functions.internalId()` has been deprecated to accomodate for Neo4j 5 later this year.
We are unsure if we will do this to `id()`, too (The method with the same name will be deprecated in Neo4j 5 and eventually
be replaced by `elementId()`).
==== 🚀 Features
* Add fallback from `elementId` to `id` on older Neo4j versions. (#407)
* Add calls for `elementId()`. (#406)
==== 🔄️ Refactorings
* Deprecate `internalId` in favor of `elementId` on nodes. (#408)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump testcontainers.version from 1.17.2 to 1.17.3 (#403)
** Bump checkstyle from 10.3 to 10.3.1 (#404)
** Bump jna from 5.12.0 to 5.12.1 (#405)
================================================
FILE: docs/appendix/2022.7.adoc
================================================
== 2022.7
=== 2022.7.3
==== 🚀 Features
* Add `point.withinBBox` and convenience methods for cartesian points and coordinates. (#475)
==== 🔄️ Refactorings
* Remove superfluous field.
==== 🛠 Build
* Replace jQAssistant with easier to maintain Archunit test. (#466)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump jackson-bom from 2.13.4 to 2.13.4.20221013 (#479)
** Bump neo4j-cypher-javacc-parser from 4.4.11 to 4.4.12 (#478)
** Bump reactor-bom from 2020.0.23 to 2020.0.24 (#477)
** Bump joda-time from 2.11.2 to 2.12.0 (#476)
** Bump archunit from 0.23.1 to 1.0.0 (#471)
** Bump neo4j-java-driver from 4.4.6 to 4.4.9 (#474)
** Bump testcontainers.version from 1.17.3 to 1.17.5 (#470)
** Bump checker-qual from 3.25.0 to 3.26.0 (#472)
** Bump asm from 9.3 to 9.4 (#468)
** Bump joda-time from 2.11.1 to 2.11.2 (#465)
** Bump spring-boot-starter-parent from 2.7.3 to 2.7.4 (#464)
** Bump junit-bom from 5.9.0 to 5.9.1 (#463)
** Bump asciidoctorj from 2.5.5 to 2.5.6 (#462)
** Bump checkstyle from 10.3.3 to 10.3.4 (#461)
** Bump native-maven-plugin from 0.9.13 to 0.9.14 (#460)
** Bump spring-data-neo4j from 6.3.2 to 6.3.3 (#459)
** Bump jqassistant.plugin.git from 1.8.0 to 1.9.0 (#458)
** Bump maven-jar-plugin from 3.2.2 to 3.3.0 (#457)
** Bump reactor-bom from 2020.0.22 to 2020.0.23 (#456)
** Bump maven-shade-plugin from 3.3.0 to 3.4.0 (#455)
** Bump maven-pmd-plugin from 3.18.0 to 3.19.0 (#454)
** Bump neo4j-cypher-javacc-parser from 4.4.10 to 4.4.11 (#452)
** Bump mockito.version from 4.7.0 to 4.8.0 (#451)
=== 2022.7.2
*No breaking changes*. This adds a new module - `neo4j-cypher-dsl-schema-name-support` - that contains only one class, dedicated to sanitise and quote names that are meant to be used as labels and types. We are using it internally for all our quoting needs and if you have the need in your application to create dynamic queries that deal with the modification of labels and types, you might want to have a look at that module. It is dependency free and safe to shade. The background to do label and type manipulation is this: Cypher does not support them as parameters, you need to concatenate your query for this. In all other cases, please use proper parameter, but especially for string values.
Thanks to @AzuObs @AlexNeo4J and @robsdedude for their feedback on this work and also to @harshitp-fens for their inspiration of the `ON_DELETE_ITEM` parser callback.
==== 🚀 Features
* Provide `ON_DELETE_ITEM` event type. (#449)
* Introduce standalone schema-name support module. (#445)
==== 🛠 Build
* Fix the build on a restricted TeamCity instance. (#450)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump checker-qual from 3.24.0 to 3.25.0 (#448)
** Bump japicmp-maven-plugin from 0.15.7 to 0.16.0 (#447)
** Bump jackson-bom from 2.13.3 to 2.13.4 (#446)
** Bump checkstyle from 10.3.2 to 10.3.3 (#444)
** Bump maven-checkstyle-plugin from 3.1.2 to 3.2.0 (#443)
** Bump maven-pmd-plugin from 3.17.0 to 3.18.0 (#442)
** Bump joda-time from 2.11.0 to 2.11.1 (#441)
=== 2022.7.1
*No breaking changes*. This is an important bug-fix release and a safe drop-in replacement for 2022.7.0 and all 2022.6 releases. If you can life with some deprecation warnings, it can be used as a drop-in for the 2022.5 and 2022.4 series, too.
==== 🐛 Bug Fixes
* Escape escaped Unicode 0060 (backtick) proper. (#436)
==== 🔄️ Refactorings
* Don't double escape already escaped backticks.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump mockito.version from 4.6.1 to 4.7.0 (#434):
** Bump reactor-bom from 2020.0.21 to 2020.0.22 (#433):
** Bump joda-time from 2.10.14 to 2.11.0 (#432):
** Bump neo4j-cypher-javacc-parser from 4.4.9 to 4.4.10 (#431):
** Bump maven-javadoc-plugin from 3.4.0 to 3.4.1 (#430):
** Bump spring-boot-starter-parent from 2.7.2 to 2.7.3 (#439)
** Bump flatten-maven-plugin from 1.2.7 to 1.3.0 (#437):
=== 2022.7.0
*No breaking changes*, the minor version has been bumped due to new default methods of internal interfaces.
This release is - again - a safe drop-in replacement for the prior (2022.6.1) one.
Thanks to https://github.com/AakashSorathiya[@AakashSorathiya] and https://github.com/nmervaillie[Nicolas Mervaillie] for their input on this release.
==== 🚀 Features
* Add support for `includesAll` and `includesAny` operations on expressions for list properties
* Support `org.neo4j.cypher.internal.ast.factory.ASTExpressionFactory#ands`
==== 🔄️ Refactorings
* Add cause to unsupported to `UnsupportedCypherException`.
==== 🛠 Build
* Use current JBang action to verify on JDK 8. (#421)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump maven-site-plugin from 3.12.0 to 3.12.1 (#428)
** Bump checker-qual from 3.23.0 to 3.24.0 (#429)
** Bump checkstyle from 10.3.1 to 10.3.2 (#425)
** Bump junit-bom from 5.8.2 to 5.9.0 (#424)
** Bump maven-resources-plugin from 3.2.0 to 3.3.0 (#423)
** Bump asciidoctorj from 2.5.4 to 2.5.5 (#422)
================================================
FILE: docs/appendix/2022.8.adoc
================================================
== 2022.8
=== 2022.8.5
==== 🐛 Bug Fixes
* Apply prefixes after potential separator. (#606)
==== 🔄️ Refactorings
* Ensure getting the type of relationships without type is safe.
==== 🛠 Build
* Use `inputEncoding` for configuring checkstyle encoding.
=== 2022.8.4
==== 🐛 Bug Fixes
* Correctly track identifiable elements. (#579)
==== 🧹 Housekeeping
* Dependency upgrades:
** 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 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 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 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)
=== 2022.8.3
==== 🔄️ Refactorings
* Allow `yield *` for standalone calls with arguments, too. (#545, thanks to @zakjan taking the time and report this)
==== 🧹 Housekeeping
* Extend license header to 2023.
* Dependency upgrades:
** Bump assertj-core from 3.23.1 to 3.24.1 (#549)
** Bump checker-qual from 3.28.0 to 3.29.0 (#548)
** Bump checkstyle from 10.5.0 to 10.6.0 (#537)
** Bump mockito.version from 4.10.0 to 4.11.0 (#536)
=== 2022.8.2
Thanks to @ikwattro from @graphaware for investing his time and creating valuable tickets for this release.
==== 🐛 Bug Fixes
* Allow `match` after unwind as defined by OpenCypher. (#531)
==== 📝 Documentation
* Make clear that pretty printing does not always escape names
==== 🛠 Build
* Upgrade various actions to non-deprecated versions. (#519)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump annotations from 23.0.0 to 23.1.0 (#521)
** Bump compile-testing from 0.20 to 0.21.0 (#526)
** Bump reactor-bom from 2022.0.0 to 2022.0.1 (#527)
** Bump mockito.version from 4.9.0 to 4.10.0 (#528)
=== 2022.8.1
==== 🔄️ Refactorings
* Apply learnings from full JDK 17 migrations.
* Prevent usage of `REMOVE` item inside `SET` clause (during RT). (#506)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump checker-qual from 3.27.0 to 3.28.0 (#517)
** Bump compile-testing from 0.19 to 0.20 (#516)
** Bump native-maven-plugin from 0.9.18 to 0.9.19 (#515)
** Bump joda-time from 2.12.1 to 2.12.2 (#514)
** Bump jackson-bom from 2.14.0 to 2.14.1 (#513)
** Bump archunit from 1.0.0 to 1.0.1 (#512)
** Bump native-maven-plugin from 0.9.17 to 0.9.18 (#511)
** Bump checkstyle from 10.4 to 10.5.0 (#510)
=== 2022.8.0
==== 🚀 Features
* Add `yield *` for standalone calls. (#497)
==== 📝 Documentation
* Add missing value to `sanitize` JavaDoc. (#496)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump testcontainers.version from 1.17.5 to 1.17.6 (#502)
** Bump maven-install-plugin from 3.0.1 to 3.1.0 (#501)
** Bump japicmp-maven-plugin from 0.16.0 to 0.17.1 (#499)
** Bump mockito.version from 4.8.1 to 4.9.0 (#498)
** Bump jackson-bom from 2.13.4.20221013 to 2.14.0 (#492)
** Bump checker-qual from 3.26.0 to 3.27.0 (#493)
** Bump reactor-bom from 2020.0.24 to 2022.0.0 (#495)
** Bump native-maven-plugin from 0.9.16 to 0.9.17 (#491)
** Bump maven-shade-plugin from 3.4.0 to 3.4.1 (#487)
** Bump checkstyle from 10.3.4 to 10.4 (#488)
** Bump joda-time from 2.12.0 to 2.12.1 (#486)
** Bump spring-boot-starter-parent from 2.7.4 to 2.7.5 (#485)
** Bump asciidoctorj from 2.5.6 to 2.5.7 (#483)
** Bump native-maven-plugin from 0.9.14 to 0.9.16 (#482)
** Bump mockito.version from 4.8.0 to 4.8.1 (#481)
================================================
FILE: docs/appendix/2022.9.adoc
================================================
== 2022.9
=== 2022.9.2
==== 🚀 Features
* Allow calling of raw Cypher strings in sub queries. (Backport from 2023.x)
==== 🐛 Bug Fixes
* Driving symbolic names for list predicate function must not be scoped. (#905)
==== 🔄️ Refactorings
* Allow unit-subqueries (Backport from 2023.x)
==== 🧰 Tasks
* Extend license header to 2024.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump spring-boot-starter-parent from 2.7.5 to 2.7.18
** Update Spring Data Neo4j from 6.3.14 to 6.3.18
** Bump reactor-bom from 2022.0.2 to 2022.0.15
** Update Neo4j from 4.4.23 to 4.4.29
** Update Neo4j Java Driver from 4.4.12 to 4.4.13
** Update Neo4j Java Driver from 4.4.13 to 4.4.15
** Bump testcontainers.version from 1.17.6 to 1.19.7
==== 🛠 Build
* Update various build related plugins.
=== 2022.9.1
==== 🐛 Bug Fixes
* Apply the correct includesAll and includesAny semantics (#819)
=== 2022.9.0
==== 🚀 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
================================================
FILE: docs/appendix/2023.0.adoc
================================================
== 2023.0
=== 2023.0.5
==== 🐛 Bug Fixes
* Apply the correct includesAll and includesAny semantics (#819)
=== 2023.0.4
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)
=== 2023.0.3
Thanks to @Andy2003 for their input on several bugs!
==== 🐛 Bug Fixes
* Resolve symbolic names when looking for visited items. (#602)
* Open implicit scope when entering a `UNION` clause. (#590)
* Move resolved symbolic names into `StatementContext`. (#588)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump maven-surefire-plugin from 3.0.0-M7 to 3.0.0-M8 (#555)
** Bump maven-failsafe-plugin from 3.0.0-M7 to 3.0.0-M8 (#560)
** 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 4.11.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.3.1 to 5.5.0 (#592)
** Bump neo4j-cypher-javacc-parser from 5.3.0 to 5.4.0 (#593)
=== 2023.0.2
Thanks to @ikwattro, @lukaseder and @bonelli for their input!
==== 🚀 Features
* Add missing string functions. (#584)
* Add support for rewriting the `MATCH` clause after parsing. (#580)
==== 🐛 Bug Fixes
* Add support for label expressions. (#582)
* Correctly track identifiable elements. (#579)
==== 🧹 Housekeeping
* Dependency upgrades:
** 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)
==== 🛠 Build
* Move the fixed `module-info.java` somewhere out of IDEAs reach.
=== 2023.0.1
This patch releases adds a build-in `length` function for paths (thanks @Lukasmp3 for the request) and fixes issues when running Cypher-DSL on the module path (see c7747ca35 on main for more information).
==== 🚀 Features
* Add `length()` function. (#569)
==== 🔄️ Refactorings
* Replace `requires static transitive` with `requires static`.
=== 2023.0.0
Welcome to 2023, welcome Java 17, welcome Neo4j 5 clauses. This is the first release of the Cypher-DSL requiring Java 17. This is in line with Neo4j itself, Spring Data Neo4j 7 and several other frameworks out there. This allows for more concise code (which is nice for us) as well as using the Neo4j 5 parser in `neo4j-cypher-dsl-parser` module. Bumping the JDK warrants a major upgrade already.
Apart from that we have been very reluctant on breaking changes. As a matter of fact, close to none has been necessary. One of the few improvements that might need changes on your side is #551 (Commit 10080df) in which we improved the `WITH` clause: You might see ambiguous method errors and the fix can be seen https://github.com/neo4j-contrib/cypher-dsl/commit/10080df4c537742218584d80bf4682dd74088a15#diff-dd86a606c4e4fe3151d8d7bb6af70b1aeecb25b5a32bcc9e9862483ca666a261[here] for example: Either use JDK 17 reserved name `var` for local variable type-inference or use explicit `IdentifiableElement`.
There's a lot of new stuff as well: You can now use `Expressions.count` to build new Neo4j 5 `COUNT` expressions and we do support the `USE` clause for composite database queries as well.
Please fear not if you are still on JDK 8: We will maintain the 2022.8.x branch at least as long as Spring Data Neo4j 6.3 is maintained, as the latter is build on top of the Cypher-DSL and is JDK 8, too.
Thanks a lot to our friend @ikwattro from @graphaware for his continuous and well appreciated feedback and input to this project.
==== 🚀 Features
* Add support for the `COUNT {}` sub-query expressions. (#546)
* Pretty print `USE` clause proper. (#543, thanks to @ikwattro for contributing this)
* Add support for the `USE` clause in the DSL. (#542)
==== 🐛 Bug Fixes
* Allow `match` after unwind as defined by OpenCypher. (#531)
==== 🔄️ Refactorings
* Improve `returning` and `with`. (#551)
* Allow `yield *` for standalone calls with arguments, too. (#545, thanks to @zakjan taking the time and report this)
* Upgrade the parser module to use the new Neo4j 5 parser. (#503)
* Migrate the project to Java 17. (#518)
* Prevent usage of `REMOVE` item inside `SET` clause (during RT). (#506)
==== 📖 Documentation
* Update changelog.
* Add section about dialect support.
* Make clear that pretty printing does not always escape names.
* Document correct Java version in `README.adoc`.
==== 🧰 Tasks
* Extend license header to 2023.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump assertj-core from 3.23.1 to 3.24.1 (#549)
** Bump checker-qual from 3.28.0 to 3.29.0 (#548)
** Bump neo4j-java-driver from 5.3.0 to 5.3.1 (#535)
** Bump spring-boot-starter-parent from 3.0.0 to 3.0.1 (#534)
** Bump checkstyle from 10.5.0 to 10.6.0 (#537)
** Bump mockito.version from 4.10.0 to 4.11.0 (#536)
** Bump neo4j-cypher-javacc-parser from 5.2.0 to 5.3.0 (#529)
** Bump annotations from 23.0.0 to 23.1.0 (#521)
** Bump compile-testing from 0.20 to 0.21.0 (#526)
** Bump reactor-bom from 2022.0.0 to 2022.0.1 (#527)
** Bump mockito.version from 4.9.0 to 4.10.0 (#528)
** Bump spring-boot-starter-parent from 2.7.5 to 3.0.0 (#509)
** Bump neo4j-java-driver from 4.4.9 to 5.3.0 (#508)
** Bump checker-qual from 3.27.0 to 3.28.0 (#517)
** Bump compile-testing from 0.19 to 0.20 (#516)
** Bump native-maven-plugin from 0.9.18 to 0.9.19 (#515)
** Bump joda-time from 2.12.1 to 2.12.2 (#514)
** Bump jackson-bom from 2.14.0 to 2.14.1 (#513)
** Bump archunit from 1.0.0 to 1.0.1 (#512)
** Bump native-maven-plugin from 0.9.17 to 0.9.18 (#511)
** Bump checkstyle from 10.4 to 10.5.0 (#510)
==== 🛠 Build
* Add more tests for GH-547.
* Define JaCoCo config in plugin-management. (#541)
* Add `license-maven-plugin` for checking Apache 2 compatible license and header formatting.
* Fix quality gate.
* Verify examples on Java LTS and next version.
* Fix docs build.
* Upgrade various actions to non-deprecated versions. (#519)
================================================
FILE: docs/appendix/2023.1.adoc
================================================
== 2023.1
=== 2023.1.0
2023.1.0 is the first feat release after 2023.0.0 and contains several ideas and improvements that stem from https://github.com/neo4j-contrib/sql2cypher[sql2cypher] and from input by @lukaseder. Thank you!
Additionally, we worked again with @ikwattro from https://graphaware.com[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:
[source,java]
----
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.
================================================
FILE: docs/appendix/2023.2.adoc
================================================
== 2023.2
=== 2023.2.1
==== 🚀 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
Thanks to @Andy2003 for his input on the 2023.2.0 release. The main topic of this release is https://github.com/neo4j-contrib/cypher-dsl/issues/596[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:
[source,java]
----
static boolean areSemanticallyEquivalent(Statement statement1, Map args1, Statement statement2, Map args2) {
if (!areSemanticallyEquivalent(statement1, statement2)) {
return false;
}
var mapping1 = statement1.getCatalog().getRenamedParameters();
var mapping2 = statement2.getCatalog().getRenamedParameters();
for (Map.Entry 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.
================================================
FILE: docs/appendix/2023.3.adoc
================================================
== 2023.3
=== 2023.3.2
==== 🐛 Bug Fixes
* Relationship chains didn't explicitly enter their elements. (#718)
==== 🧹 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
==== 📖 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
==== 🚀 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)
================================================
FILE: docs/appendix/2023.4.adoc
================================================
== 2023.4
=== 2023.4.0
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)
================================================
FILE: docs/appendix/2023.5.adoc
================================================
== 2023.5
=== 2023.5.0
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)
================================================
FILE: docs/appendix/2023.6.adoc
================================================
== 2023.6
=== 2023.6.1
==== 🚀 Features
* Add `isEmpty()`. (#784)
==== 🐛 Bug Fixes
* Use unmodifiable maps instead of copyOf to allow `null` parameters. (#789)
==== 🔄️ Refactorings
* Add tests demonstrating prevention of function calls.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump com.github.siom79.japicmp:japicmp-maven-plugin (#788)
** Bump org.neo4j.driver:neo4j-java-driver (#787)
** Bump org.checkerframework:checker-qual (#786)
** Bump org.springframework.boot:spring-boot-starter-parent (#783)
** Bump com.puppycrawl.tools:checkstyle (#782)
** Bump mockito.version from 5.4.0 to 5.5.0 (#781)
** Bump org.graalvm.buildtools:native-maven-plugin (#780)
** Bump testcontainers.version from 1.18.3 to 1.19.0 (#779)
** Bump org.apache.maven.plugins:maven-enforcer-plugin (#778)
** Bump org.springframework.data:spring-data-neo4j (#775)
** Bump org.neo4j:neo4j-cypher-javacc-parser (#774)
** Bump io.projectreactor:reactor-bom (#773)
** Bump com.tngtech.archunit:archunit from 1.0.1 to 1.1.0 (#772)
** Bump org.asciidoctor:asciidoctorj-diagram (#771)
** Bump org.graalvm.buildtools:native-maven-plugin (#770)
Thanks to @zakjan for a great bug-report again and ofc @ikwattro for your ongoing support and feedback.
=== 2023.6.0
==== 🚀 Features
* Add callbacks for function and procedure invocations. (#764, #758, also backported as 2022.9.0, thanks to @ClemDoum for your input here)
==== 🔄️ Refactorings
* Make TreeNode pretty printing prettier.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump com.google.guava:guava (#769)
** Bump org.checkerframework:checker-qual (#768)
** Bump com.puppycrawl.tools:checkstyle (#767)
** Bump org.asciidoctor:asciidoctorj-diagram (#766)
** Bump org.neo4j.driver:neo4j-java-driver (#765)
** Bump org.neo4j:neo4j-cypher-javacc-parser from 5.9.0 to 5.10.0 (#761)
** Bump checker-qual from 3.35.0 to 3.36.0 (#757)
** Bump spring-data-neo4j from 7.1.1 to 7.1.2 (#759)
** Bump reactor-bom from 2022.0.8 to 2022.0.9 (#760)
** Bump org.junit:junit-bom from 5.9.3 to 5.10.0 (#762)
** Bump org.springframework.boot:spring-boot-starter-parent (#763)
================================================
FILE: docs/appendix/2023.7.adoc
================================================
== 2023.7
=== 2023.7.1
Thanks to @jrsperry for a great bug-report and the fix for `includesAll` and `includesAny`.
==== 🐛 Bug Fixes
* Apply the correct includesAll and includesAny semantics (#819)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump mockito.version from 5.5.0 to 5.6.0 (#812)
** Bump org.springframework.data:spring-data-neo4j (#817)
** Bump com.google.guava:guava (#816)
** Bump org.checkerframework:checker-qual (#809)
** Bump net.bytebuddy:byte-buddy-parent from 1.14.8 to 1.14.9 (#818)
** Bump io.projectreactor:reactor-bom (#815)
** Bump com.fasterxml.jackson:jackson-bom (#814)
** Bump org.neo4j.driver:neo4j-java-driver (#811)
** Bump testcontainers.version from 1.19.0 to 1.19.1 (#810)
** Bump com.puppycrawl.tools:checkstyle (#807)
** Bump com.github.siom79.japicmp:japicmp-maven-plugin (#808)
** Bump org.ow2.asm:asm from 9.5 to 9.6 (#806)
** Bump com.mycila:license-maven-plugin from 4.2.rc2 to 4.3 (#805)
** Bump org.springframework.boot:spring-boot-starter-parent (#804)
** Bump org.apache.maven.plugins:maven-shade-plugin (#803)
** Bump com.github.siom79.japicmp:japicmp-maven-plugin (#802)
** Bump org.graalvm.buildtools:native-maven-plugin (#800)
** Bump io.projectreactor:reactor-bom (#799)
** Bump org.neo4j:neo4j-cypher-javacc-parser (#798)
** Bump org.springframework.data:spring-data-neo4j (#797)
** Bump org.sonarsource.scanner.maven:sonar-maven-plugin (#796)
** Bump org.asciidoctor:asciidoctorj-diagram (#795)
** Bump org.apache.maven.plugins:maven-javadoc-plugin (#794)
** Bump com.opencsv:opencsv from 5.7.1 to 5.8 (#793)
** Bump org.apache.maven.plugins:maven-enforcer-plugin (#792)
** Bump org.graalvm.buildtools:native-maven-plugin (#791)
==== 🛠 Build
* Upgrade Maven wrapper to ASF wrapper 3.2.0 and Maven 3.9.4
* Build and release with Java 21 targeting Java 17. (#801)
=== 2023.7.0
==== 🚀 Features
* Add basic schema enforcement when rendering statements.
* Add basic support for parsing negated types.
* Add basic support for parenthesized path patterns.
================================================
FILE: docs/appendix/2023.8.adoc
================================================
== 2023.8
=== 2023.8.1
==== 🐛 Bug Fixes
* Including aliasing in scoping strategy, too. (#839)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump org.moditect:moditect-maven-plugin (#843)
** Bump com.github.siom79.japicmp:japicmp-maven-plugin (#845)
** Bump com.tngtech.archunit:archunit from 1.1.0 to 1.2.0 (#846)
** Bump org.checkerframework:checker-qual (#844)
** Bump mockito.version from 5.6.0 to 5.7.0 (#842)
** Bump org.junit:junit-bom from 5.10.0 to 5.10.1 (#841)
=== 2023.8.0
This minor release is drop-in compatible with 2023.7, but it adds support for using `COLLECT {}` sub-queries, which required enhancing some interfaces (that only we should implement, but still, it's a minor upgrade then).
The price for finding the most bugs in the scoping strategy applied for sub-queries in this release goes to @Andy2003, thank you!
==== 🚀 Features
* Add support for `COLLECT` subqueries. (#831)
* Make fieldname generator configurable. (#830)
==== 🐛 Bug Fixes
* Make sure local scope is cleared after leaving subquery expressions. (#837)
* Recognize entities defined in sub-queries correctly. (#827)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump org.apache.maven.plugins:maven-surefire-plugin (#836)
** Bump org.apache.maven.plugins:maven-failsafe-plugin (#835)
** Bump org.apache.maven.plugins:maven-checkstyle-plugin (#834)
** Bump org.neo4j.driver:neo4j-java-driver (#833)
** Bump org.neo4j:neo4j-cypher-javacc-parser from 5.12.0 to 5.13.0 (#821)
** Bump com.github.siom79.japicmp:japicmp-maven-plugin (#823)
** Bump org.graalvm.buildtools:native-maven-plugin (#824)
** Bump org.jacoco:jacoco-maven-plugin from 0.8.10 to 0.8.11 (#822)
** Bump org.springframework.boot:spring-boot-starter-parent (#820)
==== 🛠 Build
* Remove explicit management of bytebuddy. (#828)
================================================
FILE: docs/appendix/2023.9.adoc
================================================
== 2023.9
=== 2023.9.8
==== 🐛 Bug Fixes
* Don’t introduce new names in pattern expressions. (#1017)
=== 2023.9.7
Not everything goes as planned ;) Another 2023.9 release, enjoy.
==== 🐛 Bug Fixes
* Use proper generics when generating extensible models. (#974)
* Treat the asterisk correctly in an importing with. (#973)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump org.neo4j.driver:neo4j-java-driver (#978)
** Bump org.apache.maven.plugins:maven-shade-plugin (#977)
** Bump com.github.siom79.japicmp:japicmp-maven-plugin (#976)
** Bump com.puppycrawl.tools:checkstyle (#975)
** Bump neo4j.version from 5.18.1 to 5.19.0 (#965)
** Bump com.tngtech.archunit:archunit from 1.2.1 to 1.3.0 (#966)
** Bump org.springframework.data:spring-data-neo4j (#967)
** Bump io.projectreactor:reactor-bom (#968)
** Bump org.springframework.boot:spring-boot-starter-parent (#971)
** Bump org.apache.maven.plugins:maven-jar-plugin (#972)
==== 🛠 Build
* Fix doc generation.
=== 2023.9.6
**Heads up** this is the last _planned_ release in the 2023.x series.
The next release will be 2024.0.0, in which all deprecations apart from `internalId` on nodes and relationships will be removed.
With that change, the Cypher-DSL will have one single entry point for all operations: `org.neo4j.cypherdsl.core.Cypher`.
Nothing will change in terms of JDK compatibility.
Cypher-DSL 2024 will still require JDK 17, and will run just fine on JDK 21 and higher.
==== 🚀 Features
* Allow calling of raw Cypher strings in sub queries. (#961)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump org.jacoco:jacoco-maven-plugin from 0.8.11 to 0.8.12 (#960)
** Bump org.neo4j.driver:neo4j-java-driver (#959)
** Bump org.apache.maven.plugins:maven-source-plugin (#958)
** Bump com.puppycrawl.tools:checkstyle (#957)
** Bump org.moditect:moditect-maven-plugin (#956)
** Bump neo4j.version from 5.18.0 to 5.18.1 (#955)
** Bump org.ow2.asm:asm from 9.6 to 9.7 (#954)
** Bump org.springframework.boot:spring-boot-starter-parent (#953)
=== 2023.9.5
==== 🚀 Features
* Add a bom project
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump org.springframework.data:spring-data-neo4j
** Bump neo4j.version from 5.17.0 to 5.18.0 (#944)
** Bump com.google.guava:guava (#952)
** Bump io.projectreactor:reactor-bom (#951)
** Bump org.asciidoctor:asciidoctorj from 2.5.11 to 2.5.12 (#950)
** Bump com.fasterxml.jackson:jackson-bom (#949)
** Bump org.sonarsource.scanner.maven:sonar-maven-plugin (#947)
** Bump org.moditect:moditect-maven-plugin (#946)
** Bump com.puppycrawl.tools:checkstyle (#945)
** Bump testcontainers.version from 1.19.6 to 1.19.7 (#942)
** Bump com.github.siom79.japicmp:japicmp-maven-plugin (#941)
** Bump com.fasterxml.jackson:jackson-bom (#940)
** Bump com.github.siom79.japicmp:japicmp-maven-plugin (#938)
** Bump org.neo4j.driver:neo4j-java-driver (#937)
** Bump com.puppycrawl.tools:checkstyle (#936)
** Bump mockito.version from 5.10.0 to 5.11.0 (#935)
=== 2023.9.4
Change parser license to The Apache Software License, Version 2.0 (same as the Neo4j JavaCC based parser, which we use under the hoods).
Thanks a lot @hindog, @fbiville and @Andy2003 for agreeing to relicense your contributions, too.
==== 📖 Documentation
* Use `compile` scope in Gradle dependencies.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump neo4j.version from 5.16.0 to 5.17.0 (#933)
** Bump testcontainers.version from 1.19.5 to 1.19.6 (#934)
** Bump org.apache.maven.plugins:maven-shade-plugin (#932)
** Bump org.springframework.boot:spring-boot-starter-parent (#931)
** Bump org.graalvm.buildtools:native-maven-plugin (#930)
** Bump org.codehaus.mojo:exec-maven-plugin (#929)
** Bump org.asciidoctor:asciidoctor-maven-plugin (#927)
** Bump com.github.siom79.japicmp:japicmp-maven-plugin (#928)
** Bump org.springframework.data:spring-data-neo4j (#926)
** Bump io.projectreactor:reactor-bom (#925)
** Bump org.asciidoctor:asciidoctorj-diagram (#924)
** Bump org.graalvm.buildtools:native-maven-plugin (#919)
** Bump org.assertj:assertj-core from 3.25.2 to 3.25.3 (#918)
** Bump org.asciidoctor:asciidoctorj-diagram (#916)
** Bump org.junit:junit-bom from 5.10.1 to 5.10.2 (#915)
** Bump testcontainers.version from 1.19.4 to 1.19.5 (#923)
** Bump org.asciidoctor:asciidoctor-maven-plugin (#922)
** Bump org.neo4j.driver:neo4j-java-driver (#920)
** Bump joda-time:joda-time from 2.12.6 to 2.12.7 (#917)
=== 2023.9.3
==== 🚀 Features
* Add a parser option to unify the direction of relationships. (#906)
==== 🐛 Bug Fixes
* Driving symbolic names for list predicate function must not be scoped. (#905)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump neo4j.version from 5.15.0 to 5.16.0 (#910)
** Bump org.assertj:assertj-core from 3.25.1 to 3.25.2 (#914)
** Bump com.querydsl:querydsl-core from 5.0.0 to 5.1.0 (#913)
** Bump mockito.version from 5.9.0 to 5.10.0 (#912)
** Bump com.puppycrawl.tools:checkstyle (#911)
** Bump testcontainers.version from 1.19.3 to 1.19.4 (#909)
** Bump org.springframework.boot:spring-boot-starter-parent (#904)
=== 2023.9.2
*Please read the updated stance wrt calver/semver in the README. This release is current and the first one in 2024, including some new, additive and non-breaking features contributed by @Andy2003*
==== 🚀 Features
* Add possibility to define inheritance for the static model. (#894)
==== 🔄️ Refactorings
* Allow unit-subqueries. (#895)
==== 📖 Documentation
* Clarify calver and semver wording.
==== 🧰 Tasks
* Extend license header to 2024.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump org.asciidoctor:asciidoctor-maven-plugin (#902)
** Bump org.apache.maven.plugins:maven-failsafe-plugin (#901)
** Bump mockito.version from 5.8.0 to 5.9.0 (#900)
** Bump org.codehaus.mojo:flatten-maven-plugin (#899)
** Bump org.springframework.data:spring-data-neo4j (#898)
** Bump io.projectreactor:reactor-bom (#897)
** Bump org.apache.maven.plugins:maven-surefire-plugin (#896)
** Bump org.assertj:assertj-core from 3.25.0 to 3.25.1 (#893)
** Bump org.neo4j.driver:neo4j-java-driver (#892)
** Bump joda-time:joda-time from 2.12.5 to 2.12.6 (#891)
** Bump org.asciidoctor:asciidoctorj-diagram (#890)
** Bump com.fasterxml.jackson:jackson-bom (#887)
** Bump org.assertj:assertj-core from 3.24.2 to 3.25.0 (#889)
** Bump com.puppycrawl.tools:checkstyle (#888)
** Bump org.asciidoctor:asciidoctorj from 2.5.10 to 2.5.11 (#886)
** Bump com.google.guava:guava (#885)
** Bump org.springframework.boot:spring-boot-starter-parent (#884)
=== 2023.9.1
==== 🐛 Bug Fixes
* for #840 add missing casts in constructor super calls for relations with generic start or / and end node (#866)
==== 🔄️ Refactorings
* Officially allow label value to be accessed.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump neo4j.version from 5.14.0 to 5.15.0 (#880)
** Bump org.checkerframework:checker-qual (#883)
** Bump io.projectreactor:reactor-bom (#882)
** Bump org.springframework.data:spring-data-neo4j (#881)
** Bump org.apache.maven.plugins:maven-surefire-plugin (#879)
** Bump org.apache.maven.plugins:maven-failsafe-plugin (#878)
** Bump com.puppycrawl.tools:checkstyle (#876)
** Bump net.java.dev.jna:jna from 5.13.0 to 5.14.0 (#877)
** Bump org.checkerframework:checker-qual (#875)
** Bump org.apache.maven.plugins:maven-javadoc-plugin (#874)
** Bump org.neo4j.driver:neo4j-java-driver (#873)
** Bump com.tngtech.archunit:archunit from 1.2.0 to 1.2.1 (#872)
** Bump mockito.version from 5.7.0 to 5.8.0 (#871)
** Bump neo4j.version from 5.13.0 to 5.14.0 (#868)
** Bump testcontainers.version from 1.19.2 to 1.19.3 (#867)
=== 2023.9.0
2023.9 contains several new features: It brings support for parsing and rendering https://neo4j.com/docs/cypher-manual/current/patterns/concepts/#quantified-path-patterns[Quantified Path Patterns (QPP)], shifts to a single, easy to find main entry point to the DSL via just `Cypher` and makes the static code generator a bit more powerful.
While QPP are a powerful feature (have a look at https://medium.com/neo4j/getting-from-denmark-hill-to-gatwick-airport-with-quantified-path-patterns-bed38da27ca1["Getting From Denmark Hill to Gatwick Airport With Quantified Path Patterns"]) to see what you can do with them, I find them hard to read, with all the parentheses and I did not expect them to really fit in well with our builder. However, it turned out that the elements we need to provide in our own AST to render what we parsed do work well: If you decide to build QPP with Cypher-DSL, you can now quantify relationship patterns as a whole or only the relationship, making up already for many uses cases.
The single entry point to our API makes the whole system a lot more discoverable.
@lukaseder did create a ticket for that in the beginning of 2023 and if someone knows the importance of that, he is that someone as the creator of jOOQ.
Thank you, Lukas and of course earlier this week, @Andy2003 for actually doing the work of adding all those methods to `Cypher`.
If you don't care about deprecation warnings, 2023.9.0 will be a drop-in replacement.
The existing entry points won't go away until the next major release, in which they will be made package private.
Until then, they are deprecated.
It my sound like a broken record by now, but again: Thank you, @zakjan and @ikwattro for your input on QPP, now we are waiting for your bug-reports.
==== 🚀 Features
* Provide a single DSL API entry point. (#862)
* Allow parsing of `collect` expression. (#861)
* Add support for quantified path patterns. (#860)
* Add support for predicates inside pattern elements. (#859)
* Add ability to add additional factory methods for relationship models to a node in the static model (#840)
==== 📖 Documentation
* Add example how to access properties of a list element.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump spring-boot-starter-parent from 3.1.5 to 3.2.0
** Bump auto-common to 1.2.2
** Bump errorprone from 2.12.1 to 2.23.0
** Bump sortpom from 2.15.0 to 3.3.0
** Bump com.opencsv:opencsv from 5.8 to 5.9
** Bump testcontainers.version from 1.19.2 to 1.19.3
** Bump testcontainers.version from 1.19.1 to 1.19.2 (#857)
** Bump org.codehaus.mojo:exec-maven-plugin (#856)
** Bump io.projectreactor:reactor-bom (#855)
** Bump com.puppycrawl.tools:checkstyle (#854)
** Bump com.fasterxml.jackson:jackson-bom (#853)
** Bump org.jetbrains:annotations from 24.0.1 to 24.1.0 (#852)
** Bump org.springframework.data:spring-data-neo4j (#851)
** Bump org.apache.maven.plugins:maven-surefire-plugin (#850)
** Bump org.apache.maven.plugins:maven-failsafe-plugin (#849)
** Bump org.apache.maven.plugins:maven-javadoc-plugin (#848)
==== 🛠 Build
* Address several warnings appearing in the build. (#847)
================================================
FILE: docs/appendix/2024.0.adoc
================================================
== 2024.0
=== 2024.0.3
This is mostly a release that upgrades dependency, with the noteworthy exception of having now a unified property accessor.
Thanks to @fbiville for his contribution to the documentation, @loveleif for his support and making the latest Neo4j Cypher parser and its improvements work on the module path again and to @Andy2003 for his latest suggestion of the unified property accessor.
==== 🚀 Features
* Add a common interface `PropertyAccessor` (#908)
==== 📖 Documentation
* Update latest version supporting JDK 8 in README. (#1041)
* Fix documentation link in README (#1026)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump com.google.guava:guava (#1049)
** Bump org.junit:junit-bom from 5.10.3 to 5.11.0 (#1048)
** Bump org.apache.maven.plugins:maven-failsafe-plugin (#1047)
** Bump org.codehaus.mojo:exec-maven-plugin (#1046)
** Bump org.springframework.data:spring-data-neo4j (#1045)
** Bump io.projectreactor:reactor-bom (#1044)
** Bump org.apache.maven.plugins:maven-surefire-plugin (#1043)
** Bump org.apache.maven.plugins:maven-site-plugin (#1042)
** Bump org.codehaus.mojo:exec-maven-plugin (#1040)
** Bump org.checkerframework:checker-qual (#1039)
** Bump testcontainers.version from 1.20.0 to 1.20.1 (#1038)
** Bump neo4j.version from 5.20.0 to 5.22.0 (#1036)
** Bump org.neo4j.driver:neo4j-java-driver (#1037)
** Bump org.springframework.boot:spring-boot-starter-parent (#1035)
** Bump testcontainers.version from 1.19.8 to 1.20.0 (#1034)
** Bump com.github.siom79.japicmp:japicmp-maven-plugin (#1033)
** Bump org.apache.maven.plugins:maven-javadoc-plugin (#1032)
** Bump org.apache.maven.plugins:maven-surefire-plugin (#1030)
** Bump org.apache.maven.plugins:maven-failsafe-plugin (#1029)
** Bump org.springframework.data:spring-data-neo4j (#1028)
** Bump org.assertj:assertj-core from 3.26.0 to 3.26.3 (#1027)
=== 2024.0.2
🎉 The big party release! 🎉
With this release we move the repository from http://github.com/neo4j-contrib/[github.com/neo4j-contrib] to https://github.com/neo4j-contrib[github.com/neo4j] with Neo4j adding Cypher-DSL to the list of supported modules.
What we have now on our todo list is to incorporate our http://neo4j.github.io/cypher-dsl[documentation] into the official Neo4j docs, but apart from that, little will change immediate. Even our Maven coordinates will stay the same. You can however rely on the fact that Cypher-DSL is not going anywhere anytime soon.
Thanks to @stumoore for supporting this!
==== 🐛 Bug Fixes
* Don’t introduce new names in pattern expressions. (#1017)
==== 🧹 Housekeeping
* Dependency upgrades
** Bump io.projectreactor:reactor-bom (#1025)
** Bump org.checkerframework:checker-qual (#1024)
** Bump com.fasterxml.jackson:jackson-bom (#1023)
** Bump org.moditect:moditect-maven-plugin (#1019)
** Bump org.asciidoctor:asciidoctorj-diagram (#1021)
** Bump org.junit:junit-bom from 5.10.2 to 5.10.3 (#1020)
** Bump org.neo4j.driver:neo4j-java-driver (#1018)
** Bump org.springframework.boot:spring-boot-starter-parent (#1016)
** Bump org.apache.maven.plugins:maven-jar-plugin (#1015)
==== 🛠 Build
* Change license for examples that depend on the parser to Apache 2.0, too.
=== 2024.0.1
This is a pure bug-fix release. Thanks to @Andy2003 for spotting yet another scoping issue.
==== 🐛 Bug Fixes
* Include implicit new variables in seed for name generator. (#999)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump io.projectreactor:reactor-bom (#1013)
** Bump org.springframework.data:spring-data-neo4j (#1012)
** Bump org.apache.maven.plugins:maven-failsafe-plugin (#1011)
** Bump org.apache.maven.plugins:maven-surefire-plugin (#1010)
=== 2024.0.0
We're finally going 2024 with this release.
The biggest new feature in this release is that we now allow chaining statements that end with a `YIELD` clause, which lets you compose complex queries in a nicer way.
We also removed all deprecated constructs and methods we accumulated until now. If you ignored the warnings until now, you cannot do any longer. The latest SDN release is prepared for this Cypher-DSL release already, as we did the necessary changes over there already (See this https://github.com/spring-projects/spring-data-neo4j/commit/2861e771333d8b9443026669763ddccd5be7659d[commit] for the necessary changes for example).
==== 🚀 Features
* Allow chaining statements to yielding calls. (#964)
* Allow chainable foreach. (#988)
==== 🐛 Bug Fixes
* Actually make `sortOrderDefaultExpression` test what it is supposed to test.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump org.apache.maven.plugins:maven-shade-plugin (#1006)
** Bump org.neo4j.driver:neo4j-java-driver (#1005)
** Bump org.sonarsource.scanner.maven:sonar-maven-plugin (#1004)
** Bump com.google.guava:guava (#1003)
** Bump org.apache.maven.plugins:maven-enforcer-plugin (#1002)
** Bump org.apache.maven.plugins:maven-javadoc-plugin (#1001)
** Bump com.github.ekryd.sortpom:sortpom-maven-plugin (#992)
** Bump org.assertj:assertj-core from 3.25.3 to 3.26.0 (#998)
** Bump org.springframework.boot:spring-boot-starter-parent (#997)
** Bump com.puppycrawl.tools:checkstyle (#996)
** Bump org.codehaus.mojo:exec-maven-plugin (#995)
** Bump org.asciidoctor:asciidoctorj from 2.5.12 to 2.5.13 (#993)
** Bump org.springframework.data:spring-data-neo4j (#991)
** Bump io.projectreactor:reactor-bom (#990)
** Bump org.graalvm.buildtools:native-maven-plugin (#989)
** Bump com.mycila:license-maven-plugin from 4.3 to 4.5 (#987)
** Bump mockito.version from 5.11.0 to 5.12.0 (#986)
** Bump testcontainers.version from 1.19.7 to 1.19.8 (#985)
** Bump com.google.guava:guava (#982)
** Bump org.checkerframework:checker-qual (#984)
** Bump org.apache.maven.plugins:maven-install-plugin (#983)
** Bump com.github.siom79.japicmp:japicmp-maven-plugin (#981)
** Bump com.fasterxml.jackson:jackson-bom (#980)
** Bump org.apache.maven.plugins:maven-deploy-plugin (#979)
================================================
FILE: docs/appendix/2024.1.adoc
================================================
== 2024.1
=== 2024.1.0
This new minor release adds a third dialect: Neo4j 5.23, catering for Neo4j >= 5.23.
The initial release will rewrite sub-query `CALL` statements with importing `WITH` into sub-queries with variable scoped `CALL` clause.
While the former is still available in Neo4j 5.23, it will cause deprecation warnings, hence, if you want to get rid of those, change the dialect accordingly.
No need to rewrite any query on your own.
==== 🚀 Features
* Add a Neo4j 5.23 dialect. (#1069)
==== 🐛 Bug Fixes
* Unwrap `PatternList` proper if unique.
==== 📖 Documentation
* Add an example of building a stand-alone `WHERE` clause.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump org.checkerframework:checker-qual (#1072)
** Bump actions/download-artifact from 1 to 4.1.7 in /.github/workflows (#1070)
** Bump org.apache.maven.plugins:maven-surefire-plugin (#1068)
** Bump mockito.version from 5.12.0 to 5.13.0 (#1067)
** Bump org.apache.maven.plugins:maven-failsafe-plugin (#1066)
** Bump org.neo4j.driver:neo4j-java-driver (#1065)
** Bump com.puppycrawl.tools:checkstyle (#1064)
** Bump org.apache.maven.plugins:maven-javadoc-plugin (#1063)
** Bump neo4j.version from 5.22.0 to 5.23.0 (#1053)
** Bump org.apache.maven.plugins:maven-install-plugin (#1057)
** Bump org.asciidoctor:asciidoctorj from 2.5.13 to 3.0.0 (#1056)
** Bump org.springframework.boot:spring-boot-starter-parent (#1055)
** Bump org.apache.maven.plugins:maven-deploy-plugin (#1054)
** Bump com.puppycrawl.tools:checkstyle (#1052)
** Bump org.apache.maven.plugins:maven-checkstyle-plugin (#1051)
** Bump com.github.siom79.japicmp:japicmp-maven-plugin (#1050)
================================================
FILE: docs/appendix/2024.2.adoc
================================================
== 2024.2
=== 2024.2.0
A new minor release so shortly after the last?
We changed the behaviour of the renderer when using generated names.
Before and upto including 2024.1.0 we didn't allow aliases to be reused.
If in the original query alias `x` would have been legally reused, we would not have reused them with generated names, i.e. we would have usd `v0` and then `v1`.
I think this is wrong, and we changed this behaviour, hence a new minor is due.
If you are using generated names, you can opt out of this behaviour like this:
[source,java]
----
var generatedNamesConfig = EnumSet.complementOf(EnumSet.of(Configuration.GeneratedNames.REUSE_ALIASES));
var renderer = Renderer.getRenderer(Configuration.newConfig()
.withGeneratedNames(generatedNamesConfig)
.build());
----
Apart from that, this is a drop-in replacement for 2024.1 and 2024.0.
Congratulations to @ali-ince for contributing his first feature.
And last but not least, @Andy2003 gave our AST factory and the scoping mechanism a real good test run, and we have been able to fix several bugs again.
Thank you!
==== 🚀 Features
* Apply sorting of maps when parsing to projections, too. (#1085)
* Add call raw cypher to top level entry point (#1073)
==== 🐛 Bug Fixes
* Don’t introduce new aliases on for each alias used. (#1084)
* Export return variables from unions into scope proper. (#1075)
* Correctly compute imports. (#1076)
==== 📖 Documentation
* Add example test for `LabelExpression`.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump neo4j.version from 5.23.0 to 5.24.0 (#1092)
** Bump com.google.guava:guava (#1095)
** Bump com.mycila:license-maven-plugin from 4.5 to 4.6 (#1090)
** Bump mockito.version from 5.13.0 to 5.14.0 (#1094)
** Bump org.neo4j.driver:neo4j-java-driver (#1093)
** Bump com.fasterxml.jackson:jackson-bom (#1091)
** Bump com.puppycrawl.tools:checkstyle (#1089)
** Bump org.jetbrains:annotations from 24.1.0 to 25.0.0 (#1088)
** Bump org.junit:junit-bom from 5.11.0 to 5.11.1 (#1087)
** Bump org.springframework.boot:spring-boot-starter-parent (#1083)
** Bump net.java.dev.jna:jna from 5.14.0 to 5.15.0 (#1082)
** Bump joda-time:joda-time from 2.12.7 to 2.13.0 (#1081)
** Bump io.projectreactor:reactor-bom (#1080)
** Bump org.springframework.data:spring-data-neo4j (#1079)
** Bump org.graalvm.buildtools:native-maven-plugin (#1078)
================================================
FILE: docs/appendix/2024.3.adoc
================================================
== 2024.3
=== 2024.3.2
==== 🐛 Bug Fixes
* Restore wrongly deleted `module-info.java`
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump org.springframework.data:spring-data-neo4j (#1150)
** Bump io.projectreactor:reactor-bom (#1149)
** Bump com.puppycrawl.tools:checkstyle (#1148)
=== 2024.3.1
==== 🐛 Bug Fixes
* `$` must be escaped in future Cypher versions.
=== 2024.3.0
Thanks to @nk-coding for the idea of supporting label expressions as conditions.
==== 🚀 Features
* Add `hasLabels(LabelExpression labels)` for nodes. (#1146)
==== 📖 Documentation
* Fix typo (#1127)
* Add another example for list comprehensions.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump neo4j.version from 5.25.1 to 5.26.0 (#1142)
** Bump org.checkerframework:checker-qual (#1144)
** Bump org.graalvm.buildtools:native-maven-plugin (#1145)
** Bump org.apache.maven.plugins:maven-javadoc-plugin (#1143)
** Bump com.puppycrawl.tools:checkstyle (#1140)
** Bump com.fasterxml.jackson:jackson-bom (#1139)
** Bump org.neo4j.driver:neo4j-java-driver (#1138)
** Bump testcontainers.version from 1.20.3 to 1.20.4 (#1137)
** Bump org.springframework.data:spring-data-neo4j from 7.3.5 to 7.4.0 (#1133)
** Bump io.projectreactor:reactor-bom (#1136)
** Bump org.neo4j.driver:neo4j-java-driver (#1135)
** Bump org.asciidoctor:asciidoctor-maven-plugin (#1134)
** Bump org.sonarsource.scanner.maven:sonar-maven-plugin (#1132)
** Bump org.neo4j.driver:neo4j-java-driver (#1131)
** Bump org.apache.maven.plugins:maven-site-plugin (#1130)
** Bump org.springframework.boot:spring-boot-starter-parent (#1129)
** Bump com.puppycrawl.tools:checkstyle (#1128)
** Bump neo4j.version from 5.24.2 to 5.25.1 (#1117)
** Bump org.apache.maven.plugins:maven-surefire-plugin (#1121)
** Bump com.puppycrawl.tools:checkstyle (#1120)
** Bump org.apache.maven.plugins:maven-checkstyle-plugin (#1119)
** Bump org.asciidoctor:asciidoctor-maven-plugin (#1122)
** Bump testcontainers.version from 1.20.2 to 1.20.3 (#1123)
** Bump com.fasterxml.jackson:jackson-bom (#1124)
** Bump org.apache.maven.plugins:maven-javadoc-plugin (#1125)
** Bump org.apache.maven.plugins:maven-failsafe-plugin (#1126)
** Bump org.checkerframework:checker-qual (#1118)
** Bump com.puppycrawl.tools:checkstyle (#1114)
** Bump org.neo4j.driver:neo4j-java-driver (#1112)
** Bump org.junit:junit-bom from 5.11.2 to 5.11.3 (#1116)
** Bump org.codehaus.mojo:exec-maven-plugin (#1115)
** Bump io.projectreactor:reactor-bom (#1111)
** Bump org.jetbrains:annotations from 25.0.0 to 26.0.1 (#1110)
** Bump org.springframework.data:spring-data-neo4j (#1109)
** Bump neo4j.version from 5.24.1 to 5.24.2 (#1108)
** Bump mockito.version from 5.14.1 to 5.14.2 (#1107)
** Bump org.checkerframework:checker-qual (#1105)
** Bump org.junit:junit-bom from 5.11.1 to 5.11.2 (#1104)
** Bump org.apache.maven.plugins:maven-javadoc-plugin (#1103)
** Bump org.apache.maven.plugins:maven-failsafe-plugin (#1102)
** Bump org.apache.maven.plugins:maven-surefire-plugin (#1101)
** Bump mockito.version from 5.14.0 to 5.14.1 (#1100)
** Bump neo4j.version from 5.24.0 to 5.24.1 (#1099)
** Bump org.checkerframework:checker-qual (#1098)
** Bump testcontainers.version from 1.20.1 to 1.20.2 (#1097)
** Bump org.ow2.asm:asm from 9.7 to 9.7.1 (#1096)
================================================
FILE: docs/appendix/2024.4.adoc
================================================
== 2024.4
=== 2024.4.0
Thanks to @meistermeier for both the bugfix in scoping of existential subqueries and kicking off the support for the `FINISH` clause, to finish of 2024 in style.
Happy holidays and all the best for 2025, we are looking forward helping more projects with Cypher-DSL 2025 next year.
==== 🚀 Features
* Add support for creating and parsing the `FINISH` clause.
==== 🐛 Bug Fixes
* Fix scoping issue with existential subquery (#1151)
=== 2024.4.1
==== 🧰 Tasks
* Extend license header to 2025.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump neo4j.version from 5.26.1 to 5.26.2 (#1176)
** Bump org.checkerframework:checker-qual (#1177)
** Bump org.neo4j.driver:neo4j-java-driver (#1175)
** Bump joda-time:joda-time from 2.13.0 to 2.13.1 (#1174)
** Bump org.graalvm.buildtools:native-maven-plugin (#1173)
** Bump org.springframework.boot:spring-boot-starter-parent (#1172)
** Bump com.puppycrawl.tools:checkstyle (#1171)
** Bump org.jetbrains:annotations from 26.0.1 to 26.0.2 (#1170)
** Bump org.assertj:assertj-core from 3.27.2 to 3.27.3 (#1168)
** Bump io.projectreactor:reactor-bom (#1167)
** Bump org.springframework.data:spring-data-neo4j (#1166)
** Bump neo4j.version from 5.26.0 to 5.26.1 (#1165)
** Bump com.github.siom79.japicmp:japicmp-maven-plugin (#1164)
** Bump com.opencsv:opencsv from 5.9 to 5.10 (#1163)
** Bump com.puppycrawl.tools:checkstyle (#1159)
** Bump org.springframework.boot:spring-boot-starter-parent (#1154)
** Bump net.java.dev.jna:jna from 5.15.0 to 5.16.0 (#1155)
** Bump org.junit:junit-bom from 5.11.3 to 5.11.4 (#1157)
** Bump com.google.guava:guava (#1158)
** Bump org.checkerframework:checker-qual (#1160)
** Bump mockito.version from 5.14.2 to 5.15.2 (#1161)
** Bump org.assertj:assertj-core from 3.26.3 to 3.27.2 (#1162)
==== 🛠 Build
* Add announcement notifier.
================================================
FILE: docs/appendix/2024.5.adoc
================================================
== 2024.5
=== 2024.5.2
Take note that this release deprecates direct integrations with the Neo4j Java Driver. They have never been used widely and can be easily added when needed in calling code.
Removing them from Cypher-DSL avoid unnessary complexity in dependency management.
==== 🔄️ Refactorings
refactor: Deprecate all driver integrations from Cypher-DSL side. (#1211)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump org.checkerframework:checker-qual (#1233)
** Bump com.puppycrawl.tools:checkstyle (#1232)
** Bump org.springframework.boot:spring-boot-starter-parent (#1231)
** Bump com.google.guava:guava (#1230)
** Bump io.projectreactor:reactor-bom (#1229)
** Bump org.junit:junit-bom from 5.12.1 to 5.12.2 (#1228)
** Bump org.jacoco:jacoco-maven-plugin from 0.8.12 to 0.8.13 (#1226)
** Bump org.asciidoctor:asciidoctorj-diagram (#1223)
** Bump mockito.version from 5.16.1 to 5.17.0 (#1222)
** Bump neo4j.version from 5.26.4 to 5.26.5 (#1221)
** Bump org.apache.maven.plugins:maven-failsafe-plugin (#1220)
** Bump org.asciidoctor:asciidoctor-maven-plugin (#1219)
** Bump org.apache.maven.plugins:maven-surefire-plugin (#1218)
** Bump org.springframework.boot:spring-boot-starter-parent (#1217)
** Bump com.google.guava:guava (#1216)
** Bump com.puppycrawl.tools:checkstyle (#1215)
** Bump org.sonarsource.scanner.maven:sonar-maven-plugin (#1214)
** Bump joda-time:joda-time from 2.13.1 to 2.14.0 (#1213)
** Bump org.ow2.asm:asm from 9.7.1 to 9.8 (#1212)
** Bump testcontainers.version from 1.20.5 to 1.20.6 (#1207)
** Bump org.junit:junit-bom from 5.12.0 to 5.12.1 (#1209)
** Bump io.projectreactor:reactor-bom (#1210)
** Bump org.graalvm.buildtools:native-maven-plugin (#1208)
** Bump net.java.dev.jna:jna from 5.16.0 to 5.17.0 (#1206)
** Bump org.springframework.data:spring-data-neo4j (#1205)
** Bump com.mycila:license-maven-plugin from 4.6 to 5.0.0 (#1204)
** Bump com.google.guava:guava (#1203)
** Bump neo4j.version from 5.26.3 to 5.26.4 (#1202)
** Bump mockito.version from 5.16.0 to 5.16.1 (#1201)
=== 2024.5.1
==== 🐛 Bug Fixes
* Use a `Pattern` typed subtree for a list of patterns in an existential subquery. (#1200)
==== 📖 Documentation
* Add an example for setting multiple labels. (#1199)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump org.neo4j.driver:neo4j-java-driver (#1198)
** Bump com.puppycrawl.tools:checkstyle (#1197)
** Bump org.checkerframework:checker-qual (#1195)
** Bump mockito.version from 5.15.2 to 5.16.0 (#1194)
** Bump org.codehaus.mojo:flatten-maven-plugin (#1192)
** Bump org.apache.maven.plugins:maven-deploy-plugin (#1191)
** Bump com.fasterxml.jackson:jackson-bom (#1190)
** Bump neo4j.version from 5.26.2 to 5.26.3 (#1189)
** Bump org.apache.maven.plugins:maven-install-plugin (#1188)
** Bump org.jreleaser:jreleaser-maven-plugin (#1187)
=== 2024.5.0
This new minor release does not have any breaking changes.
A new dialect dubbed 5.26 has been introduced.
When configured, the renderer will prefix all queries with `CYPHER 5`, which is compatible with Neo4j 5.26 as well as the main line 2025.x.
It ensures that a future version of Neo4j will treat all queries generated with Cypher-DSL as Cypher 5, even when newer Cypher versions become available.
==== 🚀 Features
* Introduce Dialect 5.26 (#1185)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump testcontainers.version from 1.20.4 to 1.20.5 (#1184)
** Bump org.springframework.boot:spring-boot-starter-parent (#1183)
** Bump org.junit:junit-bom from 5.11.4 to 5.12.0 (#1182)
** Bump com.puppycrawl.tools:checkstyle (#1181)
** Bump io.projectreactor:reactor-bom (#1180)
** Bump org.springframework.data:spring-data-neo4j (#1179)
** Bump com.tngtech.archunit:archunit from 1.3.0 to 1.4.0 (#1178)
==== 🛠 Build
* fix: The default of `structuredMessage` is `false`. (Internal release announcer)
================================================
FILE: docs/appendix/2024.6.adoc
================================================
== 2024.6
=== 2024.6.1
==== 🐛 Bug Fixes
* Don't change simple case to generic case.
==== 🔄️ Refactorings
* Add better error messages when attempting to continue subquery without `with`.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump org.neo4j.driver:neo4j-java-driver (#1242)
** Bump org.springframework.data:spring-data-neo4j (#1239)
** Bump com.opencsv:opencsv from 5.10 to 5.11 (#1237)
** Bump com.tngtech.archunit:archunit from 1.4.0 to 1.4.1 (#1243)
** Bump org.jreleaser:jreleaser-maven-plugin (#1241)
** Bump com.fasterxml.jackson:jackson-bom (#1240)
** Bump testcontainers.version from 1.20.6 to 1.21.0 (#1238)
** Bump neo4j.version from 5.26.5 to 5.26.6 (#1236)
=== 2024.6.0
Take note that this release deprecates direct integrations with the Neo4j Java Driver. They have never been used widely and can be easily added when needed in calling code.
Removing them from Cypher-DSL avoid unnessary complexity in dependency management.
==== 🔄️ Refactorings
* refactor: Deprecate all driver integrations from Cypher-DSL side. (#1211)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump org.checkerframework:checker-qual (#1233)
** Bump com.puppycrawl.tools:checkstyle (#1232)
** Bump org.springframework.boot:spring-boot-starter-parent (#1231)
** Bump com.google.guava:guava (#1230)
** Bump io.projectreactor:reactor-bom (#1229)
** Bump org.junit:junit-bom from 5.12.1 to 5.12.2 (#1228)
** Bump org.jacoco:jacoco-maven-plugin from 0.8.12 to 0.8.13 (#1226)
** Bump org.asciidoctor:asciidoctorj-diagram (#1223)
** Bump mockito.version from 5.16.1 to 5.17.0 (#1222)
** Bump neo4j.version from 5.26.4 to 5.26.5 (#1221)
** Bump org.apache.maven.plugins:maven-failsafe-plugin (#1220)
** Bump org.asciidoctor:asciidoctor-maven-plugin (#1219)
** Bump org.apache.maven.plugins:maven-surefire-plugin (#1218)
** Bump org.springframework.boot:spring-boot-starter-parent (#1217)
** Bump com.google.guava:guava (#1216)
** Bump com.puppycrawl.tools:checkstyle (#1215)
** Bump org.sonarsource.scanner.maven:sonar-maven-plugin (#1214)
** Bump joda-time:joda-time from 2.13.1 to 2.14.0 (#1213)
** Bump org.ow2.asm:asm from 9.7.1 to 9.8 (#1212)
** Bump testcontainers.version from 1.20.5 to 1.20.6 (#1207)
** Bump org.junit:junit-bom from 5.12.0 to 5.12.1 (#1209)
** Bump io.projectreactor:reactor-bom (#1210)
** Bump org.graalvm.buildtools:native-maven-plugin (#1208)
** Bump net.java.dev.jna:jna from 5.16.0 to 5.17.0 (#1206)
** Bump org.springframework.data:spring-data-neo4j (#1205)
** Bump com.mycila:license-maven-plugin from 4.6 to 5.0.0 (#1204)
** Bump com.google.guava:guava (#1203)
** Bump neo4j.version from 5.26.3 to 5.26.4 (#1202)
** Bump mockito.version from 5.16.0 to 5.16.1 (#1201)
================================================
FILE: docs/appendix/2024.7.adoc
================================================
== 2024.7
=== 2024.7.4
==== 🚀 Features
* Add support for `ORDER BY` after match.
=== 2024.7.3
==== 🐛 Bug Fixes
* Improve rendering of the importing `CALL` clause.
* Clearing the scoping strategy could lead to a premature resolution of symbolic names.
* Add back a test-class deleted by accident.
=== 2024.7.2
This is a dependency upgrade release only.
The next release will most likely be the first 2025.x release with some new features, removal of deprecations and some of the meta-annotations that we use.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump com.opencsv:opencsv from 5.11.2 to 5.12.0 (#1290)
** Bump org.springframework.boot:spring-boot-starter-parent (#1289)
** Bump org.junit:junit-bom from 5.13.3 to 5.13.4 (#1288)
** Bump org.neo4j.driver:neo4j-java-driver (#1280)
** Bump com.fasterxml.jackson:jackson-bom (#1285)
** Bump org.springframework.data:spring-data-neo4j (#1284)
** Bump org.graalvm.buildtools:native-maven-plugin (#1283)
** Bump io.projectreactor:reactor-bom (#1282)
** Bump org.apache.maven.plugins:maven-enforcer-plugin (#1281)
** Bump org.moditect:moditect-maven-plugin (#1279)
** Bump org.neo4j.driver:neo4j-java-driver from 5.28.5 to 5.28.8 (#1277)
** Bump org.junit:junit-bom from 5.13.1 to 5.13.3 (#1274)
** Bump org.checkerframework:checker-qual (#1272)
** Bump neo4j.version from 5.26.8 to 5.26.9 (#1278)
** Bump org.apache.maven.plugins:maven-enforcer-plugin (#1276)
** Bump org.jreleaser:jreleaser-maven-plugin (#1275)
** Bump testcontainers.version from 1.21.2 to 1.21.3 (#1269)
** Bump com.puppycrawl.tools:checkstyle (#1268)
=== 2024.7.1
==== 📖 Documentation
* Fix copyright date.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump testcontainers.version from 1.21.1 to 1.21.2 (#1263)
** Bump com.opencsv:opencsv from 5.11.1 to 5.11.2 (#1266)
** Bump org.asciidoctor:asciidoctorj-diagram (#1265)
** Bump org.springframework.boot:spring-boot-starter-parent (#1264)
** Bump com.puppycrawl.tools:checkstyle (#1262)
** Bump io.projectreactor:reactor-bom (#1261)
** Bump org.springframework.data:spring-data-neo4j (#1260)
** Bump com.fasterxml.jackson:jackson-bom (#1259)
** Bump org.codehaus.mojo:flatten-maven-plugin (#1267)
** Bump neo4j.version from 5.26.7 to 5.26.8 (#1258)
** Bump org.checkerframework:checker-qual (#1257)
** Bump org.junit:junit-bom from 5.13.0 to 5.13.1 (#1256)
** Bump com.opencsv:opencsv from 5.11 to 5.11.1 (#1254)
** Bump org.codehaus.mojo:exec-maven-plugin (#1255)
** Bump neo4j.version from 5.26.6 to 5.26.7 (#1253)
** Bump org.junit:junit-bom from 5.12.2 to 5.13.0 (#1252)
** Bump com.puppycrawl.tools:checkstyle (#1251)
** Bump testcontainers.version from 1.21.0 to 1.21.1 (#1250)
=== 2024.7.0
This is a feature release that is fully compatible with the previous 2024.6 and earlier series.
==== 🚀 Features
* Add support for `SHORTEST k`, `SHORTEST k GROUPS`, `ALL SHORTEST` and `ANY` path selectors. (#1247)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump mockito.version from 5.17.0 to 5.18.0 (#1249)
** Bump com.puppycrawl.tools:checkstyle (#1248)
** Bump org.springframework.data:spring-data-neo4j from 7.4.5 to 7.5.0 (#1245)
** Bump io.projectreactor:reactor-bom (#1246)
================================================
FILE: docs/appendix/2025.0.adoc
================================================
== 2025.0
=== 2025.0.3
==== 🚀 Features
* Add support for `ORDER BY` after match.
* Make dynamic labels configurable even on latest dialects.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump org.springframework.boot:spring-boot-starter-parent (#1349)
** Bump org.apache.maven.plugins:maven-javadoc-plugin (#1348)
** Bump quarkus.platform.version from 3.26.3 to 3.26.4 (#1347)
** Bump org.neo4j:neo4j-ogm-quarkus from 3.16.0 to 3.16.1 (#1346)
** Bump mockito.version from 5.19.0 to 5.20.0 (#1344)
** Bump org.assertj:assertj-core from 3.27.4 to 3.27.5 (#1343)
** Bump org.codehaus.mojo:flatten-maven-plugin (#1342)
=== 2025.0.2
==== 🚀 Features
* Add support for rendering some label expressions for older Neo4j versions.
* Deduplicate parameters while collecting.
* Add support for dynamic label expression in the `REMOVE` clause. (#1325)
* Add support for dynamic label expression in the `SET` clause. (#1324)
* Add support for dynamic label expressions. (#1323)
==== 🐛 Bug Fixes
* Extract parameters from Label expressions, too.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump Neo4j-OGM and OGM-Quarkus example to 4.0.20.
** Bump org.checkerframework:checker-qual (#1338)
** Bump com.google.testing.compile:compile-testing (#1336)
** Bump org.apache.maven.plugins:maven-failsafe-plugin (#1335)
** Bump quarkus.platform.version from 3.26.2 to 3.26.3 (#1334)
** Bump org.springframework.data:spring-data-neo4j (#1333)
** Bump org.apache.maven.plugins:maven-surefire-plugin (#1332)
** Bump org.apache.maven.plugins:maven-shade-plugin (#1331)
** Bump com.google.testing.compile:compile-testing from 0.21.0 to 0.22.0 (#1328)
** Bump quarkus.platform.version from 3.26.1 to 3.26.2 (#1330)
** Bump neo4j.version from 5.26.11 to 5.26.12 (#1329)
* Restore `QueryDSLAdapterTests` once again.
=== 2025.0.1
==== 🔄️ Refactorings
* Existential subqueries in latest Neo4j do work with multiple matches, too. (#1322)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump org.checkerframework:checker-qual (#1321)
** Bump quarkus.platform.version from 3.25.4 to 3.26.1 (#1320)
** Bump neo4j.version from 5.26.10 to 5.26.11 (#1319)
** Bump org.sonarsource.scanner.maven:sonar-maven-plugin (#1318)
** Bump org.jreleaser:jreleaser-maven-plugin (#1317)
** Bump com.fasterxml.jackson:jackson-bom (#1316)
** Bump com.puppycrawl.tools:checkstyle from 11.0.0 to 11.0.1 (#1315)
** Bump quarkus.platform.version from 3.25.3 to 3.25.4 (#1312)
** Bump org.springframework.boot:spring-boot-starter-parent (#1311)
=== 2025.0.0
It's about time to create a 2025 major release of Cypher-DSL.
First things first: We removed the deprecated, direct integration of the Neo4j Java driver.
That integration used to allow making all Cypher-DSL statements "executable", that is: You were able to pass a query executor to them and get results back.
It has been used in https://github.com/spring-projects/spring-data-neo4j[Spring Data Neo4j] testing code, but not much anywhere else.
We removed it because it started to became costly: The common Neo4j Java driver and it's dependency will change a lot in their 6.x series, and especially the dependencies will drag us down.
Cypher-DSL is a project that is used by Spring Data Neo4j, https://github.com/neo4j/neo4j-jdbc[Neo4j JDBC Driver] and many more. All of them need to keep an eye on dependency management, hence we prefer to be more lightweight here again.
You won't notice a difference in most use-cases.
With this major we welcome and thank @Shinigami92 as first-time contributor to the ecosystem.
They took inspiration of the Spring Data Neo4j annotation processor and started off a similar processor for https://github.com/neo4j/neo4j-ogm[Neo4j-OGM], so that you can now enjoy a static metamodel based on Cypher-DSL for Neo4j-OGM as well.
A usecase might be in a Quarkus application.
==== 🚀 Features
* Enhance old dialects to render `ALL SHORTEST` and `SHORTEST 1` as legacy functions.
* Add an annotation processor for Neo4j-OGM annotations. (#1287)
==== 🐛 Bug Fixes
* Improve rendering of the importing `CALL` clause.
* Clearing the scoping strategy could lead to a premature resolution of symbolic names.
==== 🔄️ Refactorings
* Make Neo4j 5 the default dialect, promote the usage of a dialect without Cypher prefix.
* Remove the remaining bits of driver dependencies.
* Use Spring-Java-Formatter and corresponding checkstyle config. (#1308)
* Remove JetBrains annotations. (#1294)
* Remove deprecated features and unnecessary suppressions. (#1292)
==== 🧹 Housekeeping
* Remove superfluous .editorconfig
* Dependency upgrades:
** Bump org.springframework.data:spring-data-neo4j (#1307)
** Bump quarkus.platform.version from 3.24.5 to 3.25.3 (#1306)
** Bump io.projectreactor:reactor-bom (#1305)
** Bump mockito.version from 5.18.0 to 5.19.0 (#1304)
** Bump org.apache.maven.plugins:maven-javadoc-plugin (#1303)
** Bump neo4j.version from 5.26.9 to 5.26.10 (#1302)
** Bump com.puppycrawl.tools:checkstyle from 10.26.1 to 11.0.0 (#1301)
** Bump org.assertj:assertj-core from 3.27.3 to 3.27.4 (#1299)
** Bump org.codehaus.mojo:flatten-maven-plugin (#1297)
================================================
FILE: docs/appendix/2025.1.adoc
================================================
== 2025.1
=== 2025.1.0
==== 🚀 Features
* Add option `org.neo4j.cypherdsl.codegen.excludes` for excluding types from processing. (#1363, codegen)
==== 🐛 Bug Fixes
* Generate relationship meta model always per package and in the package of the start node. (codegen)
==== 🧹 Housekeeping
* Dependency upgrades:
** Upgrade to latest OGM and OGM Quarkus including driver 6.
** Bump com.github.siom79.japicmp:japicmp-maven-plugin (#1367)
** Bump org.ow2.asm:asm from 9.8 to 9.9 (#1372)
** Bump com.puppycrawl.tools:checkstyle from 11.1.0 to 12.0.1 (#1371)
** Bump org.codehaus.mojo:exec-maven-plugin (#1370)
** Bump neo4j.version from 5.26.12 to 5.26.13 (#1369)
** Bump quarkus.platform.version from 3.28.2 to 3.28.3 (#1368)
** Bump org.jacoco:jacoco-maven-plugin from 0.8.13 to 0.8.14 (#1366)
** Bump org.junit:junit-bom from 5.13.4 to 6.0.0 (#1365)
** Bump org.checkerframework:checker-qual (#1357)
** Bump com.github.siom79.japicmp:japicmp-maven-plugin (#1362)
** Bump org.apache.maven.plugins:maven-enforcer-plugin (#1361)
** Bump quarkus.platform.version from 3.26.4 to 3.28.2 (#1356)
** Bump org.assertj:assertj-core from 3.27.5 to 3.27.6 (#1355)
** Bump com.puppycrawl.tools:checkstyle from 11.0.1 to 11.1.0 (#1354)
** Bump org.graalvm.buildtools:native-maven-plugin (#1352)
================================================
FILE: docs/appendix/2025.2.adoc
================================================
== 2025.2
=== 2025.2.7
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump com.puppycrawl.tools:checkstyle from 13.4.0 to 13.4.2 (#1508)
** Bump org.testcontainers:testcontainers-bom (#1502)
** Bump org.graalvm.buildtools:native-maven-plugin (#1503)
** Bump neo4j.version from 5.26.24 to 5.26.25 (#1504)
** Bump org.springframework.boot:spring-boot-starter-parent (#1506)
** Bump org.sonarsource.scanner.maven:sonar-maven-plugin (#1507)
** Bump org.checkerframework:checker-qual (#1509)
** Bump quarkus.platform.version from 3.34.5 to 3.35.1 (#1510)
** Bump com.fasterxml.jackson:jackson-bom (#1511)
** Bump org.neo4j.driver:neo4j-java-driver (#1512)
** Bump slf4j to 2.0.17.
** Bump com.puppycrawl.tools:checkstyle from 13.3.0 to 13.4.0 (#1489)
** Bump neo4j.version from 5.26.23 to 5.26.24 (#1491)
** Bump org.checkerframework:checker-qual (#1495)
** Bump org.springframework.data:spring-data-neo4j (#1496)
** Bump quarkus.platform.version from 3.32.4 to 3.34.5 (#1497)
** Bump org.neo4j.driver:neo4j-java-driver (#1498)
** Bump com.tngtech.archunit:archunit from 1.4.1 to 1.4.2 (#1499)
** Bump com.google.guava:guava (#1500)
** Bump com.github.siom79.japicmp:japicmp-maven-plugin (#1501)
=== 2025.2.6
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump org.neo4j:neo4j-ogm-quarkus from 4.2.4 to 4.2.5
** Bump org.neo4j:neo4j-ogm-core from 5.0.3 to 5.0.4 (#1476)
** Bump neo4j.version from 5.26.22 to 5.26.23 (#1477)
** Bump org.asciidoctor:asciidoctorj-diagram (#1478)
** Bump com.fasterxml.jackson:jackson-bom (#1480)
** Bump org.springframework.data:spring-data-neo4j (#1481)
** Bump quarkus.platform.version from 3.32.2 to 3.32.4 (#1482)
** Bump org.testcontainers:testcontainers-bom (#1483)
** Bump org.neo4j.driver:neo4j-java-driver (#1485)
** Bump org.graalvm.buildtools:native-maven-plugin (#1486)
** Bump org.springframework.boot:spring-boot-starter-parent (#1487)
=== 2025.2.5
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump org.neo4j:neo4j-ogm-quarkus from 4.2.3 to 4.2.4 (#1475)
** Bump neo4j.version from 5.26.21 to 5.26.22 (#1474)
** Bump mockito.version from 5.22.0 to 5.23.0 (#1473)
** Bump org.checkerframework:checker-qual (#1472)
** Bump org.asciidoctor:asciidoctorj-diagram (#1471)
** Bump joda-time:joda-time from 2.14.0 to 2.14.1 (#1470)
** Bump org.graalvm.buildtools:native-maven-plugin (#1469)
** Bump org.apache.maven.plugins:maven-resources-plugin (#1468)
** Bump quarkus.platform.version from 3.32.1 to 3.32.2 (#1467)
** Bump org.apache.maven.plugins:maven-shade-plugin (#1466)
** Bump org.jreleaser:jreleaser-maven-plugin (#1465)
** Bump quarkus.platform.version from 3.31.4 to 3.32.1 (#1464)
** Bump com.puppycrawl.tools:checkstyle from 13.2.0 to 13.3.0 (#1463)
** Bump mockito.version from 5.21.0 to 5.22.0 (#1462)
** Bump org.neo4j:neo4j-ogm-core from 5.0.2 to 5.0.3 (#1461)
** Bump org.apache.maven.plugins:maven-surefire-plugin (#1460)
** Bump org.apache.maven.plugins:maven-failsafe-plugin (#1459)
** Bump com.fasterxml.jackson:jackson-bom (#1458)
** Bump org.neo4j:neo4j-ogm-quarkus from 4.2.2 to 4.2.3 (#1457)
** Bump org.springframework.boot:spring-boot-starter-parent (#1456)
** Bump quarkus.platform.version from 3.31.3 to 3.31.4 (#1455)
** Bump org.neo4j.driver:neo4j-java-driver (#1454)
=== 2025.2.4
==== 🐛 Bug Fixes
* Don’t generate meta model that cannot be initialized. (#1450)
==== 🔄️ Refactorings
* Don’t use date parts for duration literals. (#1449)
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump org.springframework.data:spring-data-neo4j (#1453)
** Bump quarkus.platform.version from 3.31.1 to 3.31.3 (#1452)
** Bump org.junit:junit-bom from 6.0.2 to 6.0.3 (#1451)
** Bump org.checkerframework:checker-qual (#1448)
** Bump com.puppycrawl.tools:checkstyle from 13.1.0 to 13.2.0 (#1447)
** Bump neo4j.version from 5.26.20 to 5.26.21 (#1445)
** Bump com.puppycrawl.tools:checkstyle from 13.0.0 to 13.1.0 (#1444)
** Bump quarkus.platform.version from 3.30.8 to 3.31.1 (#1443)
** Bump org.springframework.boot:spring-boot-starter-parent (#1442)
** Bump org.assertj:assertj-core from 3.27.6 to 3.27.7 (#1441)
** Bump quarkus.platform.version from 3.30.6 to 3.30.8 (#1440)
** Bump neo4j.version from 5.26.19 to 5.26.20 (#1439)
** Bump org.graalvm.buildtools:native-maven-plugin (#1438)
** Bump com.github.siom79.japicmp:japicmp-maven-plugin (#1437)
** Bump org.springframework.data:spring-data-neo4j (#1435)
** Bump com.fasterxml.jackson:jackson-bom (#1434)
** Bump org.neo4j:neo4j-ogm-core and quarkus integration to latest.
==== 🛠 Build
* Disable testing of all Neo4j versions for schema names on GitHub.
=== 2025.2.3
Happy new year. This first Cypher-DSL release of 2026 just contains updated dependencies.
==== 🧰 Tasks
* Extend license header to 2026.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump com.puppycrawl.tools:checkstyle from 12.3.0 to 13.0.0 (#1429)
** Bump org.springframework.data:spring-data-neo4j (#1431)
** Bump org.junit:junit-bom from 6.0.1 to 6.0.2 (#1430)
** Bump org.checkerframework:checker-qual (#1428)
** Bump org.jreleaser:jreleaser-maven-plugin (#1427)
** Bump quarkus.platform.version from 3.30.4 to 3.30.6 (#1426)
** Bump com.github.siom79.japicmp:japicmp-maven-plugin (#1425)
** Bump org.ow2.asm:asm from 9.9 to 9.9.1 (#1424)
** Bump quarkus.platform.version from 3.30.2 to 3.30.4 (#1423)
** Bump org.testcontainers:testcontainers-bom (#1422)
** Bump org.codehaus.mojo:exec-maven-plugin (#1421)
** Bump com.puppycrawl.tools:checkstyle from 12.2.0 to 12.3.0 (#1420)
** Bump neo4j.version from 5.26.18 to 5.26.19 (#1419)
** Bump org.springframework.boot:spring-boot-starter-parent (#1418)
** Bump com.github.siom79.japicmp:japicmp-maven-plugin (#1417)
** Bump mockito.version from 5.20.0 to 5.21.0 (#1416)
** Bump org.apache.maven.plugins:maven-resources-plugin (#1415)
==== 🛠 Build
* Require Java 25 for the build consistently, release with 17. (#1432)
* Ignore `.git-blame-ignore-revs` during license check.
* Add shims to start Maven warning free on JDK 25.
* Update required Maven version and Maven wrapper to 3.9.12.
=== 2025.2.2 🎅🏻
Thanks for another year of Cypher-DSL, with good feedback, excellent bug-reports and more.
Merry Christmas and happy holidays. This release contains only updated dependencies.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump org.neo4j:neo4j-ogm-core from 5.0.0 to 5.0.1 (#1414)
** Bump org.checkerframework:checker-qual (#1411)
** Bump neo4j.version from 5.26.17 to 5.26.18 (#1405)
** Bump org.testcontainers:testcontainers-bom (#1406)
** Bump org.asciidoctor:asciidoctorj-diagram (#1407)
** Bump quarkus.platform.version from 3.29.4 to 3.30.2 (#1409)
** Bump org.apache.maven.plugins:maven-source-plugin (#1410)
** Bump org.sonarsource.scanner.maven:sonar-maven-plugin (#1412)
** Bump com.puppycrawl.tools:checkstyle from 12.1.2 to 12.2.0 (#1413)
=== 2025.2.1
No breaking changes. The updated Spring Boot bits only do affect our own testing. Cypher-DSL does not use anything, either from Spring, Spring Boot or Quarkus directly, hence you can use this release equally with Spring Boot 3 or 4. The same is true for Spring Data Neo4j and OGM, in case you use the Cypher-DSL annotation processor. None of the annotations Cypher-DSL understands has changed in their major releases.
Thanks to @pecollet for finding another—and quite some nasty— bug in the way Cypher-DSL traverses Label expressions.
==== 🚀 Features
==== 🐛 Bug Fixes
* Leave the `Labels` expression in all cases and handlers if a delegation had been made.
==== 🔄️ Refactorings
* Adapt to changes in Spring Boot 4.
==== 🧰 Tasks
* Configure ignored blame revs.
==== 🧹 Housekeeping
* Dependency upgrades:
** Bump org.neo4j:neo4j-ogm-quarkus from 4.1.0 to 4.2.0
** Bump org.springframework.data:spring-data-neo4j
** Bump org.springframework.boot:spring-boot-starter-parent
** Bump org.sonarsource.scanner.maven:sonar-maven-plugin (#1402)
** Bump com.puppycrawl.tools:checkstyle from 12.1.1 to 12.1.2 (#1401)
** Bump quarkus.platform.version from 3.29.2 to 3.29.4 (#1399)
** Bump neo4j.version from 5.26.16 to 5.26.17 (#1397)
** Bump org.apache.maven.plugins:maven-jar-plugin (#1396)
** Bump org.graalvm.buildtools:native-maven-plugin (#1395)
** Bump com.github.siom79.japicmp:japicmp-maven-plugin (#1394)
** Bump org.asciidoctor:asciidoctorj from 3.0.0 to 3.0.1 (#1393)
** Bump org.neo4j.driver:neo4j-java-driver (#1392)
** Bump org.checkerframework:checker-qual (#1391)
** Bump quarkus.platform.version from 3.29.0 to 3.29.2 (#1390)
** Bump neo4j.version from 5.26.15 to 5.26.16 (#1389)
** Bump com.fasterxml.jackson:jackson-bom (#1388)
** Bump org.neo4j:neo4j-ogm-quarkus from 4.0.0 to 4.1.0 (#1387)
** Bump quarkus.platform.version from 3.28.5 to 3.29.0 (#1386)
** Bump neo4j.version from 5.26.14 to 5.26.15 (#1385)
** Bump org.junit:junit-bom from 6.0.0 to 6.0.1 (#1384)
** Bump org.jreleaser:jreleaser-maven-plugin (#1383)
=== 2025.2.0 🎃
No breaking changes in this release (as most of the time), only a small new feature needed for the https://github.com/neo4j/neo4j-jdbc[Neo4j JDBC Driver] which you definitely check out.
==== 🚀 Features
* Add support for parameter inside literal maps. (#1382)
==== 🔄️ Refactorings
* Prevent anonymous parameters from being used in literals.
==== 🧹 Housekeeping
* Dependency upgrades:
** Upgrade testcontainers.version to 2.0.1
** Bump org.graalvm.buildtools:native-maven-plugin (#1377)
** Bump org.springframework.data:spring-data-neo4j (#1376)
** Bump org.codehaus.mojo:exec-maven-plugin (#1375)
** Bump com.puppycrawl.tools:checkstyle from 12.0.1 to 12.1.1 (#1380)
** Bump quarkus.platform.version from 3.28.3 to 3.28.5 (#1381)
** Bump neo4j.version from 5.26.13 to 5.26.14 (#1379)
** Bump org.springframework.boot:spring-boot-starter-parent (#1378)
================================================
FILE: docs/appendix/building.adoc
================================================
== Building the Neo4j Cypher-DSL
include::{manualIncludeDir}../CONTRIBUTING.adoc[tags=building-manual]
================================================
FILE: docs/appendix/changes.adoc
================================================
== Change log
:leveloffset: +1
include::2025.2.adoc[]
include::2025.1.adoc[]
include::2025.0.adoc[]
include::2024.7.adoc[]
include::2024.6.adoc[]
include::2024.5.adoc[]
include::2024.4.adoc[]
include::2024.3.adoc[]
include::2024.2.adoc[]
include::2024.1.adoc[]
include::2024.0.adoc[]
include::2023.9.adoc[]
include::2023.8.adoc[]
include::2023.7.adoc[]
include::2023.6.adoc[]
include::2023.5.adoc[]
include::2023.4.adoc[]
include::2023.3.adoc[]
include::2023.2.adoc[]
include::2023.1.adoc[]
include::2023.0.adoc[]
include::2022.11.adoc[]
include::2022.10.adoc[]
include::2022.9.adoc[]
include::2022.8.adoc[]
include::2022.7.adoc[]
include::2022.6.adoc[]
include::2022.5.adoc[]
include::2022.4.adoc[]
include::2022.3.adoc[]
include::2022.2.adoc[]
include::2022.1.adoc[]
include::2022.0.adoc[]
include::2021.4.adoc[]
include::2021.3.adoc[]
include::2021.2.adoc[]
include::2021.1.adoc[]
include::2021.0.adoc[]
include::2020.1.adoc[]
include::2020.0.adoc[]
:leveloffset: -1
================================================
FILE: docs/appendix/index.adoc
================================================
[[appendix]]
= Appendix
:numbered!:
include::query-dsl-support.adoc[]
include::building.adoc[]
include::../../etc/architecture/index.adoc[]
include::changes.adoc[]
================================================
FILE: docs/appendix/query-dsl-support.adoc
================================================
[[query-dsl-support]]
== Query-DSL support
The Neo4j Cypher-DSL has some support for http://www.querydsl.com[Query-DSL]. It can
* turn instances of `com.querydsl.core.types.Predicate` into `org.neo4j.cypherdsl.core.Condition`,
* turn instances of `com.querydsl.core.types.Expression` into `org.neo4j.cypherdsl.core.Expression`,
* create `org.neo4j.cypherdsl.core.Node` instances from `com.querydsl.core.types.Path` and also
* create `org.neo4j.cypherdsl.core.SymbolicName`
With this, many static meta models based on Query-DSL can be used to create Queries and match on nodes.
Most operations supported by Query-DSL are translated into Cypher that is understood by Neo4j 4.0+, so that most predicates
should work - at least from a syntactic point of view - out of the box.
Expressions are most useful to address properties in return statements and the like.
Here's one example on how to use it:
[[appendix.query-dsl-support.query-dsl-simple]]
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl/src/test/java/org/neo4j/cypherdsl/core/querydsl/QueryDSLAdapterTests.java[tags=query-dsl-simple]
----
<.> This makes use of a "Q"-class generated by Query-DSL APT (using the general processor).
`alias` and class based paths works, too.
Please make sure to name the instance accordingly when you use it as node (see next step)
<.> Adapt the "Q"-class into a node. Please note it must be named accordingly, otherwise your query
won't return the expected results
<.> Create some Query-DSL predicate based on the properties and adapt it as condition
<.> Return some Query-DSL properties and adapt it as expression
The `Statement` offers a way to render all constants as parameters, so that they don't bust the query cache:
[[appendix.query-dsl-support.query-dsl-simple-avoid-constants]]
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl/src/test/java/org/neo4j/cypherdsl/core/querydsl/QueryDSLAdapterTests.java[tags=query-dsl-simple-avoid-constants]
----
<.> Set this to true before accessing parameters of the statement or rendering the statement
<.> Access the statements parameters for generated parameter names
<.> Compare the statement to the first listening. Constants are gone now
The Neo4j Cypher-DSL will collect all parameters defined via Query-DSL for you:
[[appendix.query-dsl-support.query-dsl-parameters]]
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl/src/test/java/org/neo4j/cypherdsl/core/querydsl/QueryDSLAdapterTests.java[tags=query-dsl-parameters]
----
<.> Basically the same predicate as above, but with parameters, which will be turned into correct placeholders
<.> Access the parameter names via the `Statement` object
=== Required dependencies
The Query-DSL support in the Neo4j Cypher-DSL is optional, and the Query-DSL dependency is only in the `provided` scope.
To make use of `Cypher.adapt()`, you must add the following dependency in addition to the Cypher-DSL:
==== Maven
[source,xml]
----
com.querydslquerydsl-core4.4.0provided
----
==== Gradle
[source,groovy]
----
dependencies {
implementation 'com.querydsl:query-dsl-core:4.4.0'
}
----
In case you want to use an annotation processor, you have to add additional dependencies and depending on your Java environment.
We use the following in our tests:
[source,xml]
----
com.querydslquerydsl-apt4.4.0generaljavax.annotationjavax.annotation-api1.3.2
----
================================================
FILE: docs/cypher-parser/cypher-parser.adoc
================================================
== Introduction
The `cypher-dsl-parser` module ins an optional add-on to the Cypher-DSL that takes your existing Cypher - either whole statements
or fragments like clauses or expressions - and turn them into Cypher-DSL statements or expressions.
Those fragments can be used to add custom Cypher to your generated statements without resorting to raw String literals.
It allows sanitizing user input, add additional filters for labels and types to rewrite queries and more.
The parser itself is based on Neo4j's official Cypher-Parser, thus supporting the same constructs as Neo4j itself.
However, while we could theoretically parse all expressions that Neo4j {neo4j-version} supports, we might cannot translate all of them
into elements of the Cypher-DSL. In such cases an `UnsupportedOperationException` will be thrown.
== Getting started
=== Add additional dependencies
==== Maven
[source,xml,subs="verbatim,attributes"]
.Cypher-DSL parser added via Maven
----
{groupId}neo4j-cypher-dsl-parser{the-version}
----
==== Gradle
[source,groovy,subs="verbatim,attributes"]
.Gradle variant for additional dependencies
----
dependencies {
implementation '{groupId}:neo4j-cypher-dsl-parser:{the-version}'
}
----
=== Minimum JDK version
The Cypher-Parser requires JDK 11 to run which is the same version that Neo4j {neo4j-version} requires.
=== Main entry point
The main entry point to parsing Cypher strings into Cypher-DSL objects is
[[main-entry-pint]]
.Cypher Parser
[source, java,indent=0,tabsize=4]
----
import org.neo4j.cypherdsl.parser.CypherParser;
----
It provides a list of static methods:
[cols=2*,options=header]
|===
|Method
|What it does
|`parseNode`
|Parses a pattern like `(n:Node {withOrWithout: 'properties'})` into a `Node`
|`parseRelationship`
|Parses a pattern like `(m)-[{a: 'b', c: 'd'}]->(n)` into a `RelationshipPattern`.
The pattern might be a `Relationship` or `RelationshipChain`.
|`parseExpression`
|Parses an arbitrary expression.
|`parseClause`
|Parses a full clause like `MATCH (m:Movie)` or `DELETE n` etc. These clauses might be modified via
callbacks and then passed on into `org.neo4j.cypherdsl.core.Statement.of`. This will take them
in order and create a whole statement out of it. It is your responsibility to make sure those clauses are
meaningful in the given order.
|`parseStatement`
|Parses a whole statement. The result can be rendered or used in a union or subquery call.
|`parse`
|An alias for `parseStatement`.
|===
The `README` for the parser module itself contains not only our whole TCK for the parser,
but also several examples of calling it. Have a look here: https://github.com/neo4j-contrib/cypher-dsl/blob/main/neo4j-cypher-dsl-parser/README.adoc[neo4j-cypher-dsl-parser/README.adoc].
All the methods mention above provide an overload taking in an additional `org.neo4j.cypherdsl.parser.Option` instance
allowing to interact with the parser. Please have a look at the JavaAPI for information about the options class.
The following examples show some ways of using it.
Most of the configurable options represent ways to provide filters for labels or types or are callbacks when certain expressions are created.
[[cypher-parser-examples]]
== Examples
=== Parsing user input and call in a subquery
This is helpful when you create an outer query that maybe enriched by a user.
Here we assume the user does the right thing and don't modify the query any further:
[[example-using-input]]
.Just using the user supplied input
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-parser/src/test/java/org/neo4j/cypherdsl/examples/parser/CypherDSLParserExamplesTests.java[tag=example-using-input]
----
<.> A valid standalone query that is also a valid subquery
<.> Just parse it into a `Statement` object
<.> Use the Cypher-DSL as explained throughout the docs
<.> Use the overload of `call` that takes a `Statement` and a collection of expression that should be imported into the subquery
<.> Notice how to `WITH` clauses are generated: The first one is the importing one, the second one the aliasing one
<.> This is the original query
=== Ensure an alias for the return clause
We are going to work with the same test as in <>, so this is not repeated.
Here we make sure the query supplied by the user returns something with a required alias.
[[example-required-alias]]
.Using a callback to make sure that a query has an alias
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-parser/src/test/java/org/neo4j/cypherdsl/examples/parser/CypherDSLParserExamplesTests.java[tag=example-required-alias]
----
<.> This is a `Function` that receives an expressions and returns a new one. It
checks if the provided expressions obeys to some criteria: Here being something that is aliased or not
<.> We start building new options
<.> The callback from step one is passed as callback to the event `ON_RETURN_ITEM` and will be called for every item
<.> The final option instance will be applied to the parser. The statement will render to the same result as <>.
=== Preventing certain things
Callbacks can of course be used to prevent things.
Any exception thrown will halt the parsing.
<> shows how:
[[example-preventing-things]]
.Preventing input that deletes properties
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-parser/src/test/java/org/neo4j/cypherdsl/examples/parser/CypherDSLParserExamplesTests.java[tag=example-preventing-things]
----
<.> Create a callback that just throws an unchecked exception
<.> Configure it for the event that should be prevented
<.> Parsing will not be possible
=== Shape the return clause the way you want
The parser provides `ReturnDefinition` as value object. It contains information to be passed to the `Clauses` factory to shape
a `RETURN` clause the way you need:
[[example-example-shape-the-return-clause]]
.Shaping the return clause
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-parser/src/test/java/org/neo4j/cypherdsl/examples/parser/CypherDSLParserExamplesTests.java[tag=example-shape-the-return-clause]
----
<.> Create a factory method that takes in a definition and uses its information to build the `RETURN`.
Or examples filters the attributes being returned and enforces an alias.
It also adds some arbitrary sorting and keeps sort and limit values from the original
<.> It than is parsed to the options
<.> The statement has the new `RETURN` clause.
=== Enforcing labels
The parser can enforce labels to be present or absent with filters. This can be individually achieved when parsing node patterns,
setting or removing labels with a `BiFunction` like the following:
[[a-label-enforcing-functions]]
.Shaping the return clause
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-parser/src/test/java/org/neo4j/cypherdsl/parser/RewriteTests.java[tag=enforcing-labels-function]
----
<.> Decide on the event type what is supposed to happen
Putting this function in action involves the `Options` class again:
[[enforcing-on-parse]]
.Enforcing a label is always set on the pattern
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-parser/src/test/java/org/neo4j/cypherdsl/parser/RewriteTests.java[tag=enforcing-on-parse]
----
This can safely be used to match only nodes spotting such a label for example.
[[enforcing-on-set]]
.Enforcing that a new collection of labels always contains a specific
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-parser/src/test/java/org/neo4j/cypherdsl/parser/RewriteTests.java[tag=enforcing-on-set]
----
Of course, we can prevent a label to be removed:
[[enforcing-on-remove]]
.Preventing a specific label to be removed
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-parser/src/test/java/org/neo4j/cypherdsl/parser/RewriteTests.java[tag=enforcing-on-remove]
----
Changing relationship types via a filter is possible as well, but as relationships might only have one type, the number of
usecases is smaller.
=== Combining the parser with SDN's `CypherdslConditionExecutor`
Spring Data Neo4j 6 provides `CypherdslConditionExecutor`. This is a fragment that adds the capability to execute
statements with added conditions to a `Neo4jRepository`.
Given the following repository:
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-sdn6/src/main/java/org/neo4j/cypherdsl/examples/sdn6/movies/PeopleRepository.java[tag=additional-fragments]
----
<.> Allows to just add conditions to our generated queries
<.> Provides an alternative to using @Query with strings
One possible use case is presented in this service:
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-sdn6/src/main/java/org/neo4j/cypherdsl/examples/sdn6/movies/PeopleService.java[tag=using-parser-with-spring]
----
<.> The condition that only people born later than 1980 is hard coded in the service.
An arbitrary String is than parsed into a condition and attached via `AND`.
Thus, only valid cypher can go in there and with filters and callbacks, preconditions of that Cypher can be asserted.
The downside to the above solution is that the query fragment passed to the service and eventually the repository must
know the root node (which is `n` in case of SDN 6) and the caller code might look like this:
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-sdn6/src/test/java/org/neo4j/cypherdsl/examples/sdn6/ApplicationIT.java[tag=exchange1]
----
Notice `n.name` etc.
We could change the service method slightly and apply a callback like this:
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-sdn6/src/main/java/org/neo4j/cypherdsl/examples/sdn6/movies/PeopleService.java[tag=using-parser-with-spring2]
----
<.> Create a function that takes the value of a variable created in the fragment and use it to look up a property on the
SDN root node.
<.> Create an instance of parsing options. It's probably a good idea todo this once and store them away in an instance variable.
Options are thread safe.
<.> Apply them when calling the corresponding parse method
Now it's enough to pass `"name contains \"Ricci\" OR name ends with 'Hirsch'"` into the exchange presented above and things
will work out of the box.
Further validation and sanitiy checks are of course up to you.
================================================
FILE: docs/cypher-parser/index.adoc
================================================
[[cypher-parser]]
= Parsing existing Cypher
include::cypher-parser.adoc[]
================================================
FILE: docs/functions/arbitrary-procedures-and-functions.adoc
================================================
== Calling arbitrary procedures and functions
Neo4j has plethora of built-in procedures and functions.
The Cypher-DSL does cover a lot of them already, and they can be called in a typesafe way on many `Expression`-instances
taking in various expressions such as the results of other calls, literals or parameters.
However, there will probably always be a gap between what the Cypher-DSL includes and what the Neo4j database brings.
More so, there are fantastic libraries out there like https://neo4j.com/labs/apoc/[APOC].
APOC has so many procedures and functions in so many categories that it is rather futile to add shims
for all of them consistently.
Probably the most important aspect of all: many Neo4j users bring their knowledge to the database themselves,
in the form of their stored procedures. Those should be callable as well.
The Cypher-DSL is flexible enough to call all those procedures and functions.
=== Calling custom procedures
Procedures are called via the Cypher https://neo4j.com/docs/cypher-manual/current/clauses/call/[CALL-Clause].
The CALL-Clause can appear as a https://s3.amazonaws.com/artifacts.opencypher.org/M15/railroad/StandaloneCall.html[StandAlone call]
and as an https://s3.amazonaws.com/artifacts.opencypher.org/M15/railroad/InQueryCall.html[InQuery call].
Both are supported by the Cypher-DSL.
==== Standalone procedure calls
Standalone calls are particular useful for `VOID` procedures.
A VOID procedure is a procedure that does not declare any result fields and returns no result records and that has explicitly been declared as `VOID`.
Let's take the first example https://neo4j.com/docs/cypher-manual/current/clauses/call/#call-call-a-procedure-using-call[from here]
[source,java,indent=0]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/ArbitraryProceduresAndFunctionsTests.java[tag=standalone-call]
----
<.> `Cypher.call` returns a buildable statement that can be rendered.
`Cypher.call` can be used with separate namespace and procedure name as shown here or
<.> with a single argument equal to the name of the procedure.
Of course, arguments can be specified as expressions.
Expressions can be literals as in <>, Cypher parameters (via `Cypher.parameter`) that bind your input or nested calls:
[[standalone-call-with-args]]
[source,java,indent=0]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/ArbitraryProceduresAndFunctionsTests.java[tag=standalone-call-with-args]
----
Last but not least, the Cypher-DSL can of course `YIELD` the results from a standalone call:
[[standalone-call-yielding]]
[source,java,indent=0]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/ArbitraryProceduresAndFunctionsTests.java[tag=standalone-call-yielding]
----
<.> Yielded items can be specified via string…
<.> …or with symbolic names created earlier
A standalone call can spot a `WHERE` clause as well:
[[standalone-call-where]]
[source,java,indent=0]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/ArbitraryProceduresAndFunctionsTests.java[tag=standalone-call-where]
----
==== In-query procedure calls
In-query calls are only possible with non-void procedures. An In-query call happens inside the flow of a normal query.
The mechanics to construct those calls via the Cypher-DSL are identical to standalone calls:
[[in-query-calls]]
[source,java,indent=0]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/ArbitraryProceduresAndFunctionsTests.java[tag=in-query-calls]
----
A `CALL` can be used after a `MATCH`, a `WITH` and also a `WHERE` clause.
=== Use stored-procedure-calls as expressions (Calling custom functions)
All the mechanics described and shown above - how to define a custom call statement, supply it with arguments etc. - doesn't
distinguish between procedures and functions.
Every stored procedure can be treated as a function - as long as the stored procedure returns a single value.
It doesn't matter if the single value returns a scalar or a list of objects.
A list of objects is still a single value, in contrast to a stream of objects returned by a non-void procedure.
So the question is not how to call a stored custom function, but how to turn a call statement into an expression that can be used in any place in a query where an expression is valid.
This is where `asFunction` comes in.
[[as-function]]
[source,java,indent=0]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/ArbitraryProceduresAndFunctionsTests.java[tag=as-function]
----
<.> First we define a call as seen earlier and turn it into an expression
<.> This expression is than used as any other expression
Of course, arguments to those functions can be expressed as well, either as literals or expressions.
[[as-function-with-args]]
[source,java,indent=0]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/ArbitraryProceduresAndFunctionsTests.java[tag=as-function-with-args]
----
<.> Same as before
<.> A call to APOC's `camelCase` function, taking in the literal of `first name`.
<.> A call to another APOC function to which a parameter is passed. You find that corresponding placeholder as `$nameParam` in the following assert
=== Summary
Through `Cypher.call` any procedure or function can be called in case one of your favorite procedures is missing in `org.neo4j.cypherdsl.core.Functions`.
All clauses, including `YIELD` and `WHERE` on procedures are supported.
All procedures can be turned into functions.
The Cypher-DSL however does not check if the procedure that is used as a function is actually eligible to do so.
If the Cypher-DSL misses an important builtin Neo4j function, please raise a https://github.com/neo4j-contrib/cypher-dsl/issues/new[ticket].
================================================
FILE: docs/functions/index.adoc
================================================
[[functions]]
= Functions
NOTE: There are many more functions implemented in `org.neo4j.cypherdsl.core.Functions`. Not all of them are already documented here.
include::lists.adoc[]
include::mathematical.adoc[]
include::arbitrary-procedures-and-functions.adoc[]
================================================
FILE: docs/functions/lists.adoc
================================================
== Lists
[[functions-list-range]]
=== range()
Creates an invocation of https://neo4j.com/docs/cypher-manual/current/functions/list/#functions-range[`range()`].
Given the following imports
[source,java,indent=0]
----
import org.neo4j.cypherdsl.core.Cypher;
----
[source,java,indent=0]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/FunctionsListTests.java[tag=functions-list-range]
----
Gives you `range(0,10)`.
The step size can be specified as well:
[source,java,indent=0]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/FunctionsListTests.java[tag=functions-list-range-step]
----
This gives you `range(0,10,1)`.
Both variants of `range` also take a `NumberLiteral` for the start and end index and the step size.
=== Inserting a list operator
The _list operator_ `[]` selects a specific value of a list or a range of values from a list.
A range can either be closed or open.
Find examples to select a value at a given index, a sublist based on a closed range and sublist based on open ranges below.
While the examples use <>, the list operator doesn't put any restrictions on the expression at the moment.
[source,java,indent=0]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/FunctionsListTests.java[tag=functions-list-operator]
----
================================================
FILE: docs/functions/mathematical.adoc
================================================
== Mathematical functions
The Cypher-DSL supports all mathematical functions as of Neo4j 4.2. Please find
their description in the Neo4j cypher manual:
* https://neo4j.com/docs/cypher-manual/current/functions/mathematical-numeric/[Numeric]
* https://neo4j.com/docs/cypher-manual/current/functions/mathematical-logarithmic/[Logarithmic]
* https://neo4j.com/docs/cypher-manual/current/functions/mathematical-trigonometric/[Trigonometric]
================================================
FILE: docs/getting-started/getting-started.adoc
================================================
== Prepare dependencies
Please use a dependency management system. We recommend either Maven or Gradle.
=== Maven configuration
[source,xml,subs="verbatim,attributes"]
.Inclusion of the Neo4j Cypher-DSL in a Maven project
----
{groupId}{artifactId}{the-version}
----
=== Gradle configuration
[source,groovy,subs="verbatim,attributes"]
.Inclusion of the Neo4j Cypher-DSL in a Gradle project
----
dependencies {
implementation '{groupId}:{artifactId}:{the-version}'
}
----
[[how-to-use-it]]
== How to use it
You use the Cypher-DSL as you would write Cypher:
it allows to write down even complex Cypher queries from top to bottom in a type safe, compile time checked way.
The examples to follow are using JDK 11.
We find the `var` keyword especially appealing in such a DSL as the types returned by the DSL are much less important than
the further building methods they offer.
IMPORTANT: The AST parts and intermediate build steps are immutable. That is, the methods create new intermediate steps.
For example, you cannot reuse an `ExposesLimit` step, but have to use the returned object from its `skip` method.
An instance of a `org.neo4j.cypherdsl.core.Statement` is provided at the end of every query building step.
This `Statement` needs to be rendered into a string or passed to methods supporting it as input.
Please get an instance of the default renderer via `org.neo4j.cypherdsl.renderer.Renderer#getDefaultRenderer()`.
The renderer provides a single method `render` for rendering the AST into a string representation.
Furthermore, the `Statement` will collect parameter names and if provided, parameter values.
Parameter names and values are available after the statement has been built and can for example be used directly with the Neo4j-Java-Driver.
[[how-to-use-it.examples]]
=== Examples
The following examples are 1:1 copies of the queries you will find in the Neo4j browser after running `:play movies`.
They use the following imports:
.Imports needed for the examples to compile
[source, java]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/CypherDSLExamplesTests.java[tag=cypher-dsl-imports]
----
To match and return all the movie, build your statement like this:
.Simple match
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/CypherDSLExamplesTests.java[tag=cypher-dsl-e1]
----
<.> Declare a variable storing your node labeled `Movie` and named `m`, so that you can
<.> reuse it in both the match and the return part.
<.> The `build` method becomes only available when a compilable Cypher statement can be rendered.
==== Find
Match all nodes with a given set of properties:
.Find the actor named "Tom Hanks"...
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/CypherDSLExamplesTests.java[tag=cypher-dsl-e2]
----
Limit the number of returned things and return only one attribute
.Find 10 people...
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/CypherDSLExamplesTests.java[tag=cypher-dsl-e4]
----
Create complex conditions
.Find movies released in the 1990s...
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/CypherDSLExamplesTests.java[tag=cypher-dsl-e5]
----
==== Query
Build relationships
.List all Tom Hanks movies...
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/CypherDSLExamplesTests.java[tag=cypher-dsl-e6]
----
.Who directed "Cloud Atlas"?
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/CypherDSLExamplesTests.java[tag=cypher-dsl-e7]
----
.Tom Hanks' co-actors...
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/CypherDSLExamplesTests.java[tag=cypher-dsl-e8]
----
.How people are related to "Cloud Atlas"...
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/CypherDSLExamplesTests.java[tag=cypher-dsl-e9]
----
==== Solve
.Movies and actors up to 4 "hops" away from Kevin Bacon
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/CypherDSLExamplesTests.java[tag=cypher-dsl-bacon]
----
==== Recommend
.Extend Tom Hanks co-actors, to find co-co-actors who haven't worked with Tom Hanks...
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/CypherDSLExamplesTests.java[tag=cypher-dsl-r]
----
=== More features
[[retrieving-parameters]]
==== Retrieving parameters being defined
A placeholder for a parameter can be defined via `Cypher.parameter("param")`.
This placeholder will be rendered as `$param` and must be filled with the appropriate means of the environment you're working with.
In addition, an arbitrary value can be bound to the name via `Cypher.parameter("param", "a value")` or `Cypher.parameter("param").withValue("a value")`.
`NULL` is a valid value.
The Cypher-DSL will not use those values, but collect them for you.
The following example shows how to access them and how to use it:
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/CypherDSLExamplesTests.java[tag=collecting-params]
----
<.> The names contain all placeholders, also those without a value
<.> The parameter map contains only parameters with defined values
If you define a parameter with conflicting values, a `ConflictingParametersException` will be thrown the moment you try to retrieve the collected parameters.
==== Using the default renderer
A statement can render itself as well:
[source, java]
----
var statement = Cypher.returning(literalTrue().as("t")).build();
var cypher = this.statement.getCypher();
assertThat(cypher).isEqualTo("RETURN true AS t");
----
This, together with <>, makes the statement a complete accessor for a Cypher-statement and its parameters.
[[retrieving-identifiable-expressions]]
==== Retrieving identifiable expressions
The `Statement` as well as the intermediate build steps after defining a `WITH` or `RETURN` clause allow to retrieve identifiable expressions
via `getIdentifiableExpressions()`. All expressions identifiable via a name such as named nodes and relationships, symbolic names or aliased
expressions are included. In addition, properties are also available.
Those information can be used when dynamically building a query to verify the presence of required expressions
or use them for further refinement.
Statements parsed via the optional <> are also able to return their identifiable expressions.
The use case here might be evaluating a statement defined by a user being parsed and then checked if everything required is returned.
==== Generating formatted Cypher
The Cypher-DSL can also format the generated Cypher to some extend.
The `Renderer` offers the overload `Renderer getRenderer(Configuration configuration)`, taking in an instance of `org.neo4j.cypherdsl.core.renderer.Configuration`.
Instances of `Configuration` are thread-safe and reusable.
The class offers a couple of static convenience methods for retrieving some variants.
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/CypherDSLExamplesTests.java[tag=pretty-printing-examle]
----
<.> Get a "pretty printing" instance of the renderer configuration and retrieve a renderer based on it
<.> Enjoy formatted Cypher.
==== Escaping names
The default renderer in its default configuration will escape all names (labels and relationship types) by default.
So `Movie` becomes `++`Movie`++` and `ACTED_IN` becomes `++`ACTED_IN`++`.
If you don't want this, you can either create a dedicated configuration for a renderer with that setting turned off or use
the pretty printing renderer:
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/CypherDSLExamplesTests.java[tag=escaping]
----
==== Inserting raw Cypher
`Cypher.raw` allows for creating arbitrary expressions from raw String literals.
Users discretion is advised:
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/CypherDSLExamplesTests.java[tag=raw-cypher]
----
<.> The Cypher-DSL doesn't support a dynamic lookup of properties on expression at the moment.
We use a raw Cypher string with the placeholder `$E` which resolves to the symbolic name also passed to the `raw` function.
[[dialect-support]]
== Dialect support
There is limited dialect support. The default dialect `org.neo4j.cypherdsl.core.renderer.Dialect.DEFAULT` is Neo4j 4.4 and earlier whereas `org.neo4j.cypherdsl.core.renderer.Dialect.NEO4J_5` is designated to work with Neo4j 5.
The Neo4j 5 dialect will render some things differently:
* `org.neo4j.cypherdsl.core.Functions.distance` will be rendered as `point.distance` instead of just `distance`
* `elementId` will be rendered "as is"
* `EXISTS(n.property)` will be rendered as `n.property IS NOT NULL`
Additional features might be added.
NOTE: It is especially noteworthy that `elementId(node)` will be rendered as `toString(id(node))` with the default dialect. This is helpful for building queries that must work a) without deprecation warnings and b) on both Neo4j 4 and 5. Of course this is not portable and the returned values must only be used for comparison inside one statement. But Neo4j advices strongly against making the internal entity ids available outside a transaction (See https://neo4j.com/docs/cypher-manual/current/functions/scalar/#functions-elementid[elementID]: "Outside of the scope of a single transaction, no guarantees are given about the mapping between ID values and elements.")
Here is one example how to use a dialect:
[source, java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl/src/test/java/org/neo4j/cypherdsl/core/DialectIT.java[tag=dialect-example]
----
[[catalog-support]]
== Catalog support
The Cypher-DSL offers a catalog view on statements. After a statement has been build, a catalog can be retrieved like this:
.Using the statement catalog from a constructed statement
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl/src/test/java/org/neo4j/cypherdsl/core/StatementCatalogBuildingVisitorTests.java[tag=catalog-example]
----
In the above example the catalog contains all labels and types used (`Movie`, `Person`, `ACTED_IN`) and all conditions
that involves a property of an entity combining the labels or types into a node or relationship. In addition, the catalog
contains the identifiable elements.
This becomes especially powerful when combining with the optional <>:
.Using the statement catalog from a parsed statement
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-parser/src/test/java/org/neo4j/cypherdsl/examples/parser/StatementCatalogBuildingVisitorViaParserTests.java[tag=catalog-example]
----
================================================
FILE: docs/getting-started/index.adoc
================================================
[[getting-started]]
= Getting started
include::getting-started.adoc[]
================================================
FILE: docs/index.adoc
================================================
= The Neo4j Cypher-DSL
Gerrit Meier ; Michael Simons
:toc:
:doctype: book
:lang: en
:listing-caption: Listing
:source-highlighter: coderay
:icons: font
:sectlink: true
:sectanchors: true
:numbered: true
:xrefstyle: short
:use-latest-version-for-docs: 0
ifndef::manualIncludeDir[]
:manualIncludeDir: ../
endif::[]
include::{manualIncludeDir}/README.adoc[tags=properties]
ifeval::[{use-latest-version-for-docs} == 1]
:the-version: {neo4j-cypher-dsl-version-latest}
endif::[]
ifeval::[{use-latest-version-for-docs} == 0]
:the-version: {neo4j-cypher-dsl-version}
endif::[]
:copyright: 2020-2025 Neo4j, Inc.,
:gh-base: https://github.com/neo4j/sdn-rx
:java-driver-starter-href: https://github.com/neo4j/neo4j-java-driver-spring-boot-starter
:springVersion: 5.2.0.RELEASE
:spring-framework-docs: https://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference
:spring-framework-javadoc: https://docs.spring.io/spring/docs/{springVersion}/javadoc-api
(C) {copyright}
[abstract]
--
This is the Neo4j Cypher-DSL manual version {the-version}.
--
_Who should read this?_
This manual is written for people interested in creating Cypher queries in a typesafe way on the JVM.
NOTE: All public classes inside `org.neo4j.cypherdsl` still subject to breaking changes are annotated with `@API(status = EXPERIMENTAL)`.
include::introduction-and-preface/index.adoc[leveloffset=+1]
include::getting-started/index.adoc[leveloffset=+1]
include::properties/index.adoc[leveloffset=+1]
include::functions/index.adoc[leveloffset=+1]
include::cypher-parser/index.adoc[leveloffset=+1]
include::static-meta-model/index.adoc[leveloffset=+1]
include::appendix/index.adoc[leveloffset=+1]
================================================
FILE: docs/introduction-and-preface/index.adoc
================================================
[[introduction]]
= Introduction
include::introduction.adoc[]
================================================
FILE: docs/introduction-and-preface/introduction.adoc
================================================
== Purpose
The Cypher-DSL has been developed with the needs of Spring Data Neo4j.
We wanted to avoid string concatenations in our query generation and decided do go with a builder approach, much like we
find with https://www.jooq.org[jOOQ] or in the relational module of https://github.com/spring-projects/spring-data-jdbc/tree/1.1.6.RELEASE/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql[Spring Data JDBC], but for Cypher.
What we don't have - and don't need for our mapping purpose - at the moment is a code generator that reads the database schema
and generates static classes representing labels and relationship types.
That is still up to the mapping framework (in our case SDN).
We however have a type safe API for Cypher that allows only generating valid Cypher constructs.
We worked closely with the https://www.opencypher.org[OpenCypher spec] here and you find a lot of these concepts in the API.
The Cypher-DSL can also be seen in the same area as the https://docs.spring.io/spring-data/mongodb/docs/current/api/org/springframework/data/mongodb/core/query/Criteria.html[Criteria API] of Spring Data Mongo.
== Where to use it
The Cypher-DSL creates an https://en.wikipedia.org/wiki/Abstract_syntax_tree[Abstract Syntax Tree (AST)] representing your Cypher-Statements.
An instance of a `org.neo4j.cypherdsl.core.Statement` representing that AST is provided at the end of query building step.
A `Renderer` is then used to create literal Java-Strings.
Those can be used in any context supporting String-based queries, for example with the https://github.com/neo4j/neo4j-java-driver[Neo4j Java driver] or inside embedded procedures and of course with Spring Data's https://github.com/spring-projects/spring-data-neo4j/blob/master/src/main/java/org/springframework/data/neo4j/core/Neo4jClient.java[Neo4j-Client].
Parameters in the generated queries will use the `$form` and as such be compatible with all current versions of Neo4j.
Users of SDN 6+ can use the generated `org.neo4j.cypherdsl.core.Statement` directly with the `Neo4jTemplate` or the `ReactiveNeo4jTemplate`.
Both the imperative and the reactive variants allow the retrieval and counting of entities without rendering a String first,
for example through `Neo4jTemplate#findAll(Statement, Class)`.
== Java API
Find the Java-API and a generated project info here: link:project-info/apidocs/index.html[API] and link:project-info/index.html[project info].
================================================
FILE: docs/properties/index.adoc
================================================
[[properties]]
= Properties
Nodes and Relationships expose properties.
This reflects directly in the Cypher-DSL:
[[properties-on-nodes-and-rel]]
[source,java,indent=0]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/PropertiesTests.java[tag=properties-on-nodes-and-rel]
----
<.> Create a property expression from a `Node`
<.> Create a property expression from a `Relationship`
Both Node and Relationship should be named as in the example.
The Cypher-DSL generates names if they are not named, to refer to them in the statements.
Without the explicit names, the generated statement would look like this:
[source,cypher]
----
MATCH (geIcWNUD000:`Person`)-[TqfqBNcc001:`RATED`]->(:`Movie`) RETURN geIcWNUD000.name, TqfqBNcc001.rating
----
The name is of course random.
The `Cypher` class exposes the `property` method, too. This methods takes in one name (as symbolic name or as string literal) OR one expression
and at least one further string, referring to the name of the property.
Passing in a symbolic name would lead to a similar result like in <>, an expression can refer
to the results of functions etc.:
[[properties-on-expressions]]
[source,java,indent=0]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/PropertiesTests.java[tag=properties-on-expressions]
----
<.> Here an expression, the `datetime()` function is passed in and the `epocheSeconds` property is dereferenced.
Nested properties are of course possible as well, either directly on nodes and relationships or via the static builder:
[[nested-properties]]
[source,java,indent=0]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/core/PropertiesTests.java[tag=nested-properties]
----
================================================
FILE: docs/static-meta-model/concepts.adoc
================================================
== Concepts
=== A static meta model is optional
First let's stress this: a static meta model is optional for the Cypher-DSL. It is completely OK to use the Cypher-DSL
as shown in the <>:
all labels, types and properties can be named as you go.
The Cypher-DSL will still give you type-safety in regard to the Cypher's syntax.
This fits nicely with Neo4j's capabilities: Neo4j is a schemaless database. Nodes, their relationships between each other,
their labels and properties can be changed as you go but all of this information can still be queried.
In a schemaless database or a database with dynamic scheme the scheme is often defined by the application.
This definition takes many forms: It can be through an object mapper like https://github.com/neo4j/neo4j-ogm[Neo4j-OGM] or
https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#reference[Spring Data Neo4j 6+], or maybe in form of
Graph-QL schemes.
Another source may be the information we can retrieve from the database itself via https://neo4j.com/docs/operations-manual/current/reference/procedures/#procedure_db_schema_nodetypeproperties[`db.schema.nodeTypeProperties`] and
https://neo4j.com/docs/operations-manual/current/reference/procedures/#procedure_db_schema_reltypeproperties[`db.schema.relTypeProperties`].
[[static-meta-model.building-blocks]]
=== Building blocks
The Cypher DSL offers the following building blocks as part of the public API:
* Two pattern elements:
** Nodes via `Node` (and its default implementation `NodeBase`)
** Relationships via `Relationship` (and its default implementation `RelationshipBase`)
* `Property`, which is a holder for properties
When you use Cypher-DSL like this:
[source,java]
----
var m = Cypher.node("Movie").named("m");
var statement = Cypher.match(m).returning(this.m).build();
----
`m` will be a `Node` instance having the label `Movie` and an alias of `m`. `m` can be used everywhere where a pattern element
can be used according to the openCypher spec.
You don't have to care about its type. That's why we vouched for the JDK11+ local type inference here and omitted the
declaration of the type `Node`: it just reads better.
=== A very simple, static model
Both `NodeBase` and `RelationshipBase` are meant to be extended to put your static model into something that is usable
with the Cypher-DSL.
==== Nodes
Start by extending `NodeBase` like this:
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/model/Movie.java[tag=simple-model]
----
<.> Extend from `NodeBase` and specify your class as a "self" type-argument
<.> Optional: Create one static instance of your model
<.> This is where you specify one or more label
<.> This constructor is optional, it is used in the next two steps
<.> `named` must be overridden and must return new copies of the node, with the changed symbolic name.
It must be overridden to guarantee type integrity.
<.> Same as above
With that in place, you can already use it like this:
[source,java,indent=0,tabsize=4]
[[static-movie]]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/model/StaticModelIT.java[tag=simple-model]
----
and it would generate a Cypher string like this: `"MATCH (jwKyXzwS000:`Movie`) RETURN jwKyXzwS000"`, with generated variable names.
If you don't like them, you can just rename one instance of the movie-model like this:
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/model/StaticModelIT.java[tag=simple-model-renamed]
----
Of course, properties belong into a model as well. You add them like this:
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/model/Movie.java[tag=add-properties]
----
<.> Same class before, extending from `NodeBase`.
<.> Use `this` and the `property` method to create a new `Property` instance, stored on the given instance
A possible usage scenario looks like this:
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/model/StaticModelIT.java[tag=add-properties]
----
<.> Make sure to use the renamed instance everywhere. Here: For accessing the property. Alternatively, don't rename.
==== Relationships
Relationships are a bit more complicated. Relationships of the same type can be used between nodes with different labels.
We have these scenarios:
* `(s:LabelA) - (r:SomeType) -> (e:LabelB)`:
* `(s:LabelA) - (r:SomeType) -> (e)`
* `(s) - (r:SomeType) -> (e)`
We either have a type that is used only between the same set of labels, or a type is used always with one fixed label or
a type is used between arbitrary labels.
To accommodate for that, the default relationship implementation, `RelationshipBase`, spots three type parameters:
[source,java]
----
public class RelationshipBase, E extends NodeBase>, SELF extends RelationshipBase> {
}
----
`S` is the type of a start node, `E` of an end node and `SELF` is the concrete implementation itself.
The public API of `RelationshipBase` enforces a direction from start to end (`LTR`, left to right).
We just have a look at the first case to make the concepts clear. We model the `ACTED_IN` relationship of the movie graph.
It exists between people and movies (going from person to movie) and has an attribute roles:
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/model/ActedIn.java[tag=simple-model]
----
<.> The base class, with 3 concrete types. A `Person`, the `Movie` from <> and the type itself.
<.> Same idea with as with nodes: Store all properties as final attributes.
<.> There is no default constructor for a relationship: Start and end node must be specified. The type is fixed.
<.> Copy constructor for the following two methods
<.> Required to rename this relationship
<.> Required for querying properties
In contrast to the movie, we don't need a static attribute allowing access to the relationship.
This is stored at the owner. In this case, the `Person`:
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/model/Person.java[tag=simple-model]
----
<.> We create the relationship properties with `this` concrete instance pointing to another, concrete instance.
=== Summary
While there are possible other ways to define a static meta model with the Cypher-DSL, this is the way we create them with
the `neo4j-cypher-dsl-codegen` models.
================================================
FILE: docs/static-meta-model/index.adoc
================================================
[[static-meta-model]]
= Building a static metamodel
include::concepts.adoc[]
include::possible-usage.adoc[]
include::sdn6-annotation-processor.adoc[]
include::ogm-annotation-processor.adoc[]
================================================
FILE: docs/static-meta-model/ogm-annotation-processor.adoc
================================================
[[ogm-annotation-processor]]
== The Neo4j-OGM annotation processor
We provide a Java annotation processor for https://github.com/neo4j/neo4j-ogm[Neo4j-OGM] under the following coordinates:
[source,subs="verbatim,attributes",indent=0,tabsize=4]
.Coordinates of the Neo4j-OGM annotation processor
----
{groupId}:neo4j-cypher-dsl-codegen-ogm:{the-version}
----
The annotation processor understands classes annotated with `@NodeEntity` and `@RelationshipEntity`.
Inside those classes `@Relationship`, `@Property`, `@StartNode` and `@EndNode` are read.
The processor generates a static metamodel for each annotated class found in the same package with an underscore (`_`) added to the name.
The processor needs Neo4j-OGM 4 and the Cypher-DSL in version `2025.0.0` or later on it's classpath.
We recommend using it explicitly on the separate annotation processor classpath (via `--processor-path` to `javac`).
The processor does *not* support nested classes used as `@NodeEntity` or `@RelationshipEntity`.
This processor is a great choice for applications built on https://quarkus.io[Quarkus] using https://github.com/neo4j/neo4j-ogm-quarkus[Neo4j-OGM-Quarkus] but also for https://github.com/neo4j/neo4j-ogm-spring[Neo4j-OGM-Spring], our Spring Data Neo4j 5 work that supports Spring Boot >= 3 and the latest Spring Data generation with the behaviour of SDN5 and OGM.
=== Configure your build
==== Maven
As a Maven user, please configure the build as follows:
[source,xml,subs="verbatim,attributes",indent=0,tabsize=4]
----
org.apache.maven.pluginsmaven-compiler-plugin{groupId}neo4j-cypher-dsl-codegen-ogm{neo4j-cypher-dsl.version}
----
==== Gradle
In a Gradle project, please add the following:
[source,groovy,subs="verbatim,attributes"]
----
dependencies {
annotationProcessor '{groupId}:neo4j-cypher-dsl-codegen-ogm:{the-version}'
}
----
==== As dependency on the classpath
NOTE: We recommend the annotation processor path for two reasons: The processor needs Neo4j-OGM as dependency. While Neo4j-OGM is already on the classpath,
it might not fit the one we build the annotation processor against exactly.
While the processor is lenient in that regard, your dependency setup might not.
Furthermore: Why should you have the annotation processor as a dependency in your final artifact? This would be unnecessary.
If you insist on having the Neo4j-OGM annotation processor on the standard class path, please include with your Neo4j-OGM
application like as follows to avoid dependency conflicts:
[source,xml,subs="verbatim,attributes",indent=0,tabsize=4]
----
{groupId}neo4j-cypher-dsl-codegen-ogm{neo4j-cypher-dsl.version}trueorg.neo4jneo4j-ogm-core
----
=== Usage
The processor supports the same arguments as the <> except for `org.neo4j.cypherdsl.codegen.sdn.custom_converter_classes`.
The usage of the generated classes is identical.
================================================
FILE: docs/static-meta-model/possible-usage.adoc
================================================
== Possible Usage
Please assume we did model the "Movie graph" (`:play movies` in Neo4j-Browser) with the following scheme:
image::movie-graph.png[]
and these classes, which have been generated with the
<> (the required functions have been omitted for brevity):
[source,java,indent=0,tabsize=4]
----
final class Movie extends NodeBase {
public static final Movie MOVIE = new Movie();
public final Property TAGLINE = this.property("tagline");
public final Property TITLE = this.property("title");
public final Property RELEASED = this.property("released");
public Movie() {
super("Movie");
}
}
final class Person extends NodeBase {
public static final Person PERSON = new Person();
public final Property NAME = this.property("name");
public final Property FIRST_NAME = this.property("firstName");
public final Directed DIRECTED = new Directed<>(this, Movie.MOVIE);
public final ActedIn ACTED_IN = new ActedIn(this, Movie.MOVIE);
public final Property BORN = this.property("born");
public final Property DOB = this.property("dob");
public Person() {
super("Person");
}
}
final class ActedIn extends RelationshipBase {
public static final String $TYPE = "ACTED_IN";
public final Property ROLE = this.property("role");
protected ActedIn(Person start, Movie end) {
super(start, $TYPE, end);
}
}
final class Directed> extends RelationshipBase> {
public static final String $TYPE = "DIRECTED";
protected Directed(Person start, E end) {
super(start, $TYPE, end);
}
}
----
=== Work with properties
Properties can be used like normal objects:
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/model/StaticModelIT.java[tag=work-with-properties]
----
Of course, new properties can be derived:
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/model/StaticModelIT.java[tag=deriving-new-properties]
----
=== Query nodes or relationships by properties
Use `withProperties` (and `named` you like) to model your queries as needed.
Applicable to properties of nodes such as the title:
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/model/StaticModelIT.java[tag=query-node-by-properties]
----
and relationships:
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/model/StaticModelIT.java[tag=query-rel-by-properties]
----
Note that the query will look like this, as we didn't rename the objects and they used generated names:
[source,cypher]
----
`MATCH (dZVpwHhe000:`Person`)-[JcVKsSrn001:`ACTED_IN` {role: 'Neo'}]->(cDWeUJSI002:`Movie`) RETURN cDWeUJSI002`` as we didn't specify aliases)
----
=== Work with relationships
Relationships can be worked with like with properties:
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/model/StaticModelIT.java[tag=multiple-relationships]
----
They are quite flexible together with the `inverse` method. The following example also shows how to include non-static parts:
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-core/src/test/java/org/neo4j/cypherdsl/examples/model/StaticModelIT.java[tag=chaining-relationships]
----
<.> Using a non-static fragment
================================================
FILE: docs/static-meta-model/sdn6-annotation-processor.adoc
================================================
[[sdn6-annotation-processor]]
== The Spring Data Neo4j 6 annotation processor
We provide a Java annotation processor for https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#reference[Spring Data Neo4j] under the following coordinates:
[source,subs="verbatim,attributes",indent=0,tabsize=4]
.Coordinates of the SDN 6 annotation processor
----
{groupId}:neo4j-cypher-dsl-codegen-sdn6:{the-version}
----
The annotation processor understands classes annotated with `@Node` and `@RelationshipProperties`.
Inside those classes `@Relationship` and `@Property` are read.
The processor generates a static metamodel for each annotated class found in the same package with an underscore (`_`) added to the name.
The processor needs Spring Data Neo4j 6 and the Cypher-DSL in version `2021.1.0` or later on it's classpath.
We recommend using it explicitly on the separate annotation processor classpath (via `--processor-path` to `javac`).
TIP: Please make sure to use `@Relationship` when you use the annotation processor. While we do our best to detect possible,
implicit associations during annotation processing, we can't load classes that are being processed that very moment
to check if the Spring infrastructure would provide a custom converter for them and make them a simple property.
We won't generate fields when in doubt but relationships if we find the corresponding class.
The processor does *not* support nested classes used as `@Node` or `@RelationshipProperties` entities.
=== Configure your build
==== Maven
As a Maven user, please configure the build as follows:
[source,xml,subs="verbatim,attributes",indent=0,tabsize=4]
----
org.apache.maven.pluginsmaven-compiler-plugin{groupId}neo4j-cypher-dsl-codegen-sdn6{neo4j-cypher-dsl.version}
----
==== Gradle
In a Gradle project, please add the following:
[source,groovy,subs="verbatim,attributes"]
----
dependencies {
annotationProcessor '{groupId}:neo4j-cypher-dsl-codegen-sdn6:{the-version}'
}
----
==== As dependency on the classpath
NOTE: We recommend the annotation processor path for two reasons: The processor needs SDN as dependency. While SDN is already on the classpath,
it might not fit the one we build the annotation processor against exactly.
While the processor is lenient in that regard, your dependency setup might not.
Furthermore: Why should you have the annotation processor as a dependency in your final artifact? This would be unnecessary.
If you insist on having the SDN 6 annotation processor on the standard class path, please include with your Spring Data Neo4j 6
application like as follows to avoid dependency conflicts:
[source,xml,subs="verbatim,attributes",indent=0,tabsize=4]
----
{groupId}neo4j-cypher-dsl-codegen-sdn6{neo4j-cypher-dsl.version}trueorg.slf4jslf4j-simpleorg.springframework.dataspring-data-neo4j
----
=== Usage
The processor supports the following arguments:
|===
|Name | Meaning
| org.neo4j.cypherdsl.codegen.prefix,
| An optional prefix for the generated classes
| org.neo4j.cypherdsl.codegen.suffix
| An optional suffix for the generated classes
| org.neo4j.cypherdsl.codegen.indent_style
| The indent style (Use `TAB` for tabs, `SPACE` for spaces)
| org.neo4j.cypherdsl.codegen.indent_size
| The number of whitespaces for the indent style `SPACE`
| org.neo4j.cypherdsl.codegen.timestamp
| An optional timestamp in ISO_OFFSET_DATE_TIME format for the generated classes. Defaults to the time of generation.
| org.neo4j.cypherdsl.codegen.add_at_generated
| A flag whether `@Generated` should be added
| org.neo4j.cypherdsl.codegen.sdn.custom_converter_classes
| A comma separated list of custom Spring converter classes (Can be `Converter`, `GenericConverter`, `ConverterAware`,
pretty much everything you can register with `org.springframework.data.neo4j.core.convert.Neo4jConversions` ). However,
these converters must have a default-non-args constructor in the context of the annotation processor.
| org.neo4j.cypherdsl.codegen.excludes
| A comma separated list of fully qualified names of types that should be ignored (i.e. despite being annotated as `Node` or `RelationshipProperties`)
|===
The generated classes can be used in a variety of places:
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-sdn6/src/main/java/org/neo4j/cypherdsl/examples/sdn6/movies/MovieService.java[tag=as-property]
----
<.> Pass the name of the property `TITLE` to Spring Data's sort facility
Spring Data Neo4j 6.1 has two additional query fragments, that makes working with the Cypher-DSL very efficient:
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-sdn6/src/main/java/org/neo4j/cypherdsl/examples/sdn6/movies/PeopleRepository.java[tag=additional-fragments]
----
<.> Allows to just add conditions to our generated queries
<.> Provides an alternative to using @Query with strings
Both interfaces are *independent* of each other, they can be used together like in this example or separately (just picking the one you need).
You can read more about them in the Spring Data Neo4j 6.1 documentation, chapter https://docs.spring.io/spring-data/neo4j/docs/6.1.0-M5/reference/html/#sdn-mixins[Spring Data Neo4j Extensions].
The repository above can be used like this:
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-sdn6/src/main/java/org/neo4j/cypherdsl/examples/sdn6/movies/PeopleService.java[tag=using-person-repo]
----
<.> Using literals
<.> Using an optional parameter
<.> or when it's not filled, an empty condition
<.> Project a person onto `PersonDetails`, using a complex query.
Here is another complex example. The `MovieRepository` is also a `CypherdslStatementExecutor`:
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-sdn6/src/main/java/org/neo4j/cypherdsl/examples/sdn6/movies/MovieService.java[tag=more-examples]
----
<.> Here we use an anonymous parameter to store the `name` value
The full example is in `neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-sdn6`.
An example of using a mixture of anonymous and named parameters is shown in the following listing:
[source,java,indent=0,tabsize=4]
----
include::../../neo4j-cypher-dsl-examples/neo4j-cypher-dsl-examples-sdn6/src/main/java/org/neo4j/cypherdsl/examples/sdn6/movies/PeopleService.java[tag=using-temporals]
----
<.> An anonymous parameter with a simple `String`-value
<.> A named parameter with an `Integer` value extracted from a complex datatype
<.> An anonymous parameter again, but one that holds a complex datatype. Such datatype
can be anything that is understood by the Neo4j-Java-Driver, such as in this case, a temporal
but also maps and lists. It will always be passed as a value, never as a literal.
The statement above will be rendered like this:
[source,console]
----
[http-nio-auto-1-exec-1] 2022-06-21 11:40:57,732 DEBUG org.springframework.data.neo4j.cypher: 313 - Executing:
MERGE (p:`Person` {name: $pcdsl01}) ON CREATE SET p.born = $arbitraryName, p.dob = $pcdsl02 RETURN p
[http-nio-auto-1-exec-1] 2022-06-21 11:40:57,735 TRACE org.springframework.data.neo4j.cypher: 334 - with parameters:
:param arbitraryName => 1990
:param pcdsl01 => 'Liv Lisa Fries'
:param pcdsl02 => 1990-10-31T22:42Z[UTC]
----
================================================
FILE: etc/architecture/api.adoc
================================================
[[arch-rules.api]]
[role=group,includesConstraints="arch-rules.api:*"]
==== API
===== General considerations
We use https://github.com/apiguardian-team/apiguardian[@API Guardian] to keep track of what we expose as public or internal API.
To keep things both clear and concise, we restrict the usage of those annotations to interfaces, classes (only public methods and constructors:
and annotations.
[[arch-rules.api:api-guardian-usage]]
[source,java,indent=0,tabsize=4]
.@API Guardian annotations must not be used on fields
----
include::../../neo4j-cypher-dsl/src/test/java/org/neo4j/cypherdsl/core/PackageAndAPIStructureTests.java[tag=arch-rules.structure:core-must-not-depend-on-renderer]
----
===== Internal API
While we are pretty clear about the intended use of our classes (being experimental, public API or strictly internal),
we want to make sure that no-one can coincidentally inherit from internal classes that we couldn't restrict to default
package visibility.
There should not be any internal, public API inside the core package.
Everything that needs to be public for reasons (like being used in the renderer), must go into the `internal` package.
This package won't be exported via `module-info.java`.
[[arch-rules.api:internal]]
[source,java,indent=0,tabsize=4]
.Non abstract, public classes that are only part of internal API must be final
----
include::../../neo4j-cypher-dsl/src/test/java/org/neo4j/cypherdsl/core/PackageAndAPIStructureTests.java[tag=arch-rules.api:internal]
----
================================================
FILE: etc/architecture/index.adoc
================================================
[[arch-rules]]
[role=group,includesGroups="arch-rules.naming,arch-rules.api,arch-rules.structure"]
== Architecture
The Neo4j-Cypher-DSL consists of one main module: `org.neo4j.cypherdsl.core`.
The coordinates of that module `{groupId}:{artifactId}`, the JDK module name is `org.neo4j.cypherdsl.core`.
The rendering feature is part of the core module.
All other modules depend on the core. As the core reflects the Cypher language, it is not meant to be extendable.
Therefore, there is little to know API to do so with the AST visitor being the exception.
We document our rules structure with https://www.archunit.org[ArchUnit] within a single unittest named `org.neo4j.cypherdsl.core.PackageAndAPIStructureTests`.
=== Coding rules
include::naming.adoc[]
include::api.adoc[]
=== Structure
include::structure.adoc[]
================================================
FILE: etc/architecture/naming.adoc
================================================
[[arch-rules.naming]]
[role=group,includesConstraints="arch-rules.naming:*"]
==== Consistent naming
The following naming conventions are used throughout the project:
[[arch-rules.naming:TypeNameMustBeginWithGroupId]]
[source,java,indent=0,tabsize=4]
.All Java types must be located in packages that start with `org.neo4j.cypherdsl`.
----
include::../../neo4j-cypher-dsl/src/test/java/org/neo4j/cypherdsl/core/PackageAndAPIStructureTests.java[tag=arch-rules.naming:TypeNameMustBeginWithGroupId]
----
================================================
FILE: etc/architecture/structure.adoc
================================================
[[arch-rules.structure]]
[role=group,includesConstraints="arch-rules.structure:*"]
==== Neo4j-Cypher-DSL Core
The core of the Cypher-DSL is consist of a set of classes that loosely reassemble the https://www.opencypher.org[openCypher spec],
especially in the https://s3.amazonaws.com/artifacts.opencypher.org/M15/railroad/Cypher.html[railroad diagrams].
The main package of the core module is `org.neo4j.cypherdsl.core` which also reflects in the JDK module name: `org.neo4j.cypherdsl.core`.
Part of the Cypher-DSL core is also the `renderer` package as the main goal of the core is to render Cypher.
The `renderer` package is a sub-package of `core` as it is an essential part of it and in addition, the above mentioned
JDK module name should reflect exactly one package.
So while all other subpackages in `core` can be used freely from the `core` classes themselves, we don't want to access the
`renderer` package apart from one exception: The `AbstractStatement` class can be used to invoke the rendering process without
explicitly specifying a renderer:
[[arch-rules.structure:core-must-not-depend-on-renderer]]
[source,java,indent=0,tabsize=4]
.The Cypher-DSL core package must not depend on the rendering infrastructure
----
include::../../neo4j-cypher-dsl/src/test/java/org/neo4j/cypherdsl/core/PackageAndAPIStructureTests.java[tag=arch-rules.structure:core-must-not-depend-on-renderer]
----
The `renderer` package is not only free to use the whole `core`, it must do so to fulfill its purpose.
The `ast` and `utils` packages however should not have dependencies outside their own:
[[arch-rules.structure:supporting-packages-are-dependency-free]]
[source,java,indent=0,tabsize=4]
.Supporting packages must not depend on anything from the outside
----
include::../../neo4j-cypher-dsl/src/test/java/org/neo4j/cypherdsl/core/PackageAndAPIStructureTests.java[tag=arch-rules.structure:supporting-packages-are-dependency-free]
----
================================================
FILE: etc/changelog.tpl
================================================
==== 🚀 Features
==== 🐛 Bug Fixes
==== 🔄️ Refactorings
==== 📖 Documentation
==== 🧰 Tasks
==== 🧹 Housekeeping
==== 🛠 Build
================================================
FILE: etc/checkstyle/config.xml
================================================
================================================
FILE: etc/checkstyle/suppressions.xml
================================================
================================================
FILE: etc/index.tpl
================================================
Redirecting...
================================================
FILE: etc/license.tpl
================================================
Copyright (c) 2019-${year} "Neo4j,"
Neo4j Sweden AB [https://neo4j.com]
This file is part of Neo4j.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: etc/recipes/rewrite.yml
================================================
#
# Copyright (c) 2019-2026 "Neo4j,"
# Neo4j Sweden AB [https://neo4j.com]
#
# This file is part of Neo4j.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Run with
# ./mvnw org.openrewrite.maven:rewrite-maven-plugin:run \
# -Drewrite.configLocation=/full/path/to/cypher-dsl/etc/recipes/rewrite.yml \
# -Drewrite.activeRecipes=cypher-dsl.rewriteIdCalls
---
type: specs.openrewrite.org/v1beta/recipe
name: cypher-dsl.rewriteIdCalls
displayName: Change calls to Functions.id to Functions.elementId
recipeList:
- org.openrewrite.java.ChangeMethodName:
methodPattern: org.neo4j.cypherdsl.core.Functions id(..)
newMethodName: elementId
ignoreDefinition: true
================================================
FILE: mvnw
================================================
#!/bin/sh
# ----------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Apache Maven Wrapper startup batch script, version 3.3.4
#
# Required ENV vars:
# ------------------
# JAVA_HOME - location of a JDK home dir
#
# Optional ENV vars
# -----------------
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
# e.g. to debug Maven itself, use
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
# ----------------------------------------------------------------------------
if [ -z "$MAVEN_SKIP_RC" ]; then
if [ -f /usr/local/etc/mavenrc ]; then
. /usr/local/etc/mavenrc
fi
if [ -f /etc/mavenrc ]; then
. /etc/mavenrc
fi
if [ -f "$HOME/.mavenrc" ]; then
. "$HOME/.mavenrc"
fi
fi
# OS specific support. $var _must_ be set to either true or false.
cygwin=false
darwin=false
mingw=false
case "$(uname)" in
CYGWIN*) cygwin=true ;;
MINGW*) mingw=true ;;
Darwin*)
darwin=true
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
if [ -z "$JAVA_HOME" ]; then
if [ -x "/usr/libexec/java_home" ]; then
JAVA_HOME="$(/usr/libexec/java_home)"
export JAVA_HOME
else
JAVA_HOME="/Library/Java/Home"
export JAVA_HOME
fi
fi
;;
esac
if [ -z "$JAVA_HOME" ]; then
if [ -r /etc/gentoo-release ]; then
JAVA_HOME=$(java-config --jre-home)
fi
fi
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin; then
[ -n "$JAVA_HOME" ] \
&& JAVA_HOME=$(cygpath --unix "$JAVA_HOME")
[ -n "$CLASSPATH" ] \
&& CLASSPATH=$(cygpath --path --unix "$CLASSPATH")
fi
# For Mingw, ensure paths are in UNIX format before anything is touched
if $mingw; then
[ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] \
&& JAVA_HOME="$(
cd "$JAVA_HOME" || (
echo "cannot cd into $JAVA_HOME." >&2
exit 1
)
pwd
)"
fi
if [ -z "$JAVA_HOME" ]; then
javaExecutable="$(which javac)"
if [ -n "$javaExecutable" ] && ! [ "$(expr "$javaExecutable" : '\([^ ]*\)')" = "no" ]; then
# readlink(1) is not available as standard on Solaris 10.
readLink=$(which readlink)
if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then
if $darwin; then
javaHome="$(dirname "$javaExecutable")"
javaExecutable="$(cd "$javaHome" && pwd -P)/javac"
else
javaExecutable="$(readlink -f "$javaExecutable")"
fi
javaHome="$(dirname "$javaExecutable")"
javaHome=$(expr "$javaHome" : '\(.*\)/bin')
JAVA_HOME="$javaHome"
export JAVA_HOME
fi
fi
fi
if [ -z "$JAVACMD" ]; then
if [ -n "$JAVA_HOME" ]; then
if [ -x "$JAVA_HOME/jre/sh/java" ]; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
else
JAVACMD="$(
\unset -f command 2>/dev/null
\command -v java
)"
fi
fi
if [ ! -x "$JAVACMD" ]; then
echo "Error: JAVA_HOME is not defined correctly." >&2
echo " We cannot execute $JAVACMD" >&2
exit 1
fi
if [ -z "$JAVA_HOME" ]; then
echo "Warning: JAVA_HOME environment variable is not set." >&2
fi
# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {
if [ -z "$1" ]; then
echo "Path not specified to find_maven_basedir" >&2
return 1
fi
basedir="$1"
wdir="$1"
while [ "$wdir" != '/' ]; do
if [ -d "$wdir"/.mvn ]; then
basedir=$wdir
break
fi
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
if [ -d "${wdir}" ]; then
wdir=$(
cd "$wdir/.." || exit 1
pwd
)
fi
# end of workaround
done
printf '%s' "$(
cd "$basedir" || exit 1
pwd
)"
}
# concatenates all lines of a file
concat_lines() {
if [ -f "$1" ]; then
# Remove \r in case we run on Windows within Git Bash
# and check out the repository with auto CRLF management
# enabled. Otherwise, we may read lines that are delimited with
# \r\n and produce $'-Xarg\r' rather than -Xarg due to word
# splitting rules.
tr -s '\r\n' ' ' <"$1"
fi
}
log() {
if [ "$MVNW_VERBOSE" = true ]; then
printf '%s\n' "$1"
fi
}
BASE_DIR=$(find_maven_basedir "$(dirname "$0")")
if [ -z "$BASE_DIR" ]; then
exit 1
fi
MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
export MAVEN_PROJECTBASEDIR
log "$MAVEN_PROJECTBASEDIR"
trim() {
# MWRAPPER-139:
# Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds.
# Needed for removing poorly interpreted newline sequences when running in more
# exotic environments such as mingw bash on Windows.
printf "%s" "${1}" | tr -d '[:space:]'
}
##########################################################################################
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
# This allows using the maven wrapper in projects that prohibit checking in binary data.
##########################################################################################
wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar"
if [ -r "$wrapperJarPath" ]; then
log "Found $wrapperJarPath"
else
log "Couldn't find $wrapperJarPath, downloading it ..."
if [ -n "$MVNW_REPOURL" ]; then
wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.3.4/maven-wrapper-3.3.4.jar"
else
wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.4/maven-wrapper-3.3.4.jar"
fi
while IFS="=" read -r key value; do
case "$key" in wrapperUrl)
wrapperUrl=$(trim "${value-}")
break
;;
esac
done <"$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
log "Downloading from: $wrapperUrl"
if $cygwin; then
wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath")
fi
if command -v wget >/dev/null; then
log "Found wget ... using wget"
[ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet"
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
wget ${QUIET:+"$QUIET"} "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
else
wget ${QUIET:+"$QUIET"} --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
fi
elif command -v curl >/dev/null; then
log "Found curl ... using curl"
[ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent"
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
curl ${QUIET:+"$QUIET"} -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
else
curl ${QUIET:+"$QUIET"} --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
fi
else
log "Falling back to using Java to download"
javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java"
javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class"
# For Cygwin, switch paths to Windows format before running javac
if $cygwin; then
javaSource=$(cygpath --path --windows "$javaSource")
javaClass=$(cygpath --path --windows "$javaClass")
fi
if [ -e "$javaSource" ]; then
if [ ! -e "$javaClass" ]; then
log " - Compiling MavenWrapperDownloader.java ..."
("$JAVA_HOME/bin/javac" "$javaSource")
fi
if [ -e "$javaClass" ]; then
log " - Running MavenWrapperDownloader.java ..."
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath"
fi
fi
fi
fi
##########################################################################################
# End of extension
##########################################################################################
# If specified, validate the SHA-256 sum of the Maven wrapper jar file
wrapperSha256Sum=""
while IFS="=" read -r key value; do
case "$key" in wrapperSha256Sum)
wrapperSha256Sum=$(trim "${value-}")
break
;;
esac
done <"$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
if [ -n "$wrapperSha256Sum" ]; then
wrapperSha256Result=false
if command -v sha256sum >/dev/null; then
if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c - >/dev/null 2>&1; then
wrapperSha256Result=true
fi
elif command -v shasum >/dev/null; then
if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c >/dev/null 2>&1; then
wrapperSha256Result=true
fi
else
echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2
echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties." >&2
exit 1
fi
if [ $wrapperSha256Result = false ]; then
echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2
echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2
echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2
exit 1
fi
fi
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
[ -n "$JAVA_HOME" ] \
&& JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME")
[ -n "$CLASSPATH" ] \
&& CLASSPATH=$(cygpath --path --windows "$CLASSPATH")
[ -n "$MAVEN_PROJECTBASEDIR" ] \
&& MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR")
fi
# Provide a "standardized" way to retrieve the CLI args that will
# work with both Windows and non-Windows executions.
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*"
export MAVEN_CMD_LINE_ARGS
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
# shellcheck disable=SC2086 # safe args
exec "$JAVACMD" \
$MAVEN_OPTS \
$MAVEN_DEBUG_OPTS \
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
================================================
FILE: mvnw.cmd
================================================
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
@REM Apache Maven Wrapper startup batch script, version 3.3.4
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM set title of command window
title %0
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
:skipRcPre
@setlocal
set ERROR_CODE=0
@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal
@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome
echo. >&2
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo. >&2
goto error
:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init
echo. >&2
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo. >&2
goto error
@REM ==== END VALIDATION ====
:init
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir
:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir
:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"
:endDetectBaseDir
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
:endReadAdditionalConfig
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.4/maven-wrapper-3.3.4.jar"
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B
)
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
if exist %WRAPPER_JAR% (
if "%MVNW_VERBOSE%" == "true" (
echo Found %WRAPPER_JAR%
)
) else (
if not "%MVNW_REPOURL%" == "" (
SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.3.4/maven-wrapper-3.3.4.jar"
)
if "%MVNW_VERBOSE%" == "true" (
echo Couldn't find %WRAPPER_JAR%, downloading it ...
echo Downloading from: %WRAPPER_URL%
)
powershell -Command "&{"^
"$webclient = new-object System.Net.WebClient;"^
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
"}"^
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^
"}"
if "%MVNW_VERBOSE%" == "true" (
echo Finished downloading %WRAPPER_JAR%
)
)
@REM End of extension
@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file
SET WRAPPER_SHA_256_SUM=""
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B
)
IF NOT %WRAPPER_SHA_256_SUM%=="" (
powershell -Command "&{"^
"Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash;"^
"$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^
"If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^
" Write-Error 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^
" Write-Error 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^
" Write-Error 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^
" exit 1;"^
"}"^
"}"
if ERRORLEVEL 1 goto error
)
@REM Provide a "standardized" way to retrieve the CLI args that will
@REM work with both Windows and non-Windows executions.
set MAVEN_CMD_LINE_ARGS=%*
%MAVEN_JAVA_EXE% ^
%JVM_CONFIG_MAVEN_PROPS% ^
%MAVEN_OPTS% ^
%MAVEN_DEBUG_OPTS% ^
-classpath %WRAPPER_JAR% ^
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
%WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end
:error
set ERROR_CODE=1
:end
@endlocal & set ERROR_CODE=%ERROR_CODE%
if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
:skipRcPost
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%"=="on" pause
if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
cmd /C exit /B %ERROR_CODE%
================================================
FILE: neo4j-cypher-dsl/pom.xml
================================================
4.0.0org.neo4jneo4j-cypher-dsl-parent${revision}${sha1}${changelist}neo4j-cypher-dslNeo4j Cypher DSL (Core)The core module of the Cypher DSL, including all supported elements and the default renderer.${basedir}/../${aggregate.report.dir}org.neo4jneo4j-cypher-dsl-bom${project.version}pomimportorg.apiguardianapiguardian-apiorg.neo4jneo4j-cypher-dsl-schema-name-supportcom.querydslquerydsl-coreprovidedtrueorg.neo4jneo4j-cypher-dsl-build-annotations${project.version}providedtruecglibcglibtestcom.tngtech.archunitarchunittestorg.assertjassertj-coretestorg.junit.jupiterjunit-jupitertestorg.mockitomockito-coretestorg.slf4jslf4j-simpletestorg.codehaus.mojoexec-maven-plugin${exec-maven-plugin.version}remove-shaded-modulesexecgenerate-sourcesbin/remove-shaded-modules.shorg.apache.maven.pluginsmaven-surefire-plugin@{argLine} -Xverify:all
--add-modules com.querydsl.core
--add-reads org.neo4j.cypherdsl.core=com.querydsl.core
--add-opens java.base/java.lang=ALL-UNNAMEDorg.apache.maven.pluginsmaven-compiler-plugindefault-compile-Aorg.neo4j.cypherdsl.build.native_config_dir=${project.groupId}/${project.artifactId}-Xlint:all,-options,-path,-processing,-exports-Werrororg.neo4jneo4j-cypher-dsl-build-proc${project.version}default-testCompile-Aquerydsl.generatedAnnotationClass=com.querydsl.core.annotations.Generated-Xlint:all,-options,-path,-processing,-exports,-missing-explicit-ctor,-classfile-Werror-implicit:classcom.querydslquerydsl-apt${querydsl.version}generaljavax.annotationjavax.annotation-api${javax.annotation-api.version}org.apache.maven.pluginsmaven-shade-pluginshadepackageorg.neo4j:neo4j-cypher-dsl-schema-name-supportorg.neo4j.cypherdsl.support.schema_nameorg.neo4j.cypherdsl.core.internaltrueorg.neo4j:neo4j-cypher-dsl-schema-name-support**/SchemaNames*classmodule-info.classorg.moditectmoditect-maven-pluginadd-module-infosadd-module-infopackagetrue${project.build.directory}/modules/module-info.javacom.github.siom79.japicmpjapicmp-maven-plugincom\.querydsl\.core\..*org\.neo4j\.cypherdsl\.core\.internal\.LiteralBaseorg\.neo4j\.cypherdsl\.core\.internal\.StatementContext
================================================
FILE: neo4j-cypher-dsl/src/main/java/module-info.java
================================================
/*
* Copyright (c) 2019-2026 "Neo4j,"
* Neo4j Sweden AB [https://neo4j.com]
*
* This file is part of Neo4j.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @author Michael J. Simons
* @since 2023.0.0
*/
@SuppressWarnings({"requires-automatic", "requires-transitive-automatic"})
module org.neo4j.cypherdsl.core {
requires static com.querydsl.core;
requires static java.sql;
requires static org.neo4j.cypherdsl.build.annotations;
requires transitive org.apiguardian.api;
requires org.neo4j.cypherdsl.support.schema_name;
exports org.neo4j.cypherdsl.core;
exports org.neo4j.cypherdsl.core.ast;
exports org.neo4j.cypherdsl.core.renderer;
exports org.neo4j.cypherdsl.core.annotations;
}
================================================
FILE: neo4j-cypher-dsl/src/main/java/org/neo4j/cypherdsl/core/AbstractCase.java
================================================
/*
* Copyright (c) 2019-2026 "Neo4j,"
* Neo4j Sweden AB [https://neo4j.com]
*
* This file is part of Neo4j.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.neo4j.cypherdsl.core;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import org.neo4j.cypherdsl.core.annotations.CheckReturnValue;
import org.neo4j.cypherdsl.core.ast.Visitor;
import org.neo4j.cypherdsl.core.internal.CaseElse;
import org.neo4j.cypherdsl.core.internal.CaseWhenThen;
/**
* Abstract base class for a {@link Case}.
*
* @author Gerrit Meier
* @author Michael J. Simons
* @since 2021.2.3
*/
abstract class AbstractCase implements Case {
private final List caseWhenThens;
private CaseElse caseElse;
private Optional prefix = Optional.empty();
private Optional suffix = Optional.empty();
AbstractCase(List caseWhenThens) {
this.caseWhenThens = new ArrayList<>(caseWhenThens);
}
abstract Expression getCaseExpression();
@Override
public String toString() {
return RendererBridge.render(this);
}
void setCaseElse(CaseElse caseElse) {
this.caseElse = caseElse;
}
/**
* Creates a new case/when expression with an additional {@code WHEN} block.
* @param nextExpression the next expression to use.
* @return an ongoing when builder.
*/
@Override
@CheckReturnValue
public OngoingWhenThen when(Expression nextExpression) {
return new DefaultOngoingWhenThen(nextExpression);
}
@Override
public Optional getPrefix() {
return this.prefix;
}
@Override
public Optional getSuffix() {
return this.suffix;
}
@Override
public Property property(String... names) {
this.prefix = Optional.of("(");
this.suffix = Optional.of(")");
return Case.super.property(names);
}
@Override
public void accept(Visitor visitor) {
visitor.enter(this);
if (getCaseExpression() != null) {
getCaseExpression().accept(visitor);
}
this.caseWhenThens.forEach(caseWhenThen -> caseWhenThen.accept(visitor));
if (this.caseElse != null) {
this.caseElse.accept(visitor);
}
visitor.leave(this);
}
static class SimpleCaseImpl extends AbstractCase implements SimpleCase {
private final Expression caseExpression;
SimpleCaseImpl(Expression caseExpression) {
this(caseExpression, Collections.emptyList());
}
SimpleCaseImpl(Expression caseExpression, List caseWhenThens) {
super(caseWhenThens);
this.caseExpression = caseExpression;
}
@Override
Expression getCaseExpression() {
return this.caseExpression;
}
/**
* The renderable implementation of {@link SimpleCase}.
*/
static final class EndingSimpleCase extends SimpleCaseImpl implements CaseEnding {
private EndingSimpleCase(Expression caseExpression, List caseWhenThens) {
super(caseExpression, caseWhenThens);
}
@Override
public Case elseDefault(Expression defaultExpression) {
this.setCaseElse(new CaseElse(defaultExpression));
return this;
}
}
}
static class GenericCaseImpl extends AbstractCase implements GenericCase {
GenericCaseImpl() {
this(Collections.emptyList());
}
GenericCaseImpl(List caseWhenThens) {
super(caseWhenThens);
}
@Override
Expression getCaseExpression() {
return null;
}
/**
* The renderable implementation of {@link GenericCase}.
*/
static final class EndingGenericCase extends GenericCaseImpl implements CaseEnding {
private EndingGenericCase(List caseWhenThens) {
super(caseWhenThens);
}
@Override
public Case elseDefault(Expression defaultExpression) {
this.setCaseElse(new CaseElse(defaultExpression));
return this;
}
}
}
private final class DefaultOngoingWhenThen implements OngoingWhenThen {
final Expression whenExpression;
private DefaultOngoingWhenThen(Expression whenExpression) {
this.whenExpression = whenExpression;
}
/**
* Ends this {@code WHEN} block with an expression.
* @param expression the expression for the ongoing {@code WHEN} block.
* @return an ongoing when builder.
*/
@Override
@CheckReturnValue
public CaseEnding then(Expression expression) {
CaseWhenThen caseWhenThen = new CaseWhenThen(this.whenExpression, expression);
AbstractCase.this.caseWhenThens.add(caseWhenThen);
if (getCaseExpression() != null) {
return new SimpleCaseImpl.EndingSimpleCase(AbstractCase.this.getCaseExpression(),
AbstractCase.this.caseWhenThens);
}
else {
return new GenericCaseImpl.EndingGenericCase(AbstractCase.this.caseWhenThens);
}
}
}
}
================================================
FILE: neo4j-cypher-dsl/src/main/java/org/neo4j/cypherdsl/core/AbstractClause.java
================================================
/*
* Copyright (c) 2019-2026 "Neo4j,"
* Neo4j Sweden AB [https://neo4j.com]
*
* This file is part of Neo4j.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.neo4j.cypherdsl.core;
abstract class AbstractClause implements Clause {
@Override
public final String toString() {
return RendererBridge.render(this);
}
}
================================================
FILE: neo4j-cypher-dsl/src/main/java/org/neo4j/cypherdsl/core/AbstractNode.java
================================================
/*
* Copyright (c) 2019-2026 "Neo4j,"
* Neo4j Sweden AB [https://neo4j.com]
*
* This file is part of Neo4j.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.neo4j.cypherdsl.core;
import org.apiguardian.api.API;
import static org.apiguardian.api.API.Status.INTERNAL;
/**
* Abstract base class for the {@link NodeBase node implementation} to avoid default
* interface methods to be overridable in inheritors.
*
* @author Michael J. Simons
* @since 2021.1.0
*/
@API(status = INTERNAL, since = "2021.1.0")
abstract class AbstractNode extends AbstractPropertyContainer implements Node {
@Deprecated(forRemoval = true)
@Override
@SuppressWarnings("removal")
public final Condition hasLabels(LabelExpression labels) {
return hasLabels(Labels.of(labels));
}
@Override
public final Condition hasLabels(String... labelsToQuery) {
return HasLabelCondition.create(
this.getSymbolicName()
.orElseThrow(() -> new IllegalStateException("Cannot query a node without a symbolic name.")),
labelsToQuery);
}
@Override
public final Condition hasLabels(Labels labels) {
return HasLabelCondition.create(
this.getSymbolicName()
.orElseThrow(() -> new IllegalStateException("Cannot query a node without a symbolic name.")),
labels);
}
@Override
public final Condition isEqualTo(Node otherNode) {
return this.getRequiredSymbolicName().isEqualTo(otherNode.getRequiredSymbolicName());
}
@Override
public final Condition isNotEqualTo(Node otherNode) {
return this.getRequiredSymbolicName().isNotEqualTo(otherNode.getRequiredSymbolicName());
}
@Override
public final Condition isNull() {
return this.getRequiredSymbolicName().isNull();
}
@Override
public final Condition isNotNull() {
return this.getRequiredSymbolicName().isNotNull();
}
@Override
public final SortItem descending() {
return this.getRequiredSymbolicName().descending();
}
@Override
public final SortItem ascending() {
return this.getRequiredSymbolicName().ascending();
}
@Override
public final AliasedExpression as(String alias) {
return this.getRequiredSymbolicName().as(alias);
}
@Override
@SuppressWarnings("deprecation") // IDEA is stupid.
public final FunctionInvocation internalId() {
return Functions.id(this);
}
@Override
public final FunctionInvocation labels() {
return Functions.labels(this);
}
@Override
public final Relationship relationshipTo(Node other, String... types) {
return new InternalRelationshipImpl(null, this, Relationship.Direction.LTR, null, other, types);
}
@Override
public final Relationship relationshipFrom(Node other, String... types) {
return new InternalRelationshipImpl(null, this, Relationship.Direction.RTL, null, other, types);
}
@Override
public final Relationship relationshipBetween(Node other, String... types) {
return new InternalRelationshipImpl(null, this, Relationship.Direction.UNI, null, other, types);
}
@Override
public String toString() {
return RendererBridge.render(this);
}
}
================================================
FILE: neo4j-cypher-dsl/src/main/java/org/neo4j/cypherdsl/core/AbstractPropertyContainer.java
================================================
/*
* Copyright (c) 2019-2026 "Neo4j,"
* Neo4j Sweden AB [https://neo4j.com]
*
* This file is part of Neo4j.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.neo4j.cypherdsl.core;
import java.util.List;
import org.apiguardian.api.API;
import static org.apiguardian.api.API.Status.INTERNAL;
/**
* Abstract base class for all property containers to avoid default interface methods to
* be overridable in inheritors.
*
* @author Michael J. Simons
* @since 2021.1.0
*/
@API(status = INTERNAL, since = "2021.1.0")
abstract class AbstractPropertyContainer implements PropertyContainer {
static IllegalStateException noNameException() {
return new IllegalStateException(Cypher.MESSAGES.getString(MessageKeys.ASSERTIONS_REQUIRES_NAME_FOR_MUTATION));
}
@Override
public final Property property(String name) {
return InternalPropertyImpl.create(this, name);
}
@Override
public final Property property(String... names) {
return InternalPropertyImpl.create(this, names);
}
@Override
public final Property property(Expression lookup) {
return InternalPropertyImpl.create(this, lookup);
}
@Override
public final Operation mutate(Parameter> parameter) {
return Operations.mutate(this.getSymbolicName().orElseThrow(AbstractPropertyContainer::noNameException),
parameter);
}
@Override
public final Operation mutate(MapExpression properties) {
return Operations.mutate(this.getSymbolicName().orElseThrow(AbstractPropertyContainer::noNameException),
properties);
}
@Override
public final Operation set(Parameter> parameter) {
return Operations.set(this.getSymbolicName().orElseThrow(AbstractPropertyContainer::noNameException),
parameter);
}
@Override
public final Operation set(MapExpression properties) {
return Operations.set(this.getSymbolicName().orElseThrow(AbstractPropertyContainer::noNameException),
properties);
}
@Override
public final MapProjection project(List