Skip to main content
Version: Next

Class: TextType

core.TextType

Hierarchy#

  • Type<string | null | undefined, string | null | undefined>

    TextType

Constructors#

constructor#

new TextType()

Inherited from#

Type.constructor

Methods#

compareAsType#

compareAsType(): string

Returns#

string

Overrides#

Type.compareAsType

Defined in#

packages/core/src/types/TextType.ts:11


convertToDatabaseValue#

convertToDatabaseValue(value, platform, fromQuery?): undefined | null | string

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

Parameters#

NameType
valueundefined | null | string
platformPlatform
fromQuery?boolean

Returns#

undefined | null | string

Inherited from#

Type.convertToDatabaseValue

Defined in#

packages/core/src/types/Type.ts:11


convertToDatabaseValueSQL#

Optional convertToDatabaseValueSQL(key, 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.convertToDatabaseValueSQL

Defined in#

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


convertToJSValue#

convertToJSValue(value, platform): undefined | null | string

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

Parameters#

NameType
valueundefined | null | string
platformPlatform

Returns#

undefined | null | string

Inherited from#

Type.convertToJSValue

Defined in#

packages/core/src/types/Type.ts:18


convertToJSValueSQL#

Optional convertToJSValueSQL(key, platform): string

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

Parameters#

NameType
keystring
platformPlatform

Returns#

string

Inherited from#

Type.convertToJSValueSQL

Defined in#

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


getColumnType#

getColumnType(prop, platform): string

Parameters#

NameType
propEntityProperty<any>
platformPlatform

Returns#

string

Overrides#

Type.getColumnType

Defined in#

packages/core/src/types/TextType.ts:7


toJSON#

toJSON(value, platform): undefined | null | string

Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value.

Parameters#

NameType
valueundefined | null | string
platformPlatform

Returns#

undefined | null | string

Inherited from#

Type.toJSON

Defined in#

packages/core/src/types/Type.ts:44


getType#

Static getType<JSType, DBType>(cls): Type<JSType, DBType>

Type parameters#

NameType
JSTypeJSType
DBTypeDBType = JSType

Parameters#

NameType
clsConstructor<Type<JSType, DBType>>

Returns#

Type<JSType, DBType>

Inherited from#

Type.getType

Defined in#

packages/core/src/types/Type.ts:55