我有这个密码
MATCH(qs:Persons)<-[r0:CONNECTED_TO]-(qi0:Documents)-[r1:LOCATED_IN]->(qe:Locations) return qs
我想在DSL py2neo中创建相同的结果。你知道吗
到现在为止我还有这个
graph = py2neo.Graph("bolt://localhost:7687", auth=("neo4j", "neo4j"))
matcher = py2neo.NodeMatcher(graph)
qs = matcher.match("Persons",name = "Jhon").first()
qi = matcher.match("Documents")
print list( graph.relationships.match( (qs, qi), "CONNECTED_TO" ) )
但该代码引发了以下例外。你知道吗
ValueError("Node %r does not belong to this graph" % n)
如何用py2neo创建相同的密码?你知道吗
确保创建的
matcher
对象与graph.relationships.match
调用中使用的graph
对象相同。你知道吗相关问题 更多 >
编程相关推荐