(driver: DriverCapabilities | DatabaseDriver)
| 61 | * a legacy string driver ID (MySQL/MariaDB use backticks, others use double quotes). |
| 62 | */ |
| 63 | export function getIdentifierQuote(driver: DriverCapabilities | DatabaseDriver): string { |
| 64 | if (typeof driver === 'object') { |
| 65 | return driver.identifier_quote || '"'; |
| 66 | } |
| 67 | return driver === 'mysql' || driver === 'mariadb' ? '`' : '"'; |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * Generates column definition SQL for a single column. |