@storehouse/mongodb - v3.0.0
    Preparing search index...

    Function getManager

    • Retrieves a MongoDbManager 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 MongoDbManager instance

      If the manager is not found in the registry

      If the manager exists but is not an instance of MongoDbManager

      const mongoManager = getManager(registry, 'mongodb');
      await mongoManager.connect();