@d34d/w-orm - v0.6.0
    Preparing search index...

    Class BetweenFilter<T>

    Type Parameters

    • T
    Index
    • A filter that checks if a value is between two values.

      Type Parameters

      • T

        The type of the value to filter

      Parameters

      • lower: T | null

        The lower bound of the filter

      • upper: T | null

        The upper bound of the filter

      • lowerOpen: boolean = false

        Whether the lower bound is open

      • upperOpen: boolean = false

        Whether the upper bound is open

      Returns BetweenFilter<T>

      // Get all users with an age between 20 and 30
      const query = User.filter({ age: new BetweenFilter(20, 30) })
      // Get all users with an age between 20 and 30, excluding 20 and 30
      const query = User.filter({ age: new BetweenFilter(20, 30, true, true) })
    lower: T | null

    The lower bound of the filter

    lowerOpen: boolean = false

    Whether the lower bound is open

    upper: T | null

    The upper bound of the filter

    upperOpen: boolean = false

    Whether the upper bound is open

    maxKey: never[][] = ...

    The "maximum" key for IDB

    minKey: number = -Infinity

    The minimum key for IDB

    • Checks if a value fits the filter.

      Parameters

      • value: T

        The value to check

      Returns boolean

      • Whether the value fits the filter
    • Returns the IDBKeyRange for this filter.

      Returns IDBKeyRange

      • The IDBKeyRange for this filter