Builds and performs alter table statements

Hierarchy

  • AlterTable

Constructors

Methods

  • Create the add column SQL

    Returns

    add column SQL

    Parameters

    • tableName: string

      table name

    • columnName: string

      column name

    • columnDef: string

      column definition

    Returns string

  • Create the ALTER TABLE SQL command prefix

    Returns

    alter table SQL prefix

    Parameters

    • table: string

      table name

    Returns string

  • Alter a table with a new table SQL creation statement and table mapping.

    Altering a table: Removes views on the table, creates a new table, transfers the old table data to the new, drops the old table, and renames the new table to the old. Indexes, triggers, and views that reference deleted columns are not recreated. An attempt is made to recreate the others including any modifications for renamed columns.

    Creating a new table: Creates a new table and transfers the table data to the new. Triggers are not created on the new table. Indexes and views that reference deleted columns are not recreated. An attempt is made to create the others on the new table.

    Making Other Kinds Of Table Schema Changes: https://www.sqlite.org/lang_altertable.html

    Parameters

    Returns void

  • Alter a table with a new table schema and table mapping.

    Altering a table: Removes views on the table, creates a new table, transfers the old table data to the new, drops the old table, and renames the new table to the old. Indexes, triggers, and views that reference deleted columns are not recreated. An attempt is made to recreate the others including any modifications for renamed columns.

    Creating a new table: Creates a new table and transfers the table data to the new. Triggers are not created on the new table. Indexes and views that reference deleted columns are not recreated. An attempt is made to create the others on the new table.

    Making Other Kinds Of Table Schema Changes: https://www.sqlite.org/lang_altertable.html

    Parameters

    Returns void

  • Copy the table

    Parameters

    • db: GeoPackageConnection

      connection

    • tableName: string

      table name

    • newTableName: string

      new table name

    • transferContent: boolean = true

      transfer row content to the new table

    Returns void

  • Rename a column

    Parameters

    • db: GeoPackageConnection

      connection

    • tableName: string

      table name

    • columnName: string

      column name

    • newColumnName: string

      new column name

    Returns void

  • Create the rename column SQL

    Returns

    rename table SQL

    Parameters

    • tableName: string

      table name

    • columnName: string

      column name

    • newColumnName: string

      new column name

    Returns string

  • Create the Rename table SQL

    Returns

    rename table SQL

    Parameters

    • tableName: string

      table name

    • newTableName: string

      new table name

    Returns string

Generated using TypeDoc