import * as Knex from "knex"; import { IDatabaseSchema } from "./mysql-database-definition"; export default class ModelBuilder { private knex; private databaseName?; static init(knex: Knex): Promise; /** * Return a copy of an object but with all keys lower case */ private static keysToLower; /** * Return the length of a type, eg varchar(255)=>255 * 0 if not parsable * @param type */ private static getMysqlLength; /** * Return the length of a type, eg varchar(255)=>varchar * @param type */ private static stripMysqlLength; private static getEnumValues; constructor(knex: Knex, databaseName?: string | undefined); renderDatabaseSchema(): Promise; private getDatabaseName; /** * return a select query to list all tables or views from a database */ private listFromDatabase; private listViews; /** * Lists all the tables in current database */ private listTables; private columnArrayToDatabaseSchema; /** * List all columns for a table given table name */ private listColumns; private renderModel; private listStoredProcedures; private listStoredProcedureParams; private renderStoredProcedures; private renderViewModel; private renderTableModel; }