A UserColumn is meta-data about a single column from a UserTable.

Hierarchy

Implements

Constructors

Properties

AUTOINCREMENT_CONSTRAINT_ORDER: 4 = 4

Autoincrement Constraint Order

DEFAULT_VALUE_CONSTRAINT_ORDER: 2 = 2

Default Value Constraint Order

NOT_NULL_CONSTRAINT_ORDER: 1 = 1

Not Null Constraint Order

NO_INDEX: -1 = -1

User Column index value

PRIMARY_KEY_CONSTRAINT_ORDER: 3 = 3

Primary Key Constraint Order

UNIQUE_CONSTRAINT_ORDER: 5 = 5

Unique Constraint Order

Methods

  • Add a constraint

    Parameters

    • constraint: string

      constraint

    Returns void

  • Add the default constraints that are enabled (not null, default value, primary key) from the column properties

    Returns void

  • Add a default value constraint

    Parameters

    • defaultValue: any

      default value

    Returns void

  • Check if has constraints

    Returns

    true if has constraints

    Returns boolean

  • Determine if the column has a default value

    Returns

    true if has default value

    Returns boolean

  • Check if the column has a valid index

    Returns

    true if has a valid index

    Returns boolean

  • Determine if the column has a max value

    Returns

    true if has max value

    Returns boolean

  • Get the autoincrement flag

    Returns

    autoincrement flag

    Returns boolean

  • Determine if this column is named the provided name

    Returns

    true if named the provided name

    Parameters

    • name: string

      column name

    Returns boolean

  • Set the autoincrement flag

    Parameters

    • autoincrement: boolean

      autoincrement flag

    Returns void

  • Set the default value

    Parameters

    • defaultValue: any

      default value

    Returns void

  • Set the not null flag

    Parameters

    • notNull: boolean

      not null flag

    Returns void

  • Set the primary key flag

    Parameters

    • primaryKey: boolean

      primary key flag

    Returns void

  • Set the database type

    Parameters

    • type: string

      database type

    Returns void

  • Set the unique flag

    Parameters

    • unique: boolean

      unique flag

    Returns void

Generated using TypeDoc