typeorm
Version:
Data-Mapper ORM for TypeScript and ES2021+. Supports MySQL/MariaDB, PostgreSQL, MS SQL Server, Oracle, SAP HANA, SQLite, MongoDB databases.
23 lines (21 loc) • 730 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExpoDriverFactory = void 0;
const ExpoDriver_1 = require("./ExpoDriver");
const ExpoLegacyDriver_1 = require("./legacy/ExpoLegacyDriver");
class ExpoDriverFactory {
constructor(connection) {
this.connection = connection;
}
create() {
if (this.isLegacyDriver) {
return new ExpoLegacyDriver_1.ExpoLegacyDriver(this.connection);
}
return new ExpoDriver_1.ExpoDriver(this.connection);
}
get isLegacyDriver() {
return !("openDatabaseAsync" in this.connection.options.driver);
}
}
exports.ExpoDriverFactory = ExpoDriverFactory;
//# sourceMappingURL=ExpoDriverFactory.js.map
;