Skip to content

Instantly share code, notes, and snippets.

@zdebra
Last active December 11, 2016 20:40
Show Gist options
  • Save zdebra/54c4218c51339a7f435d9229d35e34db to your computer and use it in GitHub Desktop.
Save zdebra/54c4218c51339a7f435d9229d35e34db to your computer and use it in GitHub Desktop.
neo4j java
Result r4 = db.execute("MATCH (l:lorry)-->(d:delivery) OPTIONAL MATCH (d)-->(f:food {name:'avocado'}) RETURN l.driver AS driver, f.count as count");
while (r4.hasNext()) {
Map<String, Object> row = r4.next();
System.out.println("driver: "+row.get("driver") + ", avocados: " + row.get("count"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment