Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

Using Cordova sqLite Plugin #275

Open
iqmeta opened this issue Nov 8, 2016 · 1 comment
Open

Using Cordova sqLite Plugin #275

iqmeta opened this issue Nov 8, 2016 · 1 comment

Comments

@iqmeta
Copy link

iqmeta commented Nov 8, 2016

Hi,
is it possible to use a native sqLite cordova plugin with the sqLite Provider?

image

like passing the eg. the db object from this:

var db = window.sqlitePlugin.openDatabase({name: "my.db", location: 1}, successcb, errorcb);
(https://github.com/Telerik-Verified-Plugins/SQLite)

So this file is used

image

Instead of the sqLite Provider created one within the WebKit / LocalStorage (webSQL)
which is as far I know limited (correct me if I'm wrong)

image

cheers.

@olivertitze
Copy link

You can add
document.addEventListener("deviceready", function () { window.openDatabase = window.sqlitePlugin.openDatabase; });
Just make sure you open the database after the deviceready event is fired.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants