Returns the first non-null value from the argument list.
| Syntax | coalesce(<expr1>, <expr2> [, ...]) | ||
| Arguments | Name | Type | Description |
<expr> | Any | One or more expressions | |
| Return Type | Type of the first non-null argument | ||
GQLRETURN coalesce(null, null, 42, "hello")
Result: 42
Returns null if the two arguments are equal; otherwise returns the first argument.
| Syntax | nullif(<expr1>, <expr2>) | ||
| Arguments | Name | Type | Description |
<expr1> | Any | First expression | |
<expr2> | Any | Second expression | |
| Return Type | Type of <expr1>, or NULL | ||
GQLRETURN nullif(5, 5), nullif(5, 3)
Result:
| nullif | nullif |
|---|---|
null | 5 |