ExCellerate.Functions.General.Coalesce (excellerate v0.4.0)

Copy Markdown View Source

Returns the first non-null value from the given arguments.

Returns null if all arguments are null. Accepts any number of arguments.

Examples

coalesce(null, null, 'found')  'found'
coalesce('first', 'second')    'first'
coalesce(a, b, 0)              0 (when a and b are null)