mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 11:26:00 +00:00
34 lines
730 B
TypeScript
34 lines
730 B
TypeScript
import { ChildProcess } from 'child_process';
|
|
|
|
export interface QueryResult {
|
|
rows: any[];
|
|
}
|
|
|
|
export interface EngineDriver {
|
|
connect({ server, port, user, password });
|
|
query(pool, sql: string): Promise<QueryResult>;
|
|
getVersion(pool): Promise<string>;
|
|
listDatabases(pool): Promise<{ name: string }[]>;
|
|
analyseFull(pool): Promise<void>;
|
|
analyseIncremental(pool): Promise<void>;
|
|
}
|
|
|
|
export interface NamedObjectInfo {
|
|
pureName: string;
|
|
schemaName: string;
|
|
}
|
|
|
|
export interface TableInfo extends NamedObjectInfo {
|
|
}
|
|
|
|
export interface DatabaseInfo {
|
|
tables: TableInfo[];
|
|
}
|
|
|
|
export interface OpenedDatabaseConnection {
|
|
conid: string;
|
|
database: string;
|
|
structure: DatabaseInfo;
|
|
subprocess: ChildProcess;
|
|
}
|