@idxdb/promised
Version:
@idxdb/promised wraps the IndexedDB API. It allows you to easily store and retrieve data in an indexed db database using async/await syntax, making it easier to integrate with your existing codebase.
21 lines (20 loc) • 1.23 kB
TypeScript
import { IndexInterface, KeyCursorInterface, ObjectStoreInterface, ValueCursorInterface } from '../component/interface/components.interface.js';
export declare class StoreIndex implements IndexInterface {
private readonly ctx;
constructor(ctx: {
index: IDBIndex;
objectStore: ObjectStoreInterface;
});
get keyPath(): string | string[];
get multiEntry(): boolean;
get name(): string;
get unique(): boolean;
get objectStore(): ObjectStoreInterface;
count<K extends IDBValidKey>(query?: IDBKeyRange | K): Promise<number>;
get<R, K extends IDBValidKey>(key: K): Promise<R>;
getAll<R, K extends IDBValidKey>(query?: IDBKeyRange | K, count?: number): Promise<R[]>;
getAllKeys<KeyValType, K extends IDBValidKey>(query?: IDBKeyRange | K, count?: number): Promise<KeyValType[]>;
getKey<KeyValType, K extends IDBValidKey>(key: IDBKeyRange | K): Promise<KeyValType>;
openCursor<PK extends IDBValidKey, K extends IDBValidKey, R>(query?: IDBKeyRange | K, direction?: IDBCursorDirection): ValueCursorInterface<PK, K, R>;
openKeyCursor<PK extends IDBValidKey, K extends IDBValidKey>(query?: IDBKeyRange | K, direction?: IDBCursorDirection): KeyCursorInterface<PK, K>;
}