Retrieves the underlying MongoDB client connection from a manager in the registry.
The Storehouse registry containing registered managers
Optional
Optional name of the manager. If omitted, uses the default manager
The MongoDB client instance
If the manager is not found in the registry
If the connection is not an instance of MongoClient
const client = getConnection(registry, 'mongodb');const admin = client.db().admin();const dbs = await admin.listDatabases(); Copy
const client = getConnection(registry, 'mongodb');const admin = client.db().admin();const dbs = await admin.listDatabases();
Retrieves the underlying MongoDB client connection from a manager in the registry.