Internalapi

The storage used in the SDK

Hierarchy

Constructors

  • Parameters

    • Optional dbName: string

      Name of the database.

    • Optional storeNames: 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

Properties

db: any
dbName: any
initDB: any
isIndexedDBSupported: any
isSupported: any
storeNames: any
transaction: any

Performs a transaction on the given object store.

Param

Transaction mode.

Param

The name of the object store.

Param

The operation to perform with the object store.

Methods

  • Clears all entries from the specified object store.

    Parameters

    • Optional storeName: string

    Returns Promise<void>

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

    Type Parameters

    Parameters

    • key: K
    • Optional storeName: string

    Returns Promise<void>

  • Parameters

    • key: string
    • Optional storeName: 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.

    • Optional skipKeys: string[]

      Keys to skip.

    • Optional sourceStoreName: 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
    • Optional storeName: string

    Returns Promise<StorageKeyReturnType[K]>

  • Parameters

    • key: string
    • Optional storeName: string

    Returns Promise<undefined | string>

  • Retrieves all values from the specified object store.

    Parameters

    • Optional storeName: string

    Returns Promise<string[]>

  • Retrieves all keys from the specified object store.

    Parameters

    • Optional storeName: 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>

  • Parameters

    • key: string
    • value: string
    • Optional storeName: string

    Returns Promise<void>

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

    Parameters

    • callback: ((arg) => {})

      The callback to be called when a storage value changes

        • (arg): {}
        • Parameters

          • arg: {
                eventType: "storageCleared" | "entryModified";
                key: null | string;
                newValue: null | string;
                oldValue: null | string;
            }
            • eventType: "storageCleared" | "entryModified"
            • key: null | string
            • newValue: null | string
            • oldValue: null | string

          Returns {}

      Returns Promise<void>

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

      Returns Promise<boolean>

    Generated using TypeDoc