(identifier: string)
| 170 | } |
| 171 | |
| 172 | function sanitizeSingleIdentifier(identifier: string): string { |
| 173 | const cleaned = identifier.replace(/`/g, '') |
| 174 | |
| 175 | if (!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(cleaned)) { |
| 176 | throw new Error( |
| 177 | `Invalid identifier: ${identifier}. Identifiers must start with a letter or underscore and contain only letters, numbers, and underscores.` |
| 178 | ) |
| 179 | } |
| 180 | |
| 181 | return `\`${cleaned}\`` |
| 182 | } |
| 183 | |
| 184 | export interface MySQLIntrospectionResult { |
| 185 | tables: Array<{ |
no test coverage detected