Class ObjectStore<T, PK, TNoKey>

T is the type of the object, PK is the type of the object's primary key.

Type Parameters

  • T extends TNoKey

  • PK extends IDBValidKey

  • TNoKey

Constructors

Properties

iterator: CursorIterator<T, PK, PK>

Methods

  • A Promise version of IDBObjectStore.add

    Parameters

    Returns Promise<PK>

  • A Promise version of IDBObjectStore.clear

    Returns Promise<undefined>

  • A Promise version of IDBObjectStore.count

    Parameters

    • Optional query: PK | IDBKeyRange

    Returns Promise<number>

  • Parameters

    • query: PK | IDBKeyRange

    Returns Promise<undefined>

    See

    IDBObjectStore.delete

  • Type Parameters

    • IT extends IDBValidKey

    Parameters

    Returns void

    See

  • Parameters

    • query: PK | IDBKeyRange

    Returns Promise<undefined | T>

    See

    IDBObjectStore.get

  • A Promise version of IDBObjectStore.getAll

    Parameters

    • Optional query: PK | IDBKeyRange
    • Optional count: number

    Returns Promise<T[]>

  • Parameters

    • Optional query: PK | IDBKeyRange
    • Optional count: number

    Returns Promise<PK[]>

    See

    IDBObjectStore.getAllKeys

  • Parameters

    • query: PK | IDBKeyRange

    Returns Promise<undefined | PK>

    See

    IDBObjectStore.getKey

  • A Promise version of IDBObjectStore.put

    Parameters

    • value: T
    • Optional key: PK

    Returns Promise<PK>

  • It is get but will throw if no object is found

    Parameters

    • key: PK | IDBKeyRange

    Returns Promise<T>

    Throws

    when no object with key is found

  • Try to delete an index of the specified name. Return true if delete successfully.

    Parameters

    • name: string

    Returns boolean

    See