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中的条款_Neo4j - Fatal编程技术网

如何在';在';neo4j中的条款

如何在';在';neo4j中的条款,neo4j,Neo4j,我想在neo4j中的IN子句密码中添加一个子查询,如下面的SQL代码所示 update Contact set LookedupStatus = 1 where ContactId IN (SELECT ContactId FROM Contact where ((FacebookUrl IS NOT NULL) or (TwitterUrl IS NOT NULL) or (LinkedinUrl IS NOT NULL)) and ((FacebookUrl != '') or (T

我想在neo4j中的IN子句密码中添加一个子查询,如下面的SQL代码所示

update Contact set LookedupStatus = 1 where ContactId IN (SELECT 
ContactId  FROM Contact where 
((FacebookUrl IS NOT NULL) or (TwitterUrl IS NOT NULL) or (LinkedinUrl 
IS NOT NULL))
and
((FacebookUrl != '') or (TwitterUrl != '') or (LinkedinUrl != '')))

如果您有:Contact节点,并且所有这些字段都被建模为:Contact节点的属性,那么请帮助我们如何将上述SQL代码转换为neo4j密码

Cypher不需要使用子查询来处理这个问题,只需匹配、过滤和设置过滤节点上的属性就足够了

// first match on :Contact nodes with the required properties
MATCH (c:Contact)
WHERE ((c.FacebookUrl IS NOT NULL) or (c.TwitterUrl IS NOT NULL) or (c.LinkedinUrl IS NOT NULL))
and
((c.FacebookUrl <> '') or (c.TwitterUrl <> '') or (c.LinkedinUrl <> ''))
// update status
SET c.LookedupStatus = 1
//上的第一个匹配:使用所需属性联系节点
匹配(c:联系人)
其中((c.FacebookUrl不为NULL)或(c.TwitterUrl不为NULL)或(c.LinkedinUrl不为NULL))
和
((c.FacebookUrl“”)或(c.TwitterUrl“”)或(c.LinkedinUrl“”)
//更新状态
设置c.LookedupStatus=1