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
openDatabase method accepts a name parameter and Expo's internal API will figure out the database location depending on the platform. This returns a Database object.
- The
Database object has a single transaction method with 3 arguments: a callback function that accepts a Transaction object as its only argument, and error function, and a success function.
- The
Transaction object 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?
Issue type:
[x] question
[ ] bug report
[x] feature request
[ ] documentation issue
Database system/driver:
[ ]
cordova[ ]
mongodb[ ]
mssql[ ]
mysql/mariadb[ ]
oracle[ ]
postgres[ ]
sqlite[ ]
sqljs[ ]
react-nativeTypeORM 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.
openDatabasemethod accepts anameparameter and Expo's internal API will figure out the database location depending on the platform. This returns aDatabaseobject.Databaseobject has a singletransactionmethod with 3 arguments: acallbackfunction that accepts aTransactionobject as its only argument, anderrorfunction, and asuccessfunction.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
Driverworks, 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?