/// /// /// /// /// import { AdamantInjector } from './injector'; import { AdamantId, ConnectionFactory } from './injector-tokens'; import { DesignDocMetadataCollection, EntityMetadataCollection } from './metadata'; import { AdamantRepository } from './repository'; import { Ctor } from './utils/metadata'; export declare class AdamantConnectionManager { protected readonly connectionFactory: ConnectionFactory; readonly id: AdamantId; protected readonly injector: AdamantInjector; protected readonly injectorFactory: Function; protected readonly connections: Map>; protected readonly repositories: Map, AdamantRepository>; constructor(connectionFactory: ConnectionFactory, id: AdamantId, injector: AdamantInjector, injectorFactory: Function); getOpenConnections(): PouchDB.Database[]; getConnection(name: string): PouchDB.Database; clearConnections(): void; protected createConnection(name: string): PouchDB.Database; getRepository(entityClass: Ctor): AdamantRepository; protected createRepository(entityClass: Ctor): AdamantRepository; getMetadata(entityClass: Ctor): EntityMetadataCollection; getDesignDocMetadata(designDocClass: Ctor): DesignDocMetadataCollection; } export declare function createAdamantConnection(factory: ConnectionFactory): AdamantConnectionManager; export declare const ADAMANT_CONNECTION_MANAGER_PROVIDER: { provide: typeof AdamantConnectionManager; useFactory(connectionFactory: ConnectionFactory<{}>, id: AdamantId, injector: AdamantInjector, injectorFactory: Function): AdamantConnectionManager; deps: any[]; };