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

Changes utilities.py:to_cypher_value to utilize double quotes when … #341

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

james-geiger
Copy link

…creating cypher values.

Description

This PR alters the to_cypher_values function to utilize double quotes when serializing into a cypher query.

Pull request type

Please delete options that are not relevant.

  • Bugfix

Related issues

Delete section if this PR doesn't resolve any issues.

Closes #318

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

######################################

Reviewer checklist (the reviewer checks this part)

  • Core feature implementation
  • Tests
  • Code documentation
  • Documentation on gqlalchemy/docs

######################################

…creating cypher values and updates test coverage.
Copy link
Contributor

@antejavor antejavor left a comment

Choose a reason for hiding this comment

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

It looks good, since it improves consistent in string quotes

@katarinasupe
Copy link
Contributor

Hi @james-geiger, I see there are other tests that should be fixed accordingly. Also, let me see if I understood correctly:

The problem you're resolving here is the case of having a single apostrophe in a string. A current approach in GQLAlchemy uses a single apostrophe around the string in the Cypher query. That is not a good approach when a string has a single apostrophe. A solution to this issue is to have double quotes around a string in Cypher that allows a single apostrophe when needed. This PR doesn't include any changes related to the \n issue mentioned.

@CLAassistant
Copy link

CLAassistant commented Mar 7, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ james-geiger
❌ katarinasupe
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants