Skip to content

Instantly share code, notes, and snippets.

@elliottcordo
Created February 27, 2015 16:48
Show Gist options
  • Save elliottcordo/c48f558236ad4881e72a to your computer and use it in GitHub Desktop.
Save elliottcordo/c48f558236ad4881e72a to your computer and use it in GitHub Desktop.
--create some non existent relationships
MATCH (m:CONTACT {name: "leslie"}), (k:CONTACT {name: "greg"}) MERGE (k)-[r:KNOWS]-(m) ;
MATCH (m:CONTACT {name: "elliott"}), (k:CONTACT {name: "greg"}) MERGE (k)-[r:FOLLOWS]->(m) ON CREATE SET r.since = ["2014-01-01"];
--delete my connection to amex
MATCH (m:CONTACT {name: "elliott"})-[r]-(k {name: "American Express Company"}) delete r
--find 2nd level connections
match (elliott {name: "elliott"})-[r*0..2]-()
return *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment