Class Transaction<T>Abstract

A transaction for a store.

Type Parameters

Hierarchy (view full)

Constructors

Properties

done: boolean = false

Whether the transaction was committed or aborted

store: T

Methods

  • Retrieves data.

    Parameters

    • id: bigint

      The key to look under for data.

    Returns Promise<Uint8Array>

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

    Parameters

    • id: bigint

      The key to look under for data.

    Returns Uint8Array

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

  • Deletes the data at ino.

    Parameters

    • id: bigint

      The key to delete from the store.

    Returns Promise<void>

  • Deletes the data at ino.

    Parameters

    • id: bigint

      The key to delete from the store.

    Returns void

  • Adds the data to the store under an id. Overwrites any existing data.

    Parameters

    • id: bigint

      The key to add the data under.

    • data: Uint8Array

      The data to add to the store.

    Returns Promise<void>

  • Adds the data to the store under and id.

    Parameters

    • id: bigint

      The key to add the data under.

    • data: Uint8Array

      The data to add to the store.

    Returns void