UNPKG

dataorm

Version:
31 lines (30 loc) 849 B
declare type StorageAdapter = { LocalStorage: 'LocalStorage'; AsyncStorage: 'AsyncStorage'; }; interface DbConfigOptions { name?: string; storage?: keyof StorageAdapter; } export declare class Database { private static instance; private initialized; private store; private entities; private dbConfig; collection(entity: string): any[]; setCollection(entity: string, collection: any[]): void; constructor(); private generateConfig; private checkModelTypeMappingCapabilities; private createModelBinding; private createSchema; private registerSchema; private setStore; static getInstance(): Database; config(dbConfig?: DbConfigOptions): this; register(model: any): this; start(): void; } export declare const DB: Database; export {};