Retrieves a Sequelize connection instance 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 Sequelize connection instance
If the manager is not found in the registry
If the connection is not an instance of Sequelize
const sequelize = getConnection(registry, 'primary-db');const [results] = await sequelize.query('SELECT * FROM users WHERE active = ?', { replacements: [true], type: QueryTypes.SELECT}); Copy
const sequelize = getConnection(registry, 'primary-db');const [results] = await sequelize.query('SELECT * FROM users WHERE active = ?', { replacements: [true], type: QueryTypes.SELECT});
Retrieves a Sequelize connection instance from a manager in the registry.