Class: ConnectionManager
Defined in: service-core/src/database/ConnectionManager.ts:17
Provides database connection management.
Constructors
Constructor
new ConnectionManager():
ConnectionManager
Returns
ConnectionManager
Properties
connections
connections:
Map<string,Redis|DataSource|MongoConnection>
Defined in: service-core/src/database/ConnectionManager.ts:18
Methods
connect()
connect(
datastores,models):Promise<void>
Defined in: service-core/src/database/ConnectionManager.ts:60
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:136
Attempts to disconnect all active database connections.
Returns
Promise<void>