AadilBashir489 commented on issue #113:
URL: https://github.com/apache/age/issues/113#issuecomment-1597173727
I also the got exact same issue. I posted it on stackoverflow and got the
answer.
Answer:
You can later use the SET clause to insert the properties. Assuming that
{name: 'John Doe'} is the JSON provided by the user, the following code
demonstrates its usage:
`SELECT * FROM cypher('test', $$
CREATE (:Person)
$$) AS (res agtype);
res
-----
(0 rows)
SELECT * FROM cypher('test', $$
MATCH (n:Person)
SET n = {name: 'John Doe'}
RETURN n
$$) AS (res agtype);
res
-----------------------------------------------------------------------------------------
{"id": 1407374883553281, "label": "Person", "properties": {"name": "John
Doe"}}::vertex
(1 row)`
If you intend to incorporate user input, you'll need to use one of the
drivers available for AGE, such as the Python driver.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]