Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ColumnBuilder

Builder to specify the schema of a table column.

Hierarchy

Index

Constructors

constructor

Properties

Protected Optional defaultValue

defaultValue: EscapeValue

The default value of the column, if one should exist.

Protected dirty

dirty: boolean = false

True if the schema has been modified since created/loaded.

Protected existsInSchema

existsInSchema: boolean = false

True if this resource exists, in some form, in the schema.

Readonly name

name: string

Optional originalFromSchema

originalFromSchema: ColumnBuilder

If the resource exists in the schema, the unaltered values it has.

Readonly parent

parent: TableBuilder

Protected shouldBeNullable

shouldBeNullable: boolean = false

True if the column should allow NULL values.

Protected shouldBePrimary

shouldBePrimary: boolean = false

True if this is a primary key constraint.

Protected shouldBeUnique

shouldBeUnique: boolean = false

True if this column should contain distinct values.

Protected shouldDrop

shouldDrop: "yes" | "no" | "exists" = 'no'

Whether or not the schema item should be dropped.

  • exists - drop if exists

Protected Optional shouldRenameTo

shouldRenameTo: string

The name the schema item should have if renaming.

Protected shouldSkipIfExists

shouldSkipIfExists: boolean = false

If true, apply IF NOT EXISTS syntax.

Protected Optional targetLength

targetLength: number

The data length of this column, if set

Protected Optional targetType

targetType: FieldType

The data type of the column.

Methods

Protected cloneInstance

cloneTo

default

drop

dropIfExists

flagAsExistingInSchema

getDefaultValue

getLength

  • getLength(): Maybe<number>

getRename

  • getRename(): Maybe<string>

getType

ifNotExists

isDirty

  • isDirty(): boolean

isDropping

  • isDropping(): boolean

isDroppingIfExists

  • isDroppingIfExists(): boolean

isExisting

  • isExisting(): boolean

isNullable

  • isNullable(): boolean

isPrimary

  • isPrimary(): boolean

isSkippedIfExisting

  • isSkippedIfExisting(): boolean

isUnique

  • isUnique(): boolean

length

nullable

pipe

primary

rename

required

type

unique

Extollo Logo

extollo (v. latin) - to lift up, to elevate

Extollo is a free & libre application framework in TypeScript.