Exists
Cypher® EXISTS 子查询 可以使用 new Cypher.Exists() 创建。为此,需要将有效查询传递给 Exists。
请注意,计数子查询也可以在 WHERE 子句中用作谓词,例如
const subquery = new Cypher.Match(new Cypher.Node({ labels: ["Movie"] })).return("*");
const existsExpr = new Cypher.Exists(subquery);
const match = new Cypher.Match(new Cypher.Node()).where(existsExpr).return("*");
MATCH (this0)
WHERE EXISTS {
MATCH (this1:Movie)
RETURN *
}
RETURN *