storesafe / cordova-sqlite-storage

A Cordova/PhoneGap plugin to open and use sqlite databases on Android, iOS and Windows with HTML5/Web SQL API
Other
2.14k stars 715 forks source link

Multiple connections per db file #97

Open brodybits opened 10 years ago

brodybits commented 10 years ago

The sqlite (C) API supports multiple connections per database file. This is not (yet) supported by this plugin. To add multiple connections per database file would require a change to the internal JSON API between the Javascript and the platform implementation for all three platforms Android/iOS/WP(8).

jacobg commented 5 years ago

This would be very useful. Currently, transactions have to be performed using the transaction API, which seems a bit inflexible in that all sql statements must be synchronously executed in the transaction() method's callback. It doesn't work to just call executeSql() with BEGIN TRANSACTION and COMMIT statements, because this one connection is shared by all concurrent invocations.

I am running into this issue now trying to use the TypeORM library.