Skip to content
@drupflare/spool v1.0.0 GitHub
    Preparing search index...

    Class TableIndex

    Lazy per-field indexes over one table. Each index is built on first use and is only an optimisation: a plan gives the same answer with or without one.

    Index
    • get entries(): number

      how many entries the built indexes hold, across every field

      Returns number

    • Parameters

      • keys: readonly string[]
      • rows: ReadonlyMap<string, Plain>

      Returns TableIndex

    • the keys whose field equals one of values, ascending

      Parameters

      • field: string
      • values: readonly (string | number)[]

      Returns string[]

    • the keys whose field starts with text, ascending

      Parameters

      • field: string
      • fold: "ascii" | undefined
      • text: string

      Returns string[]

    • the keys whose field is at least or at most value, within the value's type, ascending

      Parameters

      • field: string
      • op: "gte" | "lte"
      • value: string | number

      Returns string[]