MCPcopy Create free account
hub / github.com/cmoog/vscode-sql-notebook / getPool

Function getPool

src/driver.ts:43–56  ·  view source on GitHub ↗
(c: PoolConfig)

Source from the content-addressed store, hash-verified

41 | PostgresConfig;
42
43export async function getPool(c: PoolConfig): Promise<Pool> {
44 switch (c.driver) {
45 case 'mysql':
46 return createMySQLPool(c);
47 case 'mssql':
48 return createMSSQLPool(c);
49 case 'postgres':
50 return createPostgresPool(c);
51 case 'sqlite':
52 return createSqLitePool(c);
53 default:
54 throw Error('invalid driver key');
55 }
56}
57
58// BaseConfig describes driver configuration options common between all implementations.
59// Driver-specific options are included in extensions that inherit this.

Callers 1

connectToDatabaseFunction · 0.90

Calls 4

createMySQLPoolFunction · 0.85
createMSSQLPoolFunction · 0.85
createPostgresPoolFunction · 0.85
createSqLitePoolFunction · 0.85

Tested by

no test coverage detected