Skip to main content
Module

x/typeorm/src/index.ts>Column

Forked from https://github.com/typeorm/typeorm
Latest
function Column
import { Column } from "https://deno.land/x/typeorm@v0.2.23-rc10/src/index.ts";

Column decorator is used to mark a specific class property as a table column. Only properties decorated with this decorator will be persisted to the database when entity be saved.

Parameters

options: ColumnOptions

Returns

Function

Column decorator is used to mark a specific class property as a table column. Only properties decorated with this decorator will be persisted to the database when entity be saved.

Parameters

type: SimpleColumnType
optional
options: ColumnCommonOptions

Returns

Function

Column decorator is used to mark a specific class property as a table column. Only properties decorated with this decorator will be persisted to the database when entity be saved.

Parameters

type: SpatialColumnType
optional
options: ColumnCommonOptions & SpatialColumnOptions

Returns

Function

Column decorator is used to mark a specific class property as a table column. Only properties decorated with this decorator will be persisted to the database when entity be saved.

Parameters

type: WithLengthColumnType
optional
options: ColumnCommonOptions & ColumnWithLengthOptions

Returns

Function

Column decorator is used to mark a specific class property as a table column. Only properties decorated with this decorator will be persisted to the database when entity be saved.

Parameters

type: WithWidthColumnType
optional
options: ColumnCommonOptions & ColumnWithWidthOptions

Returns

Function

Column decorator is used to mark a specific class property as a table column. Only properties decorated with this decorator will be persisted to the database when entity be saved.

Parameters

type: WithPrecisionColumnType
optional
options: ColumnCommonOptions & ColumnNumericOptions

Returns

Function

Column decorator is used to mark a specific class property as a table column. Only properties decorated with this decorator will be persisted to the database when entity be saved.

Parameters

type: "enum"
optional
options: ColumnCommonOptions & ColumnEnumOptions

Returns

Function

Column decorator is used to mark a specific class property as a table column. Only properties decorated with this decorator will be persisted to the database when entity be saved.

Parameters

type: "simple-enum"
optional
options: ColumnCommonOptions & ColumnEnumOptions

Returns

Function

Column decorator is used to mark a specific class property as a table column. Only properties decorated with this decorator will be persisted to the database when entity be saved.

Parameters

type: "set"
optional
options: ColumnCommonOptions & ColumnEnumOptions

Returns

Function

Column decorator is used to mark a specific class property as a table column. Only properties decorated with this decorator will be persisted to the database when entity be saved.

Parameters

type: "hstore"
optional
options: ColumnCommonOptions & ColumnHstoreOptions

Returns

Function

Column decorator is used to mark a specific class property as a table column. Only properties decorated with this decorator will be persisted to the database when entity be saved.

Property in entity can be marked as Embedded, and on persist all columns from the embedded are mapped to the single table of the entity where Embedded is used. And on hydration all columns which supposed to be in the embedded will be mapped to it from the single table.

Parameters

type: (type?: any) => Function
optional
options: ColumnEmbeddedOptions

Returns

Function