(client: Client, table: string)
| 143 | ])) != null; |
| 144 | |
| 145 | const columnNames = async (client: Client, table: string): Promise<ReadonlySet<string>> => |
| 146 | new Set( |
| 147 | (await queryRows<{ name: string }>(client, `PRAGMA table_info(${quoteIdent(table)})`)).map( |
| 148 | (row) => row.name, |
| 149 | ), |
| 150 | ); |
| 151 | |
| 152 | const optionalColumn = (columns: ReadonlySet<string>, table: string, column: string): string => |
| 153 | columns.has(column) ? `${quoteIdent(table)}.${quoteIdent(column)}` : "NULL"; |
no test coverage detected