I’m trying to do something like:
IF NOT MATCH (u:User)
WHERE u.email = "me@you.com"
OR u.username = "bill"
THEN CREATE (u2:User { email: "me@you.com", username: "bill", role: "admin" })
I tried this:
OPTIONAL MATCH (u:User) WHERE u.username = "bill"
OR u.email = "me@you.com"
WITH u CASE u WHEN NOT NULL
THEN CREATE (u2:User { email: "me@you.com", username: "bill", role: "admin" })
I feel like I am so close here.
Thoughts?
Thanks,
J