Version: 4.3

Class: BigIntType

This type will automatically convert string values returned from the database to native JS bigints.

Hierarchy

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

    BigIntType

Methods

compareAsType

compareAsType(): string

Inherited from Type.compareAsType

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

How should the raw database values be compared? Used in EntityComparator. Possible values: string | number | boolean | date | any | buffer | array

Returns: string


convertToDatabaseValue

convertToDatabaseValue(value: string | bigint | null | undefined): string | null | undefined

Overrides Type.convertToDatabaseValue

Defined in packages/core/src/types/BigIntType.ts:10

Parameters:

NameType
valuestring | bigint | null | undefined

Returns: string | null | undefined


convertToJSValue

convertToJSValue(value: string | bigint | null | undefined): string | null | undefined

Overrides Type.convertToJSValue

Defined in packages/core/src/types/BigIntType.ts:18

Parameters:

NameType
valuestring | bigint | null | undefined

Returns: string | null | undefined


getColumnType

getColumnType(prop: EntityProperty, platform: Platform): string

Overrides Type.getColumnType

Defined in packages/core/src/types/BigIntType.ts:26

Parameters:

NameType
propEntityProperty
platformPlatform

Returns: string


toJSON

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

Inherited from Type.toJSON

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

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

Parameters:

NameType
valuestring | bigint | null | undefined
platformPlatform

Returns: string | bigint | null | undefined | string | null | undefined


getType

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

Inherited from Type.getType

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

Type parameters:

Name
JSType
DBType

Parameters:

NameType
clsConstructor<Type<JSType, DBType>>

Returns: Type<JSType, DBType>

Last updated on by Martin Adámek