import { collectionDocument } from "./interfaces"; /** * Class of Tessra Collection * Performs all the functions of TessraDB * collections (find, delete, insert, update, etc.) */ export declare class TessraCollection { #private; name: string; path: string; constructor(name: string, path: string); /** * function to find documents by filter in collection * @param filter filter object find({id:1, type:"help"}) */ find(filter: Object): Promise>; /** * function to find one document by filter in collection * @param filter filter object find({id:1, type:"help"}) */ findOne(filter: Object): Promise; /** * Insert a document to collection * @param doc Document to insert */ insert(doc: collectionDocument): Promise; /** * Insert a many documents to collection * @param docArray array of documents to insert */ insertMany(docArray: Array): Promise; /** * Replace documents in collection * @param filter Filter * @param doc Document to insert */ replaceMany(filter: Object, doc: collectionDocument): Promise; /** * Replace document in collection * @param filter Filter * @param doc Document to replace */ replace(filter: Object, doc: collectionDocument): Promise; }