prorm API Reference
    Preparing search index...

    Base class for all data types

    Hierarchy (View Summary)

    Index
    • Create a STRING data type

      Parameters

      • Optionallength: number

        Optional length (1-65535). If not provided, defaults to TEXT

      • binary: boolean = false

        Whether to use BINARY collation

      Returns STRING

      // STRING with length (VARCHAR)
      DataTypes.STRING(100) // VARCHAR(100)
      // STRING without length (TEXT)
      DataTypes.STRING // TEXT
    key: "STRING" = ...
    length?: number
    binary?: boolean
    • Serialize a value for storage based on this DataType

      Parameters

      • value: unknown

        The value to serialize

      Returns unknown

      The serialized value