rmapi-js
    Preparing search index...

    Class IndexedDbState

    a StateStore in IndexedDB, for a browser: the snapshot under one key and the records under increasing keys, each call one transaction

    One opened with open is the account's own database, which clear, as on signing out, deletes.

    Implements

    Index
    • Parameters

      • db: IDBDatabase

        an open database

      • snapshots: string = "snapshot"

        the object store the snapshot goes in, with no key path

      • records: string = "records"

        the object store records go in, with an auto-incremented key

      Returns IndexedDbState

    • adds the records after those held

      Parameters

      • records: Uint8Array<ArrayBufferLike>[]

      Returns Promise<void>

    • removes everything held, and the account's database

      Returns Promise<void>

    • replaces everything held with this snapshot and no records

      Parameters

      • snapshot: Uint8Array

      Returns Promise<void>