Dexie backed generic hookable store

Hierarchy (view full)

Constructors

Properties

#private: any
cache: Map<string, RelayMetrics>
log: Debugger
name: string
onTable: Set<string>
prefixed: string | boolean

Methods

  • Type Parameters

    • T extends "change"

    Parameters

    • event: T
    • fn: ((...args) => void)
        • (...args): void
        • Parameters

          Returns void

    • Optional context: any

    Returns this

  • Loads a list of rows from disk cache

    Parameters

    • keys: string[]

      List of ids to load

    Returns Promise<string[]>

    Keys that do not exist on disk cache

  • Returns Promise<void>

  • Calls each of the listeners registered for a given event.

    Type Parameters

    • T extends "change"

    Parameters

    Returns boolean

  • Return an array listing the events for which the emitter has registered listeners.

    Returns "change"[]

  • Parameters

    • Optional key: string

    Returns Promise<undefined | RelayMetrics>

  • Parameters

    • fn: HookFn
    • key: undefined | string

    Returns (() => this)

      • (): this
      • Returns this

  • Parameters

    Returns string

  • Returns string[]

  • Return the number of listeners listening to a given event.

    Parameters

    • event: "change"

    Returns number

  • Return the listeners registered for a given event.

    Type Parameters

    • T extends "change"

    Parameters

    • event: T

    Returns ((...args) => void)[]

  • Type Parameters

    • T extends "change"

    Parameters

    • event: T
    • Optional fn: ((...args) => void)
        • (...args): void
        • Parameters

          Returns void

    • Optional context: any
    • Optional once: boolean

    Returns this

  • Add a listener for a given event.

    Type Parameters

    • T extends "change"

    Parameters

    • event: T
    • fn: ((...args) => void)
        • (...args): void
        • Parameters

          Returns void

    • Optional context: any

    Returns this

  • Add a one-time listener for a given event.

    Type Parameters

    • T extends "change"

    Parameters

    • event: T
    • fn: ((...args) => void)
        • (...args): void
        • Parameters

          Returns void

    • Optional context: any

    Returns this

  • Returns Promise<void>

  • Remove all listeners, or those of the specified event.

    Parameters

    • Optional event: "change"

    Returns this

  • Remove the listeners of a given event.

    Type Parameters

    • T extends "change"

    Parameters

    • event: T
    • Optional fn: ((...args) => void)
        • (...args): void
        • Parameters

          Returns void

    • Optional context: any
    • Optional once: boolean

    Returns this

  • Parameters

    Returns Promise<void>

  • Try to update an entry where created values exists

    Type Parameters

    • TCachedWithCreated extends RelayMetrics & {
          created: number;
          loaded: number;
      }

    Parameters

    Returns Promise<"new" | "updated" | "refresh" | "no_change">

Generated using TypeDoc