Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Column

Creates a column class for a table.

Hierarchy

  • Column

Implements

Index

Constructors

constructor

Properties

Optional _default

_default: any

The default cached value.

Optional db

The database this column belongs to.

Optional default

default: any

The default value for this table.

name

name: null | string

The name of the table.

Optional notNull

notNull: boolean

Whether this column was be nullable in the database.

Optional primary

primary: boolean

Whether this column is primary key to table.

type

type: null | DataTypes

The type data for this column

Accessors

creator

  • get creator(): string

defaultValue

  • get defaultValue(): any

Methods

attachDatabase

create

getRealType

hasDatabase

setDefault

  • setDefault(value: any): Column

setName

  • setName(str: string): Column

setNotNull

  • setNotNull(bool: boolean): Column

setPrimary

  • setPrimary(bool: boolean): Column

setType

Static transform

Static transformValue

  • transformValue(data: any, type: DataTypes): any

Generated using TypeDoc