@storehouse/sequelize - v2.0.0
    Preparing search index...

    Function getManager

    • Retrieves a SequelizeManager instance from the registry.

      Type Parameters

      Parameters

      • registry: Registry

        The Storehouse registry containing registered managers

      • OptionalmanagerName: string

        Optional name of the manager to retrieve. If omitted, retrieves the default manager

      Returns M

      The requested SequelizeManager instance

      If the manager is not found in the registry

      If the manager exists but is not an instance of SequelizeManager

      const sequelizeManager = getManager(registry, 'primary-db');
      const connection = sequelizeManager.getConnection();
      await connection.query('SELECT 1');