Reputation: 22731
Can I use the neography DSL to do this query?
Neo.execute_query "
MATCH (user:User{id: #{id}})
SET user.name = '#{given_name} #{surname}'
SET user.email = '#{email}'
"
Upvotes: 0
Views: 93
Reputation: 1463
Neography is not a DSL, but a wrapper around the REST API of Neo4J. As long as your query is a valid Cypher one, you can execute it like that. In you case, the 'id' is not a classic property, so I think you cannot use it like that. You may rewrite your query like this:
START user=node(#{id}) SET user.name = '#{given_name} #{surname}' SET user.email = '#{email}'
You may want to use parameters as well: http://docs.neo4j.org/chunked/milestone/rest-api-cypher.html
Upvotes: 1