API 参考
    正在准备搜索索引...

    Table in the database represented in this class.

    索引

    构造函数

    • 参数

      返回 Table

    属性

    "@instanceof": symbol
    checks: TableCheck[]

    Table check constraints.

    columns: TableColumn[]

    Table columns.

    comment?: string

    Table comment. Not supported by all database types.

    database?: string

    Database name that this table resides in if it applies.

    engine?: string

    Table engine.

    exclusions: TableExclusion[]

    Table exclusion constraints.

    foreignKeys: TableForeignKey[]

    Table foreign keys.

    indices: TableIndex[]

    Table indices.

    justCreated: boolean

    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: string

    May contain database name, schema name and table name, unless they're the current database.

    E.g. myDB.mySchema.myTable

    schema?: string

    Schema name that this table resides in if it applies.

    uniques: TableUnique[]

    Table unique constraints.

    withoutRowid?: boolean

    Enables Sqlite "WITHOUT ROWID" modifier for the "CREATE TABLE" statement

    访问器

    • get primaryColumns(): TableColumn[]

      返回 TableColumn[]

    方法

    • Adds check constraint.

      参数

      返回 void

    • Add column and creates its constraints.

      参数

      返回 void

    • Adds exclusion constraint.

      参数

      返回 void

    • Adds foreign keys.

      参数

      返回 void

    • Adds index.

      参数

      返回 void

    • Adds unique constraint.

      参数

      返回 void

    • Clones this table to a new table with all properties cloned.

      返回 Table

    • 参数

      • name: string

      返回 undefined | TableColumn

    • Returns all column checks.

      参数

      返回 TableCheck[]

    • Returns all column foreign keys.

      参数

      返回 TableForeignKey[]

    • Returns all column indices.

      参数

      返回 TableIndex[]

    • Returns all column uniques.

      参数

      返回 TableUnique[]

    • Removes check constraint.

      参数

      返回 void

    • Remove column and its constraints.

      参数

      返回 void

    • Removes exclusion constraint.

      参数

      返回 void

    • Removes foreign key.

      参数

      返回 void

    • Removes index.

      参数

      返回 void

    • Removes unique constraint.

      参数

      返回 void

    • Creates table from a given entity metadata.

      参数

      返回 Table