prorm API Reference
    Preparing search index...

    Class SMALLINT

    Hierarchy

    • AbstractIntegerType
      • SMALLINT
    Index
    • Create a SMALLINT data type

      Parameters

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

        Optional options object

      Returns SMALLINT

      // Simple SMALLINT
      DataTypes.SMALLINT()
      // SMALLINT with options
      DataTypes.SMALLINT({ unsigned: true })
      // Using chainable methods
      DataTypes.SMALLINT().UNSIGNED()
      DataTypes.SMALLINT().ZEROFILL()
    length?: number
    unsigned?: boolean
    zerofill?: boolean
    key: "SMALLINT" = ...
    • 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