Sorry, last one for today! I have been trying to get one particular query working and working through the issues one by one.
# returns no results (wrong, neo4j returns success2 = 1)
WITH [] as toRemove
CALL {
WITH toRemove WITH toRemove
WHERE SIZE(toRemove) > 0
RETURN 2 AS success2
UNION
WITH toRemove WITH toRemove
WHERE SIZE(toRemove) = 0
RETURN 1 AS success2
}
RETURN success2
# returns success2 = 2 (correct)
WITH ["a"] as toRemove
CALL {
WITH toRemove WITH toRemove
WHERE SIZE(toRemove) > 0
RETURN 2 AS success2
UNION
WITH toRemove WITH toRemove
WHERE SIZE(toRemove) = 0
RETURN 1 AS success2
}
RETURN success2
Sorry, last one for today! I have been trying to get one particular query working and working through the issues one by one.