从REST端点执行cypher查询时出现错误
Message: Failed: [{"code":"Neo.ClientError.Statement.InvalidSyntax","message":"Invalid input 'H': expected 'i/I' (line 1, column 39 (offset: 38))\n\"MATCH (n:User) SET n += {properties} WHERE ID(n) = {id} RETURN ID(n) as id, n as user\"\n ^"}]
查询REST端点: - " /分贝/数据/交易/提交"
{
statement: 'MATCH (n:User) SET n += {properties} WHERE ID(n) = {id} RETURN ID(n) as id, n as user',
parameters: { id: 185, properties: { lastName: 'Banderas', age: 40 } }
}
{
statement: 'MATCH (n:User) SET n += {properties} WHERE ID(n) = {id} RETURN ID(n) as id, n as user',
parameters: { id: 185, properties: { lastName: 'Banderas', age: 40 } }
}
答案 0 :(得分:0)
WHERE
子句应该在SET之前:
MATCH (n:User) WHERE ID(n) = {id}
SET n += {properties}