Cordova-sqlite-storage: Can be used with platform browser ?

Created on 4 Jul 2015  路  14Comments  路  Source: storesafe/cordova-sqlite-storage

Hi,
I would like to use sqlite-storage with platform browser but i have this error :
OPEN database: myDb.db SQLitePlugin.js:171
OPEN database: myDb.db failed, aborting any pending transactions SQLitePlugin.js:192
Could not open database

and here is my code :

document.addEventListener('deviceready',onDeviceReady, false);
function onDeviceReady() {
var db = window.sqlitePlugin.openDatabase({name: "myDb.db", location:2, createFromLocation: 1});
}

I use this command line to build and launch :
cordova build browser
cordova run browser

Browser (Chrome) open and i can see error :

OPEN database: myDb.db SQLitePlugin.js:171
OPEN database: myDb.db failed, aborting any pending transactions SQLitePlugin.js:192
Could not open database

I've tried to put myDb.db into folder plugins/io.litehelpers.cordova.sqliteStorage/www/ but i have the same error .. :(

And so i don't know if this plugin can be used with plateform browser , or may be another wau to use it ...

Thanks for your help ...
Best Regards

Pascall

enhancement question doc-todo testing

Most helpful comment

Hello,

when will it be ready?

All 14 comments

No idea about it ?
I'm still trying to test it without result

Hi,
I've tried with another sqlite plugin and i works as expected, it take my db file from myProject/www and copy it into browser/www/ and i can access to it easily with my app ...
So i gonna use it ...
If any one has ideas about how to use cordova-sqlite-storage with browser platform,let me know about it ...

Unfortunately this plugin does _not_ yet support the "browser" platform. Happy that you found another solution (so far). Just curious which project you are using?

Hi,

have you made any progress in the browser support or do you know of any workaround you can use? I'm not to keen on using the other library mentioned.

Thanks!

This feature is still under consideration. I am pretty swamped with both paid and free software work right now. Priority will be given to paid customers.

any updates on this issue @brodybits ? thanks

This feature is still under consideration and priority is given to paid users. For expedited feature development you may contact: [email protected] or [email protected]

I've prepared simple browser implementation in this PR: #575 for my purposes.
You could use it if you want.

I raised #576 with an initial implementation for the browser platform. It supports the more difficult transaction cases such as nested transactions, error handling, and error recovery.

I may need 1-2 months to finish the browser platform due to some existing workload.

Hi @brodybits , any predictions for launching the version with platform browser support? This would be very useful!

Hopefully within the next 1-2 months

Hello,

when will it be ready?

My apologies for the delay. Browser platform support using SQL.js should be ready in July 2018 as discussed in PR #576 and issue #773 (July 2018 major release). I would like to keep further discussion in #773.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maoamid picture maoamid  路  4Comments

reconka picture reconka  路  5Comments

maheshnathwani picture maheshnathwani  路  3Comments

DanielSWolf picture DanielSWolf  路  5Comments

txavier picture txavier  路  5Comments