Version: 4.3

Class: EnumArrayType<T>

Type parameters

NameTypeDefault
Tstring | numberstring

Hierarchy

Constructors

constructor

+ new EnumArrayType(owner: string, items?: T[], hydrate?: (i: string) => T): EnumArrayType

Overrides ArrayType.constructor

Defined in packages/core/src/types/EnumArrayType.ts:14

Parameters:

NameTypeDefault value
ownerstring-
items?T[]-
hydrate(i: string) => Ti => i as T

Returns: EnumArrayType

Properties

items

Private Optional Readonly items: T[]

Defined in packages/core/src/types/EnumArrayType.ts:17


owner

Private Readonly owner: string

Defined in packages/core/src/types/EnumArrayType.ts:16

Methods

compareAsType

compareAsType(): string

Inherited from ArrayType.compareAsType

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 ArrayType.convertToDatabaseValue

Defined in packages/core/src/types/EnumArrayType.ts:22

Parameters:

NameType
valueT[] | null
platformPlatform
fromQuery?boolean

Returns: string | null


convertToJSValue

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

Inherited from ArrayType.convertToJSValue

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

Inherited from ArrayType.getColumnType

Overrides Type.getColumnType

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

Parameters:

NameType
propEntityProperty
platformPlatform

Returns: string


toJSON

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

Inherited from ArrayType.toJSON

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