import Datastore from "nedb"; declare type Query = Record; /** * Base class for bridge stores. */ export declare class BridgeStore { readonly db: Datastore; private dbInsert; private dbUpdate; private dbRemove; private dbFindOne; private dbFind; constructor(db: Datastore); /** * INSERT a multiple documents. */ insert(objects: unknown): Promise; /** * UPSERT a single document */ upsert(query: Query, updateVals: T): Promise; /** * INSERT IF NOT EXISTS a single document */ insertIfNotExists(query: Query, insertObj: Record): Promise; /** * UPDATE a single document. If the document already exists, this will NOT update * it. */ update(query: Query, updateVals: Record): Promise; /** * DELETE multiple documents. */ delete(query: Query): Promise; /** * SELECT a single document. */ selectOne(query: Query, transformFn?: (input: T) => O): Promise; /** * SELECT a number of documents. * @param query * @param transformFn * @param defer */ select(query: Query, transformFn?: (input: T) => O): Promise; /** * Set a UNIQUE key constraint on the given field. * @param fieldName The field name. Use dot notation for nested objects. * @param sparse Allow sparse entries (undefined won't cause a key * violation). */ setUnique(fieldName: string, sparse?: boolean): void; /** * Convenience method to convert a document to something. * @param func The function which will be called with a single document * object. Guaranteed not to be null. * @return A `transformFn` function to pass to the standard * select/delete/upsert/etc methods. */ convertTo(func: (input: T) => O): (doc: T) => O; } export {};