Type Parameters
O
IK extends IDBValidKey
PK extends IDBValidKey
Constructors
constructor
- new Index<O, IK, PK>(index): Index<O, IK, PK>
Type Parameters
O
IK extends IDBValidKey
PK extends IDBValidKey
Methods
count
- count(query?): Promise<number>
Parameters
Optional
query: IDBKeyRange | IK
Returns Promise<number>
get
- get(key): Promise<undefined | O>
Returns Promise<undefined | O>
getAll
- getAll(query?, count?): Promise<O[]>
Parameters
Optional
query: IDBKeyRange | IK
Optional
count: number
Returns Promise<O[]>
getAllPrimaryKeys
- getAllPrimaryKeys(query?, count?): Promise<PK[]>
Parameters
Optional
query: IDBKeyRange | IK
Optional
count: number
Returns Promise<PK[]>
getPrimaryKey
- getPrimaryKey(key): Promise<undefined | PK>
Returns Promise<undefined | PK>
requireGet
- requireGet(key): Promise<O>
Returns Promise<O>
IK is the type of this index, PK is the type of the primary key of the object of this index.