Skip to main content

Class: ConnectionManager

Defined in: service-core/src/database/ConnectionManager.ts:66

Provides database connection management.

Constructors​

Constructor​

new ConnectionManager(): ConnectionManager

Returns​

ConnectionManager

Properties​

connections​

connections: Map<string, RedisClientType | DataSource | MongoConnection>

Defined in: service-core/src/database/ConnectionManager.ts:67

Methods​

connect()​

connect(datastores, models): Promise<void>

Defined in: service-core/src/database/ConnectionManager.ts:148

Attempts to initiate all database connections as defined in the config.

Parameters​

datastores​

any

A map of configured datastores to be passed to the underlying engine.

models​

Map<string, any>

A map of model names and associated class definitions to establish database connections for.

Returns​

Promise<void>


disconnect()​

disconnect(): Promise<void>

Defined in: service-core/src/database/ConnectionManager.ts:266

Attempts to disconnect all active database connections.

Returns​

Promise<void>