* Maps a protocol string to a ConnectorType
(protocol: string)
| 185 | * Maps a protocol string to a ConnectorType |
| 186 | */ |
| 187 | function protocolToConnectorType(protocol: string): ConnectorType | undefined { |
| 188 | const mapping: Record<string, ConnectorType> = { |
| 189 | 'postgres': 'postgres', |
| 190 | 'postgresql': 'postgres', |
| 191 | 'mysql': 'mysql', |
| 192 | 'mariadb': 'mariadb', |
| 193 | 'sqlserver': 'sqlserver', |
| 194 | 'sqlite': 'sqlite' |
| 195 | }; |
| 196 | return mapping[protocol]; |
| 197 | } |
| 198 | |
| 199 | /** |
| 200 | * Get the default port for a database type |
no outgoing calls
no test coverage detected