(v: T | undefined, col: AnyMySqlColumn)
| 26 | |
| 27 | // Use the incoming value if one exists, else fallback to the DBs existing value. |
| 28 | export const updateIfDefined = <T>(v: T | undefined, col: AnyMySqlColumn) => |
| 29 | sql`COALESCE(${v === undefined ? sql`NULL` : v}, ${col})`; |
no outgoing calls
no test coverage detected