Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • EntitySchemaColumnOptions

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 asExpression

asExpression: undefined | string

Generated column expression. Supports only in MySQL.

Optional charset

charset: undefined | string

Defines a column character set. Not supported by all database types.

Optional collation

collation: undefined | string

Defines a column collation.

Optional columnDefinition

columnDefinition: undefined | string

Extra column definition. Should be used only in emergency situations. Note that if you'll use this property auto schema generation will not work properly anymore. Avoid using it.

Optional comment

comment: undefined | string

Column comment.

Optional createDate

createDate: undefined | true | false

Indicates if this column is a created date column.

Optional default

default: any

Default database value.

Optional enum

enum: any[] | Object

Array of possible enumerated values.

Optional generated

generated: true | "increment" | "uuid"

Specifies if this column will use AUTO_INCREMENT or not (e.g. generated number).

Optional generatedType

generatedType: "VIRTUAL" | "STORED"

Generated column type. Supports only in MySQL.

Optional hstoreType

hstoreType: "object" | "string"

Return type of HSTORE column. Returns value as string or as object.

Optional length

length: string | number

Column type's length. For example type = "string" and length = 100 means that ORM will create a column with type varchar(100).

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 objectId

objectId: undefined | true | false

Indicates if this column is of type ObjectID

Optional onUpdate

onUpdate: undefined | string

ON UPDATE trigger. Works only for MySQL.

Optional precision

precision: undefined | number

The precision for a decimal (exact numeric) column (applies only for decimal column), which is the maximum number of digits that are stored for the values.

Optional primary

primary: undefined | true | false

Indicates if this column is a primary column.

Optional readonly

readonly: undefined | true | false

Indicates if column value is not updated by "save" operation. It means you'll be able to write this value only when you first time insert the object. Default value is "false".

Optional scale

scale: undefined | number

The scale for a decimal (exact numeric) column (applies only for decimal column), which represents the number of digits to the right of the decimal point and must not be greater than precision.

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 treeChildrenCount

treeChildrenCount: undefined | true | false

Indicates if this column is a treeChildrenCount column.

Optional treeLevel

treeLevel: undefined | true | false

Indicates if this column is a treeLevel column.

type

Column type. Must be one of the value from the ColumnTypes class.

Optional unique

unique: undefined | true | false

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

Optional unsigned

unsigned: undefined | true | false

Puts UNSIGNED attribute on to numeric column. Works only for MySQL.

Optional updateDate

updateDate: undefined | true | false

Indicates if this column is an update date column.

Optional version

version: undefined | true | false

Indicates if this column is a version column.

Optional width

width: undefined | number

Column type's display width. Used only on some column types in MySQL. For example, INT(4) specifies an INT with a display width of four digits.

Optional zerofill

zerofill: undefined | true | false

Puts ZEROFILL attribute on to numeric column. Works only for MySQL. If you specify ZEROFILL for a numeric column, MySQL automatically adds the UNSIGNED attribute to the column

Generated using TypeDoc