我有一个图形模型,我想根据一些条件进行查询..
我使用With
andWhere
进行嵌套查询;就像
START n1=node:ValueIndex('VALUE:DCM')
MATCH p1 = n1-[r1:REL]->n2
WHERE some_condition [1]
With n1,n2,r1,p1
match p2 = n1-[r1:REL]->n2-[r2:PASS_REL]->n3
where some_condition [2]
With n1,n2,r1,p1, n3,r2, p2
match p3 = n1-[r1:REL]->n2-[r2:REL]->n3-[r3:REL]->n4
where some_condition [3]
With All the values above
Where "condition that must be applied to all nodes" [4]
RETURN n1 ,n2,n3, n4
在这种情况下,条件 1,2,3 4 必须为真才能获得正确的数据..
但我真正想要的是,当任何条件为假时,查询停止但必须返回先前条件的数据..
任何帮助,将不胜感激..