Interface SyncKeyValueRWTransaction

A read-write transaction for a synchronous key value store.

Hierarchy

Implemented by

Methods

Methods

  • Deletes the data at the given key.

    Parameters

    • key: string

      The key to delete from the store.

    Returns void

  • Retrieves the data at the given key. Throws an ApiError if an error occurs or if the key does not exist.

    Parameters

    • key: string

      The key to look under for data.

    Returns Uint8Array

    The data stored under the key, or undefined if not present.

  • Adds the data to the store under the given key.

    Parameters

    • key: string

      The key to add the data under.

    • data: Uint8Array

      The data to add to the store.

    • overwrite: boolean

      If 'true', overwrite any existing data. If 'false', avoids storing the data if the key exists.

    Returns boolean

    True if storage succeeded, false otherwise.

Generated using TypeDoc