Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Sqlite and ionic view

$
0
0

@mjpwall wrote:

Hi,

I'm using the following to start an sqlite db in my app.

if (window.sqlitePlugin !== undefined) {
_db = window.sqlitePlugin.openDatabase({
name: "tim.db",
location: 2,
createFromLocation: 1
});
} else {
// For debugging in the browser
_db = window.openDatabase("tim.db", "1.0", "tim", 200000);
}

This appears to work fine, I can test in the browser and in ionic view.

However, after using the app for some time in ionic view the database appears to empty.

I added alerts to identify which of the above was called in ionic view, it appears that the second is being used. I can only assume the max size has been reached.

Is the DB deleted when max size is reached in this way?

Also is there a reason the DB used the second function rather than the sqlitePlugin?

is there anyway of recovering the data lost?

Thanks for any help.

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>