Version: 4.3

Class: ArrayType<T>

Type parameters

NameTypeDefault
Tstring | numberstring

Hierarchy

Constructors

constructor

+ new ArrayType(hydrate?: (i: string) => T): ArrayType

Defined in packages/core/src/types/ArrayType.ts:7

Parameters:

NameTypeDefault value
hydrate(i: string) => Ti => i as T

Returns: ArrayType

Properties

hydrate

Private Readonly hydrate: (i: string) => T

Defined in packages/core/src/types/ArrayType.ts:9

Methods

compareAsType

compareAsType(): string

Overrides Type.compareAsType

Defined in packages/core/src/types/ArrayType.ts:41

Returns: string


convertToDatabaseValue

convertToDatabaseValue(value: T[] | null, platform: Platform, fromQuery?: boolean): string | null

Overrides Type.convertToDatabaseValue

Defined in packages/core/src/types/ArrayType.ts:13

Parameters:

NameType
valueT[] | null
platformPlatform
fromQuery?boolean

Returns: string | null


convertToJSValue

convertToJSValue(value: T[] | string | null, platform: Platform): T[] | null

Overrides Type.convertToJSValue

Defined in packages/core/src/types/ArrayType.ts:29

Parameters:

NameType
valueT[] | string | null
platformPlatform

Returns: T[] | null


getColumnType

getColumnType(prop: EntityProperty, platform: Platform): string

Overrides Type.getColumnType

Defined in packages/core/src/types/ArrayType.ts:49

Parameters:

NameType
propEntityProperty
platformPlatform

Returns: string


toJSON

toJSON(value: T[]): T[]

Overrides Type.toJSON

Defined in packages/core/src/types/ArrayType.ts:45

Parameters:

NameType
valueT[]

Returns: T[]


getType

StaticgetType<JSType, DBType>(cls: Constructor<Type<JSType, DBType>>): Type<JSType, DBType>

Inherited from Type.getType

Defined in packages/core/src/types/Type.ts:46

Type parameters:

Name
JSType
DBType

Parameters:

NameType
clsConstructor<Type<JSType, DBType>>

Returns: Type<JSType, DBType>

Last updated on by Martin Adámek