Files
sqlchat/src/types/connection.ts
2023-04-14 14:28:49 +08:00

29 lines
500 B
TypeScript

import { Id } from ".";
export enum Engine {
MySQL = "MYSQL",
PostgreSQL = "POSTGRESQL",
MSSQL = "MSSQL",
}
export interface SSLOptions {
ca?: string;
cert?: string;
key?: string;
}
export interface Connection {
id: Id;
title: string;
engineType: Engine;
host: string;
port: string;
username: string;
password: string;
// database is only required for PostgreSQL.
database?: string;
// encrypt is only required for MSSQL.
encrypt?: boolean;
ssl?: SSLOptions;
}