我需要能够在neo4j中创建或更新节点。我正在使用节点js。如何在nodejs中构造传递参数的密码查询
我想用参数来完成这个。
我需要构造一个暗号查询作为..
MERGE (user:Person:User {email: {props}.email})
ON CREATE user = {props} SET user.created = timestamp()
ON MATCH SET user.lastSeen = timestamp()
RETURN user'
我已经构造出查询参数的节点..
node={props:{name:'shekar',email:'[email protected]',age:10}}
如何构建CYPHER查询?
我想构建这样的暗号..
cypherQuery='MERGE (user:Person:User {email: ' + node.props.email + '})
ON CREATE user = ' + node.props + ' SET user.created = timestamp()
ON MATCH SET user.lastSeen = timestamp()
RETURN user';
我得到这个错误:
errorError: Invalid input '@': expected an identifier character, node labels, a property map, a relationship pattern, '(', '.', '[', "=~", IN, IS, '*', '/', '%', '^', '+', '-', '<', '>', "<=", ">=", '=', "<>", "!=", AND, XOR, OR, ',' or '}' (line 1, column 40)
"MERGE (user:Person:User {email: [email protected]}) ON CREATE user = [object Object] SET user.created = timestamp() ON MATCH SET user.lastSeen = timestamp() RETURN user"
- 协噶尔
整个Neo4j网站似乎最近都在改组。许多博客和SO帖子上的链接断开。 –