Skip to content

Instantly share code, notes, and snippets.

@valefranz
Last active October 28, 2015 11:27
Show Gist options
  • Select an option

  • Save valefranz/7e5e4f70106c8b667ca6 to your computer and use it in GitHub Desktop.

Select an option

Save valefranz/7e5e4f70106c8b667ca6 to your computer and use it in GitHub Desktop.
scissors paper.... Spock! :) Neo4j example

This example can be run here: http://graphgist.neo4j.com/#!/gists/7e5e4f70106c8b667ca6 If you use the code or images, please cite: Valentina Franzoni, https://gist.github.com/valefranz/7e5e4f70106c8b667ca6

CREATE
(s:Agent{Name:"Scissors"}),
(r:Agent{Name:"Rock"}),
(p:Agent{Name:"Paper"}),
(l:Agent{Name:"Lizard"}),
(sp:Agent{Name:"Spock"}),
(s)-[:cuts]->(p),
(s)-[:decapitates]->(l),
(r)-[:crashes]->(s),
(r)-[:crushes]->(l),
(p)-[:disproves]->(sp),
(p)-[:covers]->(r),
(l)-[:poisons]->(sp),
(l)-[:eats]->(p),
(sp)-[:smashes]->(s),
(sp)-[:vapourizes]->(r)
RETURN s,r,p,l,sp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment