import { ILoggerConfig } from '../../type/index'; export declare class DBManager { dbInstance: any; config: ILoggerConfig; private tableCountTimer; private tableInstance; constructor(config: ILoggerConfig); /** * 更新配置 * * @param { ILoggerConfig } config - 配置 */ setConfig(config: ILoggerConfig): void; /** * 初始化数据库 */ init(): Promise; /** * 启动监听表存储大小健康定时器 * * @param { number | undefined } detectTimer - 循环间隔时间 */ private startDetectTimer; /** * 向数据库中添加内容 * * @param { any } data - 数据内容 */ add(data: any): Promise; /** * 向数据库批量添加内容 * * @param { any[] } data - 批量数据 */ bulkAdd(data: any): Promise; /** * 清理历史和失效的数据库 * * @param { boolean } autoClear - 是否自动清理 */ private clearHistoryDB; /** * 导出Blob数据 * * @param { string } fileName - 文件名 * @returns { Promise } */ exportBlob(fileName: string): Promise; /** * Generate zip blob use json's blob async * * @param { Blob } blob - origin json blob data * @param { string } time - current time * @param { string } fileName - file's name * @returns { Promise } */ private generateZipBlobAsync; /** * 导出blob文件进度回调 */ progressCallback(): boolean; /** * 超过设置最大的表数量后,定时清理表 */ private detectTableHealthy; /** * 获取表存储数据的数量 * * @returns { Promise } */ getTableLength(): Promise; /** * 清空数据表数据 */ clearLimitTable(): Promise; /** * 清空数据表数据 */ clearTable(): Promise; /** * 检测数据库中是否存在表 * * @param { string } tableName - 表名 */ isTableExists(tableName: string): boolean; /** * 删除数据库 * * @param { string } dbName - 数据库名称 */ delete(dnName: string): void; /** * 打开数据库 */ open(): Promise; /** * 关闭数据库 */ close(): void; /** * 停止健康检查定时器 */ closeTableCountTimer(): void; /** * 获取数据库是否打开状态 * * @returns { boolean } */ isOpen(): any; }