neo4j / cypher-dsl

A Java DSL (Builder) for the Cypher Query Language
http://neo4j.github.io/cypher-dsl
Apache License 2.0
195 stars 63 forks source link

LabelExpression support #1077

Closed ikwattro closed 1 month ago

ikwattro commented 1 month ago

Hi,

Lot of our future query generation plans will need to support label expressions, such as :

MATCH (n:Person|Organization)

MATCH (n:(Person|Organization)&!Sanctioned)

I couldn't find this possible yet with the cypher-dsl, I would love to see this feature happen <3

michael-simons commented 1 month ago

We already support rendering them via LabelExpression, but you are right, there is no builder yet.

michael-simons commented 1 month ago

I am getting old: https://github.com/neo4j/cypher-dsl/blob/main/neo4j-cypher-dsl/src/test/java/org/neo4j/cypherdsl/core/LabelExpressionTest.java#L39

It is there already.

ikwattro commented 1 month ago

Thanks @michael-simons !