Skip to main content
Version: 4.4

Class: EnumArrayType<T>#

core.EnumArrayType

Type parameters#

NameTypeDefault
Tstring | numberstring

Hierarchy#

Constructors#

constructor#

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

Type parameters:#

NameTypeDefault
Tstring | numberstring

Parameters:#

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

Returns: EnumArrayType<T>

Inherited from: ArrayType

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

Methods#

compareAsType#

compareAsType(): string

Returns: string

Inherited from: ArrayType

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


convertToDatabaseValue#

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

Parameters:#

NameType
valuenull | T[]
platformPlatform
fromQuery?boolean

Returns: null | string

Overrides: ArrayType

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


convertToJSValue#

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

Parameters:#

NameType
valuenull | string | T[]
platformPlatform

Returns: null | T[]

Inherited from: ArrayType

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


getColumnType#

getColumnType(prop: EntityProperty<any>, platform: Platform): string

Parameters:#

NameType
propEntityProperty<any>
platformPlatform

Returns: string

Inherited from: ArrayType

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


toJSON#

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

Parameters:#

NameType
valueT[]

Returns: T[]

Inherited from: ArrayType

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


getType#

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

Type parameters:#

Name
JSType
DBType

Parameters:#

NameType
clsConstructor<Type<JSType, DBType>>

Returns: Type<JSType, DBType>

Inherited from: ArrayType

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

Last updated on by renovate[bot]