Options
All
  • Public
  • Public/Protected
  • All
Menu

Column options specific to all column types.

Hierarchy

  • ColumnCommonOptions

Index

Properties

Optional array

array: undefined | true | false

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: undefined | string

Column comment. Not supported by all database types.

Optional default

default: any

Default database value.

Optional generated

generated: undefined | true | false

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

Optional name

name: undefined | string

Column name in the database.

Optional nullable

nullable: undefined | true | false

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

Optional onUpdate

onUpdate: undefined | string

ON UPDATE trigger. Works only for MySQL.

Optional primary

primary: undefined | true | false

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

Optional select

select: undefined | true | false

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

Optional transformer

transformer: ValueTransformer

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

Optional unique

unique: undefined | true | false

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

Generated using TypeDoc