Are there any py2neo instruction to get end node of relationship, i have tried below code but it doesn't work. thank you
relmatcher = RelationshipMatcher(graph_db)
for rel in relmatcher.match(start_node=nodeid, r_type="IS_CONNECTED"):
print("END NODE:",rel.end_node()["name"])
I usually do this way:
from py2neo import Graph
graph = Graph("http:yourhost")
for rel in graph.match(start_node=nodeid, rel_type="IS_CONNECTED"):
print("END NODE:",rel.end_node()["name"])
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.