Options
All
  • Public
  • Public/Protected
  • All
Menu

Table in the database represented in this class.

Hierarchy

  • Table

Index

Constructors

constructor

Properties

checks

checks: TableCheck[] = []

Table check constraints.

columns

columns: TableColumn[] = []

Table columns.

Optional engine

engine: undefined | string

Table engine.

foreignKeys

foreignKeys: TableForeignKey[] = []

Table foreign keys.

indices

indices: TableIndex[] = []

Table indices.

justCreated

justCreated: boolean = false

Indicates if table was just created. This is needed, for example to check if we need to skip primary keys creation for new tables.

name

name: string

Contains database name, schema name and table name. E.g. "myDB"."mySchema"."myTable"

uniques

uniques: TableUnique[] = []

Table unique constraints.

Accessors

primaryColumns

Methods

addCheckConstraint

  • addCheckConstraint(checkConstraint: TableCheck): void

addColumn

addForeignKey

addIndex

  • addIndex(index: TableIndex, isMysql?: boolean): void

addUniqueConstraint

  • addUniqueConstraint(uniqueConstraint: TableUnique): void

clone

findColumnByName

  • findColumnByName(name: string): TableColumn | undefined

findColumnChecks

findColumnForeignKeys

findColumnIndices

findColumnUniques

removeCheckConstraint

  • removeCheckConstraint(removedCheck: TableCheck): void

removeColumn

removeForeignKey

removeIndex

  • removeIndex(tableIndex: TableIndex, isMysql?: boolean): void

removeUniqueConstraint

  • removeUniqueConstraint(removedUnique: TableUnique): void

Static create

Generated using TypeDoc