prorm API Reference
    Preparing search index...

    Base class for all data types

    Hierarchy (View Summary)

    Index
    • Create a FLOAT data type

      Parameters

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

        Either a precision number or an options object

      Returns FLOAT

      // Simple FLOAT
      DataTypes.FLOAT()
      // FLOAT with precision
      DataTypes.FLOAT(8)
      // FLOAT with options
      DataTypes.FLOAT({ precision: 8, decimals: 2, unsigned: true })
    key: "FLOAT" = ...
    precision?: number

    Precision (total number of digits)

    decimals?: number

    Number of decimal places

    unsigned?: boolean

    Whether the value is unsigned

    • Serialize a value for storage based on this DataType

      Parameters

      • value: unknown

        The value to serialize

      Returns unknown

      The serialized value