-
Notifications
You must be signed in to change notification settings - Fork 447
Closed as not planned
Labels
StaleStale issues/PRsStale issues/PRsquestionFurther information is requestedFurther information is requested
Description
Describe the bug
An error is observed when a property parameter includes a single quote.
How are you accessing AGE (Command line, driver, etc.)?
- I'm using the apache-age-python package in a python project.
What data setup do we need to do?
def upsert_triplet_test(subj: str, rel: str, obj: str) -> None:
prepared_statement = f"""
MERGE (n1:`Entity` {{id: %s}})
MERGE (n2:`Entity` {{id: %s}})
MERGE (n1)-[:`{rel.replace(" ", "_").upper()}`]->(n2)
"""
ag.execCypher(
prepared_statement,
params=(
subj,
obj,
),
)
ag.commit()
upsert_triplet_test(
"I", "Learned", "It's better for technology companies to be run by product people"
)
This is the error
cursor.execute(stmt)
psycopg2.errors.SyntaxError: syntax error at or near "'s better for technology companies to be run by product people'"
What is the necessary configuration info needed?
- nothing
What is the command that caused the error?
SELECT * from ag_catalog.cypher('graph_store', $$
MERGE (n1:`Entity` {id: 'I'})
MERGE (n2:`Entity` {id: 'It's better for technology companies to be run by product people'})
MERGE (n1)-[:`Learned`]->(n2)
$$) as (a ag_catalog.agtype);
Not sure how to handle this case
ERROR: syntax error at or near "s"
LINE 3: MERGE (n2:`Entity` {id: 'It's better for technology com...
Expected behavior
This merge operation should be succeed.
Environment (please complete the following information):
- Version: package version 0.0.7
- AGE Version: 1.5.0
Additional context
no
Mocuto
Metadata
Metadata
Assignees
Labels
StaleStale issues/PRsStale issues/PRsquestionFurther information is requestedFurther information is requested