typeorm
Version:
Data-Mapper ORM for TypeScript and ES2021+. Supports MySQL/MariaDB, PostgreSQL, MS SQL Server, Oracle, SAP HANA, SQLite, MongoDB databases.
19 lines (17 loc) • 539 B
JavaScript
import { ExpoDriver } from "./ExpoDriver";
import { ExpoLegacyDriver } from "./legacy/ExpoLegacyDriver";
export class ExpoDriverFactory {
constructor(connection) {
this.connection = connection;
}
create() {
if (this.isLegacyDriver) {
return new ExpoLegacyDriver(this.connection);
}
return new ExpoDriver(this.connection);
}
get isLegacyDriver() {
return !("openDatabaseAsync" in this.connection.options.driver);
}
}
//# sourceMappingURL=ExpoDriverFactory.js.map