MCPcopy Create free account
hub / github.com/sqlchat/sqlchat / newConnector

Function newConnector

src/lib/connectors/index.ts:13–26  ·  view source on GitHub ↗
(connection: Connection)

Source from the content-addressed store, hash-verified

11}
12
13export const newConnector = (connection: Connection): Connector => {
14 switch (connection.engineType) {
15 case Engine.MySQL:
16 return mysql(connection);
17 case Engine.PostgreSQL:
18 return postgres(connection);
19 case Engine.MSSQL:
20 return mssql(connection);
21 case Engine.OceanBase:
22 return mysql(connection);
23 default:
24 throw new Error("Unsupported engine type.");
25 }
26};

Callers 4

handlerFunction · 0.90
handlerFunction · 0.90
handlerFunction · 0.90
handlerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected