Class UserTable<TColumn>Abstract

UserTable models optional user data tables in a [GeoPackage]GeoPackage.

Param

table name

Param

user columns

Param

required columns

Type Parameters

Hierarchy

Constructors

Properties

columns: UserColumns<TColumn>

Columns

constraints: Constraints = ...

Constraints

contents: Contents

Foreign key to Contents

DEFAULT_AUTOINCREMENT: boolean = true

Default id autoincrement setting

DEFAULT_PK_NOT_NULL: boolean = true

Default primary key not null setting

Methods

  • Add a new column

    Parameters

    • column: TColumn

      new column

    Returns void

  • Alter a column

    Parameters

    • column: TColumn

      altered column

    Returns void

  • Create user columns for a subset of table columns

    Returns

    user columns

    Parameters

    • columnNames: string[]

      column names

    Returns UserColumns<TColumn>

  • Drop a column

    Parameters

    • column: TColumn

      column to drop

    Returns void

  • Drop a column

    Parameters

    • index: number

      column index

    Returns void

  • Drop a column

    Parameters

    • columnName: string

      column name

    Returns void

  • Get the column of the column name

    Returns

    column

    Parameters

    • columnName: string

      column name

    Returns TColumn

  • Get the column at the index

    Returns

    column

    Parameters

    • index: number

      column index

    Returns TColumn

  • Get the column index of the column name

    Returns

    column index

    Parameters

    • columnName: string

      column name

    Returns number

  • Get the column name at the index

    Returns

    column name

    Parameters

    • index: number

      column index

    Returns string

  • Get the array of column names

    Returns

    column names

    Returns string[]

  • Get the columns from the column names

    Returns

    columns

    Parameters

    • columnNames: string[]

      column names

    Returns TColumn[]

  • Get the contents data type from the contents or use the default

    Returns

    contents or default data type

    Parameters

    • defaultType: string

      default data type

    Returns string

  • Get the primary key column

    Returns

    primary key column

    Returns TColumn

  • Get the primary key column index

    Returns

    primary key column index

    Returns number

  • Get the primary key column name

    Returns

    primary key column name

    Returns string

  • Check if the table has the column

    Returns

    true if has the column

    Parameters

    • columnName: string

      column name

    Returns boolean

  • Check if has constraints

    Returns

    true if has constraints

    Returns boolean

  • Check if the table has a primary key column

    Returns

    true if has a primary key

    Returns boolean

  • Is the primary key modifiable

    Returns

    true if the primary key is modifiable

    Returns boolean

  • Is value validation against column types enabled

    Returns

    true if values are validated against column types

    Returns boolean

  • Rename a column

    Parameters

    • column: TColumn

      column

    • newColumnName: string

      new column name

    Returns void

  • Rename a column

    Parameters

    • index: number

      column index

    • newColumnName: string

      new column name

    Returns void

  • Rename a column

    Parameters

    • columnName: string

      column name

    • newColumnName: string

      new column name

    Returns void

  • Set if the primary key can be modified

    Parameters

    • pkModifiable: boolean

      primary key modifiable flag

    Returns void

  • Set the table name

    Parameters

    • tableName: string

      table name

    Returns void

  • Set if values should validated against column types

    Parameters

    • valueValidation: boolean

      value validation flag

    Returns void

Generated using TypeDoc