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

Include variable scope clause in deprecated Cypher query #6

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

willtai
Copy link
Collaborator

@willtai willtai commented Nov 15, 2024

Summary

The previous Cypher query would include a warning that the Cypher query will be deprecated. This PR update the query to have a variable scope clause. See https://neo4j.com/docs/cypher-manual/current/subqueries/call-subquery/#variable-scope-clause

This PR also adds a unit test and was manually tested.

@willtai willtai requested a review from alexthomas93 November 15, 2024 16:43
@willtai willtai force-pushed the update-deprecated-cypher-with-subqueries branch from 86bee58 to 502485b Compare November 15, 2024 16:51
@willtai willtai force-pushed the update-deprecated-cypher-with-subqueries branch from 502485b to 2a01b8f Compare November 15, 2024 17:06
Copy link
Collaborator

@alexthomas93 alexthomas93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -93,7 +93,7 @@ def _get_search_index_query(
"YIELD node, score "
),
SearchType.HYBRID: (
"CALL { "
"CALL () { "
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we supporting only neo4j >= 5.23 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I should include the old queries for older versions

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created another ticket to add support for Neo4j < 5.23 across the package. Feel free to add in support here but ideally we should think about exactly which versions we want to support and come up with a strategy that works across the package.

@willtai willtai requested a review from stellasia November 18, 2024 12:07
@willtai willtai merged commit 598917a into main Nov 18, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants