Neo4j和Cypher中逻辑运算的缩短
如何缩短以下查询以显示相同的内容,但字数更少:Neo4j和Cypher中逻辑运算的缩短,neo4j,cypher,Neo4j,Cypher,如何缩短以下查询以显示相同的内容,但字数更少: 其中node.code“a”和node.code“b”和node.code“c”和node.code“d”和node.code“e”和node.code“f”您可以使用不需要的值的集合,并执行成员资格检查: WITH ['a', 'b', 'c', 'd', 'e', 'f'] as excludedCodes // though it's better to pass these in as a list parameter if you can
其中node.code“a”和node.code“b”和node.code“c”和node.code“d”和node.code“e”和node.code“f”您可以使用不需要的值的集合,并执行成员资格检查:
WITH ['a', 'b', 'c', 'd', 'e', 'f'] as excludedCodes
// though it's better to pass these in as a list parameter if you can
... // perform your matches and such
WHERE NOT node.code in excludedCodes
...