在 Neo4j 中,您可以很容易地返回一个伪节点(例如return {Name:'dummy node'}
返回一个具有属性 Name 的节点)。我广泛使用它来检查使用Load CSV
.
你如何返回一个伪关系?我想查看由于我的合并查询而创建的关系数量,而无需实际更改底层数据。
我尝试了多种方法,但都失败了:
return {Name:'dummy node'}-->{Name:'dummy node2'}`;
Neo.ClientError.Statement.SyntaxError
Invalid input '>': expected 0..9, '.', UnsignedHexInteger, UnsignedOctalInteger or UnsignedDecimalInteger (line 1, column 29 (offset: 28))
"return {Name:'dummy node'}-->{Name:'dummy node2'}"
return ({Name:'dummy node'}-->{Name:'dummy node2'});
Neo.ClientError.Statement.SyntaxError
Invalid input '>': expected 0..9, '.', UnsignedHexInteger, UnsignedOctalInteger or UnsignedDecimalInteger (line 1, column 30 (offset: 29))
"return ({Name:'dummy node'}-->{Name:'dummy node2'})"
return {{Name:'dummy node'}-->{Name:'dummy node2'}};
Neo.ClientError.Statement.SyntaxError
Invalid input '{': expected whitespace, an identifier, UnsignedDecimalInteger, a property key name or '}' (line 1, column 9 (offset: 8))
"return {{Name:'dummy node'}-->{Name:'dummy node2'}}"