1 | import * as Knex from "knex";
|
2 | import { IDatabaseSchema } from "./mysql-database-definition";
|
3 | export default class ModelBuilder {
|
4 | private knex;
|
5 | private databaseName?;
|
6 | static init(knex: Knex): Promise<IDatabaseSchema>;
|
7 | |
8 |
|
9 |
|
10 | private static keysToLower;
|
11 | |
12 |
|
13 |
|
14 |
|
15 |
|
16 | private static getMysqlLength;
|
17 | |
18 |
|
19 |
|
20 |
|
21 | private static stripMysqlLength;
|
22 | private static getEnumValues;
|
23 | constructor(knex: Knex, databaseName?: string | undefined);
|
24 | renderDatabaseSchema(): Promise<IDatabaseSchema>;
|
25 | private getDatabaseName;
|
26 | /**
|
27 | * return a select query to list all tables or views from a database
|
28 | */
|
29 | private listFromDatabase;
|
30 | private listViews;
|
31 | /**
|
32 | * Lists all the tables in current database
|
33 | */
|
34 | private listTables;
|
35 | private columnArrayToDatabaseSchema;
|
36 | /**
|
37 | * List all columns for a table given table name
|
38 | */
|
39 | private listColumns;
|
40 | private renderModel;
|
41 | private listStoredProcedures;
|
42 | private listStoredProcedureParams;
|
43 | private renderStoredProcedures;
|
44 | private renderViewModel;
|
45 | private renderTableModel;
|
46 | }
|