Member Junction
    Preparing search index...

    Maps data types from one database platform to another. Each dialect provides its own DataTypeMap implementation.

    interface DataTypeMap {
        MapType(
            sourceType: string,
            sourceLength?: number,
            sourcePrecision?: number,
            sourceScale?: number,
        ): MappedType;
        MapTypeToString(
            sourceType: string,
            sourceLength?: number,
            sourcePrecision?: number,
            sourceScale?: number,
        ): string;
    }
    Index

    Methods

    • Maps a source database type to the target platform type.

      Parameters

      • sourceType: string

        The source database type name (case-insensitive)

      • OptionalsourceLength: number

        Optional length from the source type definition

      • OptionalsourcePrecision: number

        Optional precision from the source type definition

      • OptionalsourceScale: number

        Optional scale from the source type definition

      Returns MappedType

      The mapped type for the target platform

    • Returns the full type string with length/precision/scale as needed. E.g., "VARCHAR(255)" or "NUMERIC(10,2)" or "UUID"

      Parameters

      • sourceType: string
      • OptionalsourceLength: number
      • OptionalsourcePrecision: number
      • OptionalsourceScale: number

      Returns string