prorm API Reference
    Preparing search index...

    Base class for all data types

    Hierarchy (View Summary)

    Index
    • Create a REAL data type

      Parameters

      • OptionalprecisionOrOptions: number | { precision?: number; decimals?: number; unsigned?: boolean }

        Either a precision number or an options object

      Returns REAL

      // Simple REAL
      DataTypes.REAL()
      // REAL with precision (MySQL/MariaDB)
      DataTypes.REAL(10)
      // REAL with options
      DataTypes.REAL({ precision: 10, decimals: 2, unsigned: true })
    key: "REAL" = ...
    precision?: number

    Precision (total number of digits) - MySQL/MariaDB specific

    decimals?: number

    Number of decimal places

    unsigned?: boolean

    Whether the value is unsigned (MySQL/MariaDB only)

    • Serialize a value for storage based on this DataType

      Parameters

      • value: unknown

        The value to serialize

      Returns unknown

      The serialized value