Skip to main content
Version: 5.2

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

Index

Constructors

constructor

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

convertToDatabaseValue

  • convertToDatabaseValue(value: undefined | null | string | bigint): undefined | null | string
  • Converts a value from its JS representation to its database representation of this type.


    Parameters

    • value: undefined | null | string | bigint

    Returns undefined | null | string

optionalconvertToDatabaseValueSQL

  • convertToDatabaseValueSQL(key: string, platform: Platform): string
  • Converts a value from its JS representation to its database representation of this type.


    Parameters

    Returns string

convertToJSValue

  • convertToJSValue(value: undefined | null | string | bigint): undefined | null | string
  • Converts a value from its database representation to its JS representation of this type.


    Parameters

    • value: undefined | null | string | bigint

    Returns undefined | null | string

optionalconvertToJSValueSQL

  • convertToJSValueSQL(key: string, platform: Platform): string
  • Modifies the SQL expression (identifier, parameter) to convert to a JS value.


    Parameters

    Returns string

getColumnType

  • Gets the SQL declaration snippet for a field of this type.


    Parameters

    Returns string

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

    • value: undefined | null | string | bigint
    • platform: Platform

    Returns undefined | null | string | bigint

staticgetType

  • Type parameters

    • JSType
    • DBType = JSType

    Parameters

    Returns Type<JSType, DBType>

staticisMappedType

  • isMappedType(data: any): data is Type<any, any>
  • Checks whether the argument is instance of Type.


    Parameters

    • data: any

    Returns data is Type<any, any>