Closed hijan94 closed 5 years ago
You can use any pattern with a condition. For example pattern oneSokobanSelectedFigureRequired when enforce selectedFigureRequired
will create the following query:
MATCH
(sokoban:Sokoban)
WITH sokoban
OPTIONAL MATCH
(b_1:Board)-[b_1_selectedFigure_0_sokoban_1:selectedFigure]->(sokoban:Sokoban),
(sokoban:Sokoban)
WITH sokoban, b_1, b_1_selectedFigure_0_sokoban_1
WHERE b_1 IS NOT NULL AND b_1_selectedFigure_0_sokoban_1 IS NOT NULL AND sokoban IS NOT NULL
WITH sokoban, b_1, b_1_selectedFigure_0_sokoban_1
RETURN sokoban
The last check AND sokoban IS NOT NULL
is unnecessary.
How can I reproduce this?