-
Notifications
You must be signed in to change notification settings - Fork 493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite exists(property) to property IS NOT NULL. No AUTO cherry-pick #2638
Conversation
As the former syntax is deprecated and scheduled for removal in Neo4j.
The syntax was a mix of old and new constraint syntax and this not valid
@@ -551,7 +554,7 @@ public void testIndexesMoreLabels() { | |||
@Test | |||
public void testSchemaRelationshipsExclude() { | |||
ignoreException(() -> { | |||
db.executeTransactionally("CREATE CONSTRAINT FOR ()-[like:LIKED]-() REQUIRE exists(like.day)"); | |||
db.executeTransactionally("CREATE CONSTRAINT FOR ()-[like:LIKED]-() REQUIRE like.day I"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like some part is missing here?
| name | type | properties | status | ||
| "CONSTRAINT ON ()-[liked:LIKED]-() ASSERT exists(liked.day)" | "RELATIONSHIP_PROPERTY_EXISTENCE" | ["day"] | "" | ||
| name | type | properties | status | ||
| "CONSTRAINT ON ()-[liked:LIKED]-() ASSERT liked.day IS NOT NULL" | "RELATIONSHIP_PROPERTY_EXISTENCE" | ["day"] | "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this should be updated to use FOR .. REQUIRE
as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I get over 100 matches on CONSTRAINT ON
on apoc dev though so I think we need a separate PR for that though if you don't have one open already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure lets do it separately then :)
Update APOC syntax to adapt to removal of exists(property) in Neo4j.