I'm working on a system deals with dynamic properties.
If I want to create a vertex, I can do it like this before that:
select * from ag_catalog.cypher('people',$$
create (nyk:person{name:'nyk'})
return nyk
$$) as (v ag_catalog.agtype);
But now, I don't know the property, the property is given by the user as a json object.
The property may be {name:'asdf'}
or {name:'asdf', age:25}
or {name:'asdf', work:'programmer'} ....
I don't know what property will get.
The problem is same when using the delete,update or get method. So how to deal with that? Can I bind the property with a json parameter?
Yoou need to create a parameterized query with a placeholder for the JSON object and use the USING clause to send the JSON parameter when running the query to link a dynamic property with a JSON parameter in your Cypher query. This enables you to work with properties that change according to what the user enters.