【发布时间】:2019-02-05 20:43:11
【问题描述】:
在给定要搜索的顺序属性列表的情况下,我想查看图的路径是否存在。该列表可以是可变长度的。
这是我最近的尝试:
WITH ['a', 'b', 'c', 'd'] AS search_list // can be any list of strings
// FOREACH (i IN range(search_list) |
// MATCH (a:Node {prop:i})-->(b:Node {prop:i+1}))
// RETURN true if all relationships exist, false if not
此解决方案不起作用,因为您不能在 FOREACH 中使用 MATCH。我应该怎么做?
【问题讨论】: