#
Class: JsonTypecore.JsonType
#
HierarchyType<unknown, string | null>
↳ JsonType
#
Constructors#
constructor+ new JsonType(): JsonType
Returns: JsonType
Inherited from: Type
#
Methods#
compareAsTypeâ–¸ compareAsType(): string
How should the raw database values be compared? Used in EntityComparator
.
Possible values: string | number | boolean | date | any | buffer | array
Returns: string
Inherited from: Type
Defined in: packages/core/src/types/Type.ts:26
#
convertToDatabaseValueâ–¸ convertToDatabaseValue(value
: unknown, platform
: Platform): null | string
#
Parameters:Name | Type |
---|---|
value | unknown |
platform | Platform |
Returns: null | string
Overrides: Type
Defined in: packages/core/src/types/JsonType.ts:8
#
convertToJSValueâ–¸ convertToJSValue(value
: unknown, platform
: Platform): unknown
#
Parameters:Name | Type |
---|---|
value | unknown |
platform | Platform |
Returns: unknown
Overrides: Type
Defined in: packages/core/src/types/JsonType.ts:16
#
getColumnTypeâ–¸ getColumnType(prop
: EntityProperty<any>, platform
: Platform): string
#
Parameters:Name | Type |
---|---|
prop | EntityProperty<any> |
platform | Platform |
Returns: string
Overrides: Type
Defined in: packages/core/src/types/JsonType.ts:24
#
toJSONâ–¸ toJSON(value
: unknown, platform
: Platform): unknown
Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value.
#
Parameters:Name | Type |
---|---|
value | unknown |
platform | Platform |
Returns: unknown
Inherited from: Type
Defined in: packages/core/src/types/Type.ts:34
#
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: Type
Defined in: packages/core/src/types/Type.ts:46