The following code :
1: def handle_row(row):2: print ("cypher query result:")3: print ( len (row))4: for nextNode in row:5: print (nextNode)6: print (type(nextNode))7:8:9: theCyperCode = "START n=node(1) ,other=node(2, 3) RETURN n,other"10:11: cypher.execute(graph_db, theCyperCode, row_handler=handle_row)
returns
cypher query result:
2
(1 {"name":"Bruce Willis"})
<class 'py2neo.neo4j.Node'>
(2 {"name":"John McClane"})
<class 'py2neo.neo4j.Node'>
cypher query result:
2
(1 {"name":"Bruce Willis"})
<class 'py2neo.neo4j.Node'>
(3 {"name":"Alan Rickman"})
<class 'py2neo.neo4j.Node'>
Start
אין תגובות:
הוסף רשומת תגובה