Interface BaseStoreInterface<K, V>

For backwards compatibility only. Remove on next minor version upgrade.

interface BaseStoreInterface<K, V> {
    mdelete(keys: K[]): Promise<void>;
    mget(keys: K[]): Promise<(undefined | V)[]>;
    mset(keyValuePairs: [K, V][]): Promise<void>;
    yieldKeys(prefix?: string): AsyncGenerator<string | K, any, unknown>;
}

Type Parameters

  • K
  • V

Implemented by

Methods

  • 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.
  • 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.
  • 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.
  • Method to yield keys optionally based on a prefix.

    Parameters

    • Optionalprefix: string

      Optional prefix to filter keys.

    Returns AsyncGenerator<string | K, any, unknown>

    • An asynchronous generator that yields keys on iteration.