@storehouse/core - v2.1.0
    Preparing search index...

    Class ManagerFactory

    Factory for creating manager instances from registered classes

    const factory = new ManagerFactory();
    factory.setManagerType(MongoManager);
    const manager = factory.getManager({ type: 'MongoManager', config: {...} });
    Index

    Constructors

    Methods

    • Remove a registered manager type from the factory

      Type Parameters

      • TConfig = unknown

        Type of the configuration object

      Parameters

      Returns boolean

      true if the type was removed, false if it wasn't registered

    • Register a manager class with the factory

      Type Parameters

      • TConfig = unknown

        Type of the configuration object

      Parameters

      Returns this

      This factory instance for chaining

      factory.setManagerType(MongoManager).setManagerType(PGManager);