-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Description
Issue type:
[x] question
[ ] bug report
[x] feature request
[ ] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql / mariadb
[ ] oracle
[ ] postgres
[ ] sqlite
[ ] sqljs
[ ] react-native
TypeORM version:
[x] latest
[ ] @next
[ ] 0.x.x (or put your version here)
Steps to reproduce or a small repository showing the problem:
Expo has a SQLite API, but it is extremely rudimentary. I wanted to get some opinions on whether it's even possible to create a TypeORM driver for it.
- The
openDatabasemethod accepts anameparameter and Expo's internal API will figure out the database location depending on the platform. This returns aDatabaseobject. - The
Databaseobject has a singletransactionmethod with 3 arguments: acallbackfunction that accepts aTransactionobject as its only argument, anderrorfunction, and asuccessfunction. - The
Transactionobject has a single method with the following signature:executeSql(sqlStatement, arguments, success_callback, error_callback)
Comparing what's available in Expo's SQLite API to how TypeORM's Driver works, there doesn't seem to be a good way to do connection management, i.e. I can't 'open' or 'close' a connection to the database. Would it still be possible to create a driver for this or is it a lost cause?