Documentation
    Preparing search index...

    The storage used in the SDK

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • OptionaldbName: string

        Name of the database.

      • OptionalstoreNames: string[]

        An array of object store names to create in the database. The first store in the array will be used as the default if none is specified.

      Returns IndexedDBStorage

    Methods

    • Clears all entries from the specified object store.

      Parameters

      • OptionalstoreName: string

      Returns Promise<void>

    • Deletes an entry by key from the specified object store.

      Type Parameters

      Parameters

      • key: K
      • OptionalstoreName: string

      Returns Promise<void>

    • Deletes an entry by key from the specified object store.

      Parameters

      • key: string
      • OptionalstoreName: string

      Returns Promise<void>

    • Copies all key/value pairs from the source store into a target store.

      Parameters

      • targetDBName: string

        Name of the target database.

      • targetStoreName: string

        Name of the target object store.

      • OptionalskipKeys: string[]

        Keys to skip.

      • OptionalsourceStoreName: string

        (Optional) Source store name – defaults to the default store.

      Returns Promise<void>

    • Retrieves a value by key from the specified object store. If no store is specified, the default (first in the list) is used.

      Type Parameters

      Parameters

      • key: K
      • OptionalstoreName: string

      Returns Promise<StorageKeyReturnType[K]>

    • Retrieves a value by key from the specified object store. If no store is specified, the default (first in the list) is used.

      Parameters

      • key: string
      • OptionalstoreName: string

      Returns Promise<undefined | string>

    • Retrieves all values from the specified object store.

      Parameters

      • OptionalstoreName: string

      Returns Promise<string[]>

    • Retrieves all keys from the specified object store.

      Parameters

      • OptionalstoreName: string

      Returns Promise<IDBValidKey[]>

    • Get the key with the internal prefix

      Type Parameters

      Parameters

      • key: K

        the storage key

      Returns string

    • Stores a key/value pair in the specified object store.

      Type Parameters

      Parameters

      Returns Promise<void>

    • Stores a key/value pair in the specified object store.

      Parameters

      • key: string
      • value: string
      • OptionalstoreName: string

      Returns Promise<void>

    • This event will fire if the storage was modified by someone else, eg. on another tab

      Parameters

      • callback: (
            arg: {
                eventType: "storageCleared" | "entryModified";
                key: null | string;
                newValue: null | string;
                oldValue: null | string;
            },
        ) => {}

        The callback to be called when a storage value changes

      Returns Promise<void>

    • Returns a promise that resolves to true if the storage option is available on this platform.

      Returns Promise<boolean>