ZenFS
    Preparing search index...

    Class Transaction<T>Abstract

    A transaction for a store.

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    store: T

    Methods

    • Retrieves data.

      Parameters

      • id: number

        The key to look under for data.

      • offset: number
      • Optionalend: number

      Returns Promise<undefined | Uint8Array<ArrayBufferLike>>

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

      Parameters

      • id: number

        The key to look under for data.

      • offset: number
      • Optionalend: number

      Returns undefined | Uint8Array<ArrayBufferLike>

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

    • Deletes the data at ino.

      Parameters

      • id: number

        The key to delete from the store.

      Returns Promise<void>

    • Deletes the data at ino.

      Parameters

      • id: number

        The key to delete from the store.

      Returns void

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

      Parameters

      • id: number

        The key to add the data under.

      • data: Uint8Array

        The data to add to the store.

      • offset: number

      Returns Promise<void>

    • Adds the data to the store under and id.

      Parameters

      • id: number

        The key to add the data under.

      • data: Uint8Array

        The data to add to the store.

      • offset: number

      Returns void