#
Class: EnumArrayType<T>core.EnumArrayType
#
Type parametersName | Type | Default |
---|---|---|
T | string | number | string |
#
HierarchyArrayType<T>
↳ EnumArrayType
#
Constructors#
constructor+ new EnumArrayType<T>(owner
: string, items?
: T[], hydrate?
: (i
: string) => T): EnumArrayType<T>
#
Type parameters:Name | Type | Default |
---|---|---|
T | string | number | string |
#
Parameters:Name | Type |
---|---|
owner | string |
items? | T[] |
hydrate | (i : string) => T |
Returns: EnumArrayType<T>
Overrides: 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:Name | Type |
---|---|
value | null | T[] |
platform | Platform |
fromQuery? | boolean |
Returns: null | string
Overrides: ArrayType
Defined in: packages/core/src/types/EnumArrayType.ts:22
#
convertToDatabaseValueSQLâ–¸ Optional
convertToDatabaseValueSQL(key
: string, platform
: Platform): string
Converts a value from its JS representation to its database representation of this type.
#
Parameters:Name | Type |
---|---|
key | string |
platform | Platform |
Returns: string
Inherited from: ArrayType
Defined in: packages/core/src/types/Type.ts:25
#
convertToJSValueâ–¸ convertToJSValue(value
: null | string | T[], platform
: Platform): null | T[]
#
Parameters:Name | Type |
---|---|
value | null | string | T[] |
platform | Platform |
Returns: null | T[]
Inherited from: ArrayType
Defined in: packages/core/src/types/ArrayType.ts:29
#
convertToJSValueSQLâ–¸ Optional
convertToJSValueSQL(key
: string, platform
: Platform): string
Modifies the SQL expression (identifier, parameter) to convert to a JS value.
#
Parameters:Name | Type |
---|---|
key | string |
platform | Platform |
Returns: string
Inherited from: ArrayType
Defined in: packages/core/src/types/Type.ts:30
#
getColumnTypeâ–¸ getColumnType(prop
: EntityProperty<any>, platform
: Platform): string
#
Parameters:Name | Type |
---|---|
prop | EntityProperty<any> |
platform | Platform |
Returns: string
Inherited from: ArrayType
Defined in: packages/core/src/types/ArrayType.ts:49
#
toJSONâ–¸ toJSON(value
: T[]): T[]
#
Parameters:Name | Type |
---|---|
value | T[] |
Returns: T[]
Inherited from: ArrayType
Defined in: packages/core/src/types/ArrayType.ts:45
#
getTypeâ–¸ Static
getType<JSType, DBType>(cls
: Constructor<Type<JSType, DBType>>): Type<JSType, DBType>
#
Type parameters:Name |
---|
JSType |
DBType |
#
Parameters:Name | Type |
---|---|
cls | Constructor<Type<JSType, DBType>> |
Returns: Type<JSType, DBType>
Inherited from: ArrayType
Defined in: packages/core/src/types/Type.ts:56