import { Query } from '../query/query'; import { ReturnType } from '../enums/'; export declare abstract class Repo { private dataArray; private static odm; constructor(data?: {} | Array<{}>, modelType?: any); /** * * @param odm - declare the properties of the class and collection name * @param data - data to save into collection * @param dbConnection - connection to database */ private static _save; /** * * @param odm - decleare the properties of the class and collection name * @param data - data to save into collection * @param dbConnection - connection to database */ private static _insert; /** * * @param data - data to insert to database, */ static save(data: {}): Promise; save(): Promise; /** * * @param data - data to insert to database */ static insert(data: T | T[]): Promise; insert(): Promise; /** * * @param _id - get document by id */ static get(objectIdentifier: string): Promise; static update(filter: any, dataToUpdate: T, upsert?: boolean, replace?: boolean): Promise; static updateMany(filter: any, updateData: T, upsert?: boolean): Promise; static delete(filter: any, model?: T, justOne?: boolean): Promise; private static _find; find(filter?: any, returnType?: ReturnType): Promise; static find(filter?: any, returnType?: ReturnType): Promise; static query(query: Query, returnType?: ReturnType): Promise; static createCollection(db: any, collName: string, validator: any): Promise; }