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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/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:从部分匹配的索引查找查询返回结果_Neo4j_Cypher - Fatal编程技术网

Neo4J Cypher:从部分匹配的索引查找查询返回结果

Neo4J Cypher:从部分匹配的索引查找查询返回结果,neo4j,cypher,Neo4j,Cypher,我正在调用服务方法,我想知道是否有任何节点不存在。我不想运行多个查询 START l=node:node_auto_index(UserIdentifier = 'USER1'), f=node:node_auto_index(UserIdentifier = 'USER2') CREATE UNIQUE f-[fo:FOLLOWS]->l RETURN l, f, fo; 我想向客户端返回有意义的错误消息,告诉客户端“USER1”是否存在,“USER2”是否存在以及是否存在以下关系。目

我正在调用服务方法,我想知道是否有任何节点不存在。我不想运行多个查询

START l=node:node_auto_index(UserIdentifier = 'USER1'), f=node:node_auto_index(UserIdentifier = 'USER2')
CREATE UNIQUE f-[fo:FOLLOWS]->l
RETURN l, f, fo;
我想向客户端返回有意义的错误消息,告诉客户端“USER1”是否存在,“USER2”是否存在以及是否存在以下关系。目前,如果USER1或USER2不存在,此查询将不返回任何内容。如果他们都这样做,结果是好的。我怎么回去

l = USER1
f = NULL (or equivalent value that will tell me the user doesn't exist)
fo = NULL (or equivalent value that will tell me the user doesn't exist)
如果只有USER1存在?

合并(rec_part.DW_FLAG?,“NULLLLLLLL”) 您可以使用
coalesce
,如下所示

因此,如果要将其与
字符串
值一起使用,它可能如下所示:

START l=node:node_auto_index(UserIdentifier = 'USER1'), f=node:node_auto_index(UserIdentifier = 'USER2')
CREATE UNIQUE f-[fo:FOLLOWS]->l
RETURN coalesce(l.SOMETHING,"Value doesn't exist")

我试过了,它似乎不起作用,我想知道索引查找是否是问题所在