Created
June 27, 2013 13:38
-
-
Save calvindavis/5876477 to your computer and use it in GitHub Desktop.
Cypher query for toggling a relationship between two nodes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
START calvin = node(1), sophie = node(2) | |
CREATE (calvin)-[:LIKES]->(sophie) | |
MATCH (calvin)-[r:LIKES]->(sophie), (calvin)-[:LIKES]->(sophie) | |
DELETE r | |
RETURN count(r) = 1 AS likes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version without
START
, because it's deprecated in cypher 3.2