import * as plugins from './smartdata.plugins'; import { Objectmap } from 'lik'; import { DbCollection } from './smartdata.classes.dbcollection'; /** * interface - indicates the connection status of the db */ export declare type TConnectionStatus = 'disconnected' | 'connected' | 'failed'; export declare class Db { dbUrl: string; db: plugins.mongodb.Db; status: TConnectionStatus; classCollections: Objectmap>; objectCollections: Objectmap>; constructor(dbUrlArg: string); /** * connects to the database that was specified during instance creation */ connect(): Promise; /** * closes the connection to the databse */ close(): Promise; /** * gets a class based collection by name: string */ getClassCollectionByName(nameArg: string): Promise>; /** * gets an object collection by name */ getObjectCollectionByName(nameArg: string, dbArg: Db, makeNewArg?: boolean): Promise>; addCollection(dbCollectionArg: DbCollection): void; }