Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ColumnCommonOptions

Column options specific to all column types.

Hierarchy

Index

Properties

Optional array

array: boolean

Indicates if this column is an array. Can be simply set to true or array length can be specified. Supported only by postgres.

Optional comment

comment: string

Column comment. Not supported by all database types.

Optional default

default: any

Default database value. Note that default value is not supported when column type is 'json' of mysql.

Optional generated

generated: boolean | "increment" | "uuid" | "rowid"

Specifies if this column will use auto increment (sequence, generated identity, rowid). Note that in some databases only one column in entity can be marked as generated, and it must be a primary column.

Optional name

name: string

Column name in the database.

Optional nullable

nullable: boolean

Indicates if column's value can be set to NULL.

Optional onUpdate

onUpdate: string

ON UPDATE trigger. Works only for MySQL.

Optional primary

primary: boolean

Indicates if this column is a primary key. Same can be achieved when @PrimaryColumn decorator is used.

Optional select

select: boolean

Indicates if column is always selected by QueryBuilder and find operations. Default value is "true".

Optional transformer

Specifies a value transformer that is to be used to (un)marshal this column when reading or writing to the database.

Optional unique

unique: boolean

Specifies if column's value must be unique or not.

Generated using TypeDoc