UNPKG

@girin/framework

Version:

Core modules for Girin: GraphQL server framework

30 lines 925 B
import NeDB from 'nedb'; import { FrameworkDatastore } from '../core/FrameworkDatastore'; export declare class NeDBFrameworkDatastore extends FrameworkDatastore { storage: Map<Function, NeDB>; constructor(); save<T extends { id: string; }>(obj: T): Promise<T>; find<T>(cls: { new (...args: any[]): T; }, predicate: { [field: string]: any; }): Promise<T | null>; get<T>(cls: { new (...args: any[]): T; }, id: string | number): Promise<T | null>; delete(cls: Function, id: string | number): Promise<boolean>; protected getCollection(cls: Function): NeDB; } export declare class NeDBModel { $source: { _id?: any; }; constructor($source?: { _id?: any; }); id: any; } export declare function nedbField(alias?: string): (prototype: any, propertyKey: string) => void; //# sourceMappingURL=NeDBFrameworkDatastore.d.ts.map