import { IDBSchema } from "./indexdb-meta-models"; export declare abstract class IndexedDBStorage { private indexedDB; private databases; constructor(databases: Map); protected abstract eventsIndexedDB(event: string, dbName: string, storeName?: string, data?: any): void; /** * Initialize factory indexedDB */ private initialize; /** * Function to create databases * @param databases */ private createDatabases; /** * Function to get connection from Map * @param dbName * @returns IDBSchema */ private getDatabase; /** * Function to delete connection * @param dbName * @returns */ protected deleteBD(dbName: string): Promise; /** * Function to add records to database * @param dbName * @param storeName * @param data * @returns Promise */ protected addItems(dbName: string, storeName: string, data: any): Promise; /** * Function to get data from database * @param dbName * @param storeName * @param key * @param indexName * @returns Promise */ protected getItem(dbName: string, storeName: string, key: string | number, indexName?: string): Promise; /** * Function to get all data from store * @param dbName * @param storeName * @param withKeys * @returns */ protected getAllItems(dbName: string, storeName: string, withKeys?: boolean, withStoreName?: boolean): Promise; /** * Function to update record in store from database * @param dbName * @param storeName * @param key * @param newValue * @returns */ protected updateItem(dbName: string, storeName: string, key: string | number, newValue: any): Promise; /** * Function to delete record of store from database * @param dbName * @param storeName * @param key * @returns */ protected deleteItem(dbName: string, storeName: string, key: string | number): Promise; /** * Function to count items of store * @param dbName * @param storeName */ protected countItems(dbName: string, storeName: string): Promise; /** * Function to clear object storage * @param dbName * @param storeName * @returns */ protected clearStore(dbName: string, storeName: string): Promise; /** * Function to delete object storage * @param dbName * @param storeName * @returns */ protected deleteObjectStore(dbName: string, storeName: string): Promise; /** * Function to create new database inline * @param database * @returns */ protected createDatabase(database: IDBSchema): Promise; /** * Function to export database or table of database * @param dbName * @param storeName * @param withKeys * @returns */ protected exportDatabase(dbName: string, storeName?: string, withKeys?: boolean): Promise; }