neo4j-rstats / neo4r

A Modern and Flexible Neo4J Driver
https://neo4j-rstats.github.io/user-guide/
Other
106 stars 30 forks source link

Switch to graph when row is not available #59

Open ColinFay opened 5 years ago

ColinFay commented 5 years ago

Some queries can't be turned into rows, so I think these should be switched to graph mode if they fail.

E.g :

MATCH p=shortestPath(
  (bacon:Person {name:"Kevin Bacon"})-[*]-(meg:Person {name:"Meg Ryan"})
  ) RETURN p

works with graph, not with row

# FAILS
call_neo4j('MATCH p=shortestPath(
  (bacon:Person {name:"Kevin Bacon"})-[*]-(meg:Person {name:"Meg Ryan"})
  ) RETURN p', con, "row")
# WORKS 
call_neo4j('MATCH p=shortestPath(
  (bacon:Person {name:"Kevin Bacon"})-[*]-(meg:Person {name:"Meg Ryan"})
  ) RETURN p', con, "graph")