我开始学习Cypher。我已经阅读了 openCypher 规范,并且创建了几个使用 Cypher 的不同图形数据库。目前我正在 Docker 中运行 Memgraph。
这是我的查询,效果很好
MATCH (p:Park)
WITH COLLECT(p) AS parks
CALL tsp.solve(parks) YIELD sources, destinations
WITH RANGE(0, SIZE(sources)-1) AS rows, sources, destinations
UNWIND rows AS unwind
RETURN sources[unwind] AS source, destinations[unwind] AS destination
有效的部分,但我认为它不应该起作用的部分是
UNWIND rows AS unwind
.
在 openCypher 规范下,保留关键字不能是变量名,但在 Memgraph 中这是可能的。
如果保留密码命令/子句的名称,我不应该将它们用作变量名。我说得对吗?