prorm API Reference
    Preparing search index...

    Class MEDIUMINT

    Hierarchy

    • AbstractIntegerType
      • MEDIUMINT
    Index
    • Create a MEDIUMINT data type

      Parameters

      • options: { length?: number; unsigned?: boolean; zerofill?: boolean } = {}

        Optional options object

      Returns MEDIUMINT

      // Simple MEDIUMINT
      DataTypes.MEDIUMINT()
      // MEDIUMINT with options
      DataTypes.MEDIUMINT({ unsigned: true })
      // Using chainable methods
      DataTypes.MEDIUMINT().UNSIGNED()
      DataTypes.MEDIUMINT().ZEROFILL()
    length?: number
    unsigned?: boolean
    zerofill?: boolean
    key: "MEDIUMINT" = ...
    • Compare this DataType with another DataType for equality

      Parameters

      Returns boolean

      true if the types are equal, false otherwise

    • Serialize a value for storage based on this DataType

      Parameters

      • value: unknown

        The value to serialize

      Returns unknown

      The serialized value

    • Set as unsigned

      Returns this

      DataTypes.INTEGER.UNSIGNED()
      DataTypes.BIGINT.UNSIGNED()
    • Set as zerofill

      Returns this

      DataTypes.INTEGER.ZEROFILL()
      DataTypes.INTEGER.UNSIGNED().ZEROFILL()
    • Generate SQL string with unsigned and zerofill options

      Parameters

      • baseType: string

      Returns string