Skip to main content
Version: 4.5

Class: ArrayType<T>#

core.ArrayType

Type parameters#

NameTypeDefault
Tstring | numberstring

Hierarchy#

Constructors#

constructor#

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

Type parameters:#

NameTypeDefault
Tstring | numberstring

Parameters:#

NameType
hydrate(i: string) => T

Returns: ArrayType<T>

Overrides: Type

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

Methods#

compareAsType#

compareAsType(): string

Returns: string

Overrides: Type

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: Type

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


convertToDatabaseValueSQL#

OptionalconvertToDatabaseValueSQL(key: string, platform: Platform): string

Converts a value from its JS representation to its database representation of this type.

Parameters:#

NameType
keystring
platformPlatform

Returns: string

Inherited from: Type

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


convertToJSValue#

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

Parameters:#

NameType
valuenull | string | T[]
platformPlatform

Returns: null | T[]

Overrides: Type

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


convertToJSValueSQL#

OptionalconvertToJSValueSQL(key: string, platform: Platform): string

Modifies the SQL expression (identifier, parameter) to convert to a JS value.

Parameters:#

NameType
keystring
platformPlatform

Returns: string

Inherited from: Type

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


getColumnType#

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

Parameters:#

NameType
propEntityProperty<any>
platformPlatform

Returns: string

Overrides: Type

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


toJSON#

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

Parameters:#

NameType
valueT[]

Returns: T[]

Overrides: Type

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: Type

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

Last updated on by Renovate Bot