prorm API Reference
    Preparing search index...

    Base class for all data types

    Hierarchy (View Summary)

    Index
    • Create a SET data type

      Parameters

      • ...values: (string | string[])[]

        Either an array of values or individual string values

      Returns SET

      // Array of values
      DataTypes.SET(['red', 'green', 'blue'])
      // Individual values
      DataTypes.SET('red', 'green', 'blue')
    key: "SET" = ...
    values: string[]
    • Serialize a value for storage based on this DataType

      Parameters

      • value: unknown

        The value to serialize

      Returns unknown

      The serialized value

    • Validate if a value is valid for this SET

      Parameters

      • value: string

      Returns boolean