export interface IDb { startTransaction(): Promise; commitTransaction(session?: any): Promise; abortTransaction(session?: any): Promise; setCollection(collection: string): void; setIndexes(indexMap: { [name: string]: { index: object; property?: object; }; }): void; start(): Promise; findOne(query: object, session?: any): Promise; findByRange(field: string, from: any, to: any, dir: number, projection?: object, session?: any): Promise; findOneBySort(query: object, sort: object): Promise; find(query: object, sort?: object, limit?: number, offset?: number, projection?: object, session?: any, throwErrorMode?: boolean): Promise; count(query: object, throwErrorMode?: boolean): Promise; insertOne(doc: object, session?: any, throwErrorMode?: boolean): Promise; insertMany(docs: object[], session?: any): Promise; increment(id: string, field: string): Promise; updateOneById(id: string, update: object, session?: any): Promise; updateOne(filter: object, update: object, session?: any): Promise; replaceOneById(id: string, doc: object, session?: any, throwErrorMode?: boolean): Promise; deleteOneById(id: string, session?: any, throwErrorMode?: boolean): Promise; deleteByRange(field: string, from: any, to: any, session?: any): Promise; deleteAll(session?: any, throwErrorMode?: boolean): Promise; }