openCypher
openCypher copied to clipboard
Support for DECODE or MAP function as an alternative to simple CASE
Can Neo4j Cypher support DECODE function in a future version? It could simply be an alias to the simple CASE:
CASE test
WHEN value THEN result
[WHEN ...]
[ELSE default]
END
translates as DECODE to:
DECODE ( test
, value , result
[, value , result
, ...]
[, default] )
The function is less verbose than simple CASE.
If the word DECODE is not the right fit, consider the word CASE itself, or something else like MAP (for mapping values to alternative values).
Moved from neo4j/neo4j#7139.