Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/neo4j/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Neo4j 当我运行这个cypher cql';返回全部(x在[]中,其中有(y在x中,其中x=';a';)';_Neo4j_Cypher_Graph Databases_Spring Data Neo4j - Fatal编程技术网

Neo4j 当我运行这个cypher cql';返回全部(x在[]中,其中有(y在x中,其中x=';a';)';

Neo4j 当我运行这个cypher cql';返回全部(x在[]中,其中有(y在x中,其中x=';a';)';,neo4j,cypher,graph-databases,spring-data-neo4j,Neo4j,Cypher,Graph Databases,Spring Data Neo4j,当我运行cql返回all(x在[]中,其中有任何(y在x中,其中有x='a'))时,它将得到结果“true”。当我在[]中运行cql返回“a”时,它将得到结果“false”,但为什么第一个cql将得到true?如果尝试此查询:返回any(x在null中,其中有x='a') 结果是null,因为它既不是true也不是false,因为列表是null 现在,如果您尝试此查询:返回全部(x在[]中,其中为null) 结果是true,因为列表是空的,所以您可以放置您想要的where子句(即使where n

当我运行cql
返回all(x在[]中,其中有任何(y在x中,其中有x='a'))
时,它将得到结果“true”。当我在[]中运行cql
返回“a”时,它将得到结果“false”,但为什么第一个cql将得到true?

如果尝试此查询:
返回any(x在null中,其中有x='a')
结果是
null
,因为它既不是
true也不是
false
,因为列表是
null

现在,如果您尝试此查询:
返回全部(x在[]中,其中为null)
结果是
true
,因为列表是空的,所以您可以放置您想要的where子句(即使
where null
没有任何意义)


因此,这些查询的结合,即
返回all(x in[]其中any(y in x其中x='a'))
真的

,可能是因为在第一个语句中,没有
x
满足条件,所以所有
x
都在
[]
中。