0

I have a Cypher queries that looks like this

MATCH (r:Child)
WHERE r.uuid IS NULL
OPTIONAL MATCH r-[re]-(n)
delete r, re

MATCH (r:Parent)
WHERE r.uuid IS NULL
OPTIONAL MATCH r-[re]-(n)
delete r, re

Great but now I would like to combine these. Is there anyway I could do something like this...

MATCH (r:Parent||Child)
...

Is there a way to do this?

Jackie
  • 21,969
  • 32
  • 147
  • 289

1 Answers1

3

You can use or on the where clause

Match (r)
WHERE (r:Parent OR r:Child) and r.uuid IS NULL
cechode
  • 1,002
  • 1
  • 8
  • 20