Skip to main content
Version: 4.5

core.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

Constructors#

constructor#

+ new BigIntType(): BigIntType

Returns: BigIntType

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


convertToDatabaseValue#

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

Parameters:#

NameType
valueundefined | null | string | bigint

Returns: undefined | null | string

Overrides: Type

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


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: undefined | null | string | bigint): undefined | null | string

Parameters:#

NameType
valueundefined | null | string | bigint

Returns: undefined | null | string

Overrides: Type

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


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/BigIntType.ts:26


toJSON#

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

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 | bigint
platformPlatform

Returns: undefined | null | string | bigint

Inherited from: Type

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


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 dependabot[bot]