• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

typeorm / typeorm / 14796576772

02 May 2025 01:52PM UTC coverage: 45.367% (-30.9%) from 76.309%
14796576772

Pull #11434

github

web-flow
Merge ec4ce2d00 into fadad1a74
Pull Request #11434: feat: release PR releases using pkg.pr.new

5216 of 12761 branches covered (40.87%)

Branch coverage included in aggregate %.

11439 of 23951 relevant lines covered (47.76%)

15712.55 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

81.82
/src/entity-manager/EntityManagerFactory.ts
1
import { DataSource } from "../data-source/DataSource"
2
import { EntityManager } from "./EntityManager"
4✔
3
import { MongoEntityManager } from "./MongoEntityManager"
4✔
4
import { SqljsEntityManager } from "./SqljsEntityManager"
4✔
5
import { QueryRunner } from "../query-runner/QueryRunner"
6

7
/**
8
 * Helps to create entity managers.
9
 */
10
export class EntityManagerFactory {
4✔
11
    /**
12
     * Creates a new entity manager depend on a given connection's driver.
13
     */
14
    create(connection: DataSource, queryRunner?: QueryRunner): EntityManager {
15
        if (connection.driver.options.type === "mongodb")
47,104!
16
            return new MongoEntityManager(connection)
×
17

18
        if (connection.driver.options.type === "sqljs")
47,104✔
19
            return new SqljsEntityManager(connection, queryRunner)
10,993✔
20

21
        return new EntityManager(connection, queryRunner)
36,111✔
22
    }
23
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc