ms sql analyse - table list

This commit is contained in:
Jan Prochazka
2020-01-19 21:01:48 +01:00
parent c819aac098
commit 69322a4e41
14 changed files with 209 additions and 51 deletions

29
api/src/types.ts Normal file
View File

@@ -0,0 +1,29 @@
export interface EngineDriver {
connect({ server, port, user, password });
query(pool, sql: string): Promise<any[]>;
getVersion(pool): Promise<string>;
listDatabases(pool): Promise<{ name: string }[]>;
analyseFull(pool): Promise<void>;
analyseIncremental(pool): Promise<void>;
}
// export interface NameWithSchema {
// schema: string;
// name: string;
// }
export interface TableInfo {
// name: NameWithSchema;
tableName: string;
schemaName: string;
}
export interface DatabaseInfo {
tables: TableInfo[];
}
export interface OpenedDatabaseConnection {
id: string;
database: string;
structure: DatabaseInfo;
}