( ...args: T )
| 347 | : BasicExpression<CoalesceArgTypes<T> | null> |
| 348 | |
| 349 | export function coalesce<T extends [ExpressionLike, ...Array<ExpressionLike>]>( |
| 350 | ...args: T |
| 351 | ): CoalesceReturnType<T> { |
| 352 | return new Func( |
| 353 | `coalesce`, |
| 354 | args.map((arg) => toExpression(arg)), |
| 355 | ) as CoalesceReturnType<T> |
| 356 | } |
| 357 | |
| 358 | /** |
| 359 | * Returns the value for the first matching condition, similar to SQL |