Options
All
  • Public
  • Public/Protected
  • All
Menu

MySql schema pre processor.

export
class

MysqlSchemaPreprocessor

Hierarchy

  • MysqlSchemaPreprocessor

Index

Methods

Private addColumnToTable

Private cleanupUnusedPropertiesFromColumns

  • cleanupUnusedPropertiesFromColumns(schema: Schema): Schema

convertToStandardSchema

Private normalizeManyToManyRelations

  • Normalizes many to many relations. Parses the table list and checks for tables which are CrossReferenceTables(many to many) and adds the foreign columns to the source and target tables.

    Parameters

    Returns Schema

    normalized db schema

Private normalizeOneToManyRelations

  • Normalizes one to many relations. Parses the table list and checks for tables which have foreign keys, are not CrossReferenceTables(many to many) and adds the foreign column on the holder.

    Parameters

    Returns Schema

    normalized db schema

Private normalizeOneToOneRelations

  • Normalizes one to one relations. Parses the table list and checks for tables which have unique foreign keys, are not CrossReferenceTables(many to many) and adds the foreign column on both sides of the relation.

    Parameters

    Returns Schema

    normalized db schema

normalizeSchemaRelations

Private removeColumnFromTable

  • removeColumnFromTable(schema: Schema, tableName: string, columnName: string): Schema

Private stripEmptyTables

Private tableHasForeignKeys

  • tableHasForeignKeys(table: Table): boolean

Private tableIsCrossReferenceTable

  • tableIsCrossReferenceTable(table: Table): boolean

Generated using TypeDoc