MCPcopy Create free account
hub / github.com/bytebase/dbhub / getDefaultPortForType

Function getDefaultPortForType

src/utils/dsn-obfuscate.ts:204–213  ·  view source on GitHub ↗
(type: ConnectorType)

Source from the content-addressed store, hash-verified

202 * @returns The default port or undefined for SQLite
203 */
204export function getDefaultPortForType(type: ConnectorType): number | undefined {
205 const ports: Record<ConnectorType, number | undefined> = {
206 'postgres': 5432,
207 'mysql': 3306,
208 'mariadb': 3306,
209 'sqlserver': 1433,
210 'sqlite': undefined,
211 };
212 return ports[type];
213}

Callers 4

parseHostAndDatabaseFunction · 0.85
getDefaultPortMethod · 0.85
buildConnectionDSNMethod · 0.85
buildDSNFromSourceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected