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

Function changeTiDBConnectionToMySQL

src/utils/tidb.ts:4–16  ·  view source on GitHub ↗
(connection: Connection)

Source from the content-addressed store, hash-verified

2import { Engine } from "@/types/connection";
3
4export const changeTiDBConnectionToMySQL = (connection: Connection) => {
5 if (connection.engineType === Engine.TiDB) {
6 return {
7 ...connection,
8 engineType: Engine.MySQL,
9 ssl: {
10 minVersion: "TLSv1.2",
11 rejectUnauthorized: true,
12 },
13 };
14 }
15 return connection;
16};

Callers 4

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

Calls

no outgoing calls

Tested by

no test coverage detected