Cell API
    Preparing search index...

    Class DataSourceManager

    DataSourceManager is used to store and manage multiple orm dataSources. It also provides useful factory methods to simplify dataSource creation.

    Index
    • Creates a new dataSource based on the given dataSource options and registers it in the manager. DataSource won't be established, you'll need to manually call connect method to establish dataSource.

      Parameters

      • options: DataSourceOptions & { name?: string }

      Returns DataSource

    • Gets registered dataSource with the given name. If dataSource name is not given then it will get a default dataSource. Throws error if dataSource with the given name was not found.

      Parameters

      • name: string = 'default'

      Returns DataSource