* Quotes a Snowflake identifier so that whatever case the user typed is * preserved exactly. Without quoting, Snowflake folds unquoted identifiers * to uppercase, which silently breaks any table whose canonical name was * created with quoted mixed-case. Embedded `"` is escaped as `""`.
(name: string)
| 187 | * created with quoted mixed-case. Embedded `"` is escaped as `""`. |
| 188 | */ |
| 189 | function quoteIdentifier(name: string): string { |
| 190 | return `"${name.replace(/"/g, '""')}"` |
| 191 | } |
| 192 | |
| 193 | function buildStatement(config: SnowflakeDestinationConfig, rowCount: number): string { |
| 194 | const column = quoteIdentifier(config.column ?? 'DATA') |
no test coverage detected