coalesce

Table of Contents

Function

coalesce — return first value that is not null, a “missing” error, or a “quiet” error

Synopsis

coalesce(val: any [, ... val: any]) -> bool

Description

The coalesce function returns the first of its arguments that is not null, error("missing"), or error("quiet"). It returns null if all its arguments are null, error("missing"), or error("quiet").

Examples

yield coalesce(null, error("missing"), error("quiet"), 1)
true
Loading...
yield coalesce(null, error("missing"), error("quiet"))
true
Loading...
Next: compare

SuperDB