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

    Function getManager

    • Retrieves a PgManager instance from the registry.

      Type Parameters

      • M extends PgManager<PoolClient> = PgManager<PoolClient>

        The specific PgManager type to return, defaults to PgManager

      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 PgManager instance

      If the manager is not found in the registry

      If the manager exists but is not an instance of PgManager

      const pgManager = getManager(registry, 'postgres');
      const client = await pgManager.getConnection();