-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Description
Issue description
I installed typeorm in an react-native expo project, and followed the guideline from your docs. But there is an error tells that "this.sqlite.openDatabase" is not a function.
Expected Behavior
I checked expo-sqlite, It doesn't have such a function. I think expo-sqlite upgraded and typeorm ExpoDriver is not updated based on the new expo-sqlite version. The function name in expo-sqlite is "openDatabaseSync", "openDatabaseAsync"
Please update ExpoDriver in typeorm.
Actual Behavior
typeorm is based on an older version of expo-sqlite. As expo-sqlite updated function names, but typeorm didn't.
In fact, ExpoDriver must change "this.sqlite.openDatabase" to "this.sqlite.openDatabaseSync", and also update some "databaseConnection" functions based on expo-sqlite
Steps to reproduce
import * as SQLite from "expo-sqlite";
const dataSource = new DataSource({
database: "test19",
driver: SQLite,
entities: [Test],
// synchronize: true,
type: "expo",
});
dataSource.initialize();
My Environment
Dependency | Version |
---|---|
Operating System | |
Node.js version | 20.15.1 |
Typescript version | 5.3.3 |
TypeORM version | 0.3.20 |
Additional Context
No response
Relevant Database Driver(s)
- aurora-mysql
- aurora-postgres
- better-sqlite3
- cockroachdb
- cordova
- expo
- mongodb
- mysql
- nativescript
- oracle
- postgres
- react-native
- sap
- spanner
- sqlite
- sqlite-abstract
- sqljs
- sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
Yes, I have the time, but I don't know how to start. I would need guidance.