我目前正在Neo4J上运行以下查询
match (p:Initial{state: 'Initial', name: 'Initial'}), (c:Encounter{code:'abcd', state: 'Encounter', name: 'Encounter1'})
merge (p)-[:raw {person_id:'1234', type:'Encounter', code:'abcd'}]->(c)但是,我无法在RedisGraph上执行相同的查询。根据我迄今为止的发现,Redis似乎不支持with other directives
发布于 2018-12-19 09:33:19
我现在看到的唯一选项是将它分成两个查询,第一个查询检查p是否连接到c:
MATCH (p:Initial{state: 'Initial', name: 'Initial'})-[:raw {person_id:'1234', type:'Encounter', code:'abcd'}]->(c:Encounter{code:'abcd', state: 'Encounter', name: 'Encounter1'}) RETURN p,c如果上面的查询返回空,发出第二个查询以形成关系:
MATCH (p:Initial{state: 'Initial', name: 'Initial'})(c:Encounter{code:'abcd', state: 'Encounter', name: 'Encounter1'}) CREATE (p)-[:raw {person_id:'1234', type:'Encounter', code:'abcd'}]->(c)https://stackoverflow.com/questions/53832914
复制相似问题