我想从py2neo中的密码查询结果创建图形,但是它不能正常工作。
graphOne.delete_all()
a = py2neo.Node("Person", name="Alice")
b = py2neo.Node("Person", name="Bob")
ab = py2neo.Relationship(a, "KNOWS", b)
c = py2neo.Node("Person", name="Carol")
class WorksWith(py2neo.Relationship):
pass
ac = WorksWith(a, c)
s = ab | ac
txx = graphSandbox.begin()
txx.create(s)
txx.commit()
#I checked in console and in py2neo, desired subgraph is in my neo database
res = graphTest.run('MATCH (n) RETURN n LIMIT 10;').to_subgraph()
tx = graphSandbox.begin()
tx.create(res)
tx.commit()
#This subgraph is not in neo database!
我也尝试了merge
,但没有成功。对我来说,这似乎是py2neo库中的漏洞,但是有人可以帮我检查一下吗,还有其他比通过csv文件更直接的方法吗?