Ionic2 rc0 with Sqlite storage

Hi all! Who can explain please or show little example how properly now using in rc0 Storage with sqlite ?

I am using two days ago …

this.storage = new Storage();
this.storage.query(‘CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY AUTOINCREMENT’);

1 Like

Currently, Storage uses localforage underneath to abstract away the various storage engines while still providing a simple API.
When running natively, Storage will prioritize using SQLite, as it’s one of the most stable and widely used file-based databases, and avoids some of the pitfalls of things like localstorage that the OS can decide to clear out in low disk-space situations.
When running in the web or as a Progressive Web App, Storage will attempt to use IndexedDB, WebSQL, and localstorage, in that order.

Commented in Storage.d.ts

behnamazimi, hi ! Could you show please little example how to create table in sqlite now ?

Sorry! I wrote this reply before your edit and I misunderstood you and your topic aim,
I don’t use SQLite in RC0 tell now.

Did anyone get a satisfactory solution to this yet?

This is a major breaking change that was completely left off the upgrade steps. Very bad.

That no longer works in RC0. See here (in particular Max’s comment)