Skip to content
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

Merged
merged 4 commits into from Mar 16, 2022

Conversation

Lojjs
Copy link
Contributor

@Lojjs Lojjs commented Mar 15, 2022

Update APOC syntax to adapt to removal of exists(property) in Neo4j.

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
@Lojjs Lojjs added 5.0 team-cypher-surface Cypher Surface team should review the PR labels Mar 15, 2022
@AzuObs AzuObs self-assigned this Mar 15, 2022
@@ -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");

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?

@Hunterness Hunterness self-assigned this Mar 15, 2022
@Lojjs Lojjs changed the title Rewrite exists(property) to property IS NOT NULL. Rewrite exists(property) to property IS NOT NULL. No AUTO cherry-pick Mar 15, 2022
| 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"] | ""

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

Copy link
Contributor Author

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?

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 :)

@Lojjs Lojjs merged commit cf02cca into dev Mar 16, 2022
@Lojjs Lojjs deleted the dev-remove-exists-of-property branch March 16, 2022 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.0 team-cypher-surface Cypher Surface team should review the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants