Class BaseStore<K, V>Abstract

Abstract interface for a key-value store.

Type Parameters

  • K

  • V

Hierarchy

Implements

Constructors

Methods

  • Abstract method to delete multiple keys.

    Parameters

    • keys: K[]

      An array of keys to delete.

    Returns Promise<void>

    • A Promise that resolves when the operation is complete.
  • Abstract method to get multiple values for a set of keys.

    Parameters

    • keys: K[]

      An array of keys.

    Returns Promise<(undefined | V)[]>

    • A Promise that resolves with array of values or undefined if key not found.
  • Abstract method to set a value for multiple keys.

    Parameters

    • keyValuePairs: [K, V][]

      An array of key-value pairs.

    Returns Promise<void>

    • A Promise that resolves when the operation is complete.
  • Abstract method to yield keys optionally based on a prefix.

    Parameters

    • Optional prefix: string

      Optional prefix to filter keys.

    Returns AsyncGenerator<string | K, any, unknown>

    • An asynchronous generator that yields keys on iteration.

Generated using TypeDoc