question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ionic 2.0.0 RC.0: Storage, SqlStorage and Native SQLite

See original GitHub issue

Hi,

With the changes in the storage in the release candidate, can I ask this question?

I used to use this code, without any need for the Ionic Native SQLite plugin:

import {Storage, SqlStorage} from 'ionic-angular';
constructor() {
    this.storage1 = new Storage(SqlStorage, {name:'userData'});
    this.storage2 = new Storage(SqlStorage, {name:'taskData'});
  }

This doesn’t work any more:

src/app/app.module.ts(4,19): error TS2305: Module '"/home/ubuntu/workspace/pathfinder/node_modules/@ionic/storage/dist/es5/index"' has no exported member 'SqlStorage'.

So what is the right syntax to use so that the storage will use SQLite if available and fall back if not?

Does it now involve the Ionic Native SQLite plugin?

Thanks

Tom

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
ramonornelacommented, Sep 29, 2016

Duplicate #8269

0reactions
ionitron-bot[bot]commented, Sep 3, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ionic 2.0.0 RC.0: Storage, SqlStorage and Native SQLite #8290
Hi, With the changes in the storage in the release candidate, can I ask this question? I used to use this code, without...
Read more >
SqlStorage deprecated with ionic3. How to use SQLite plugins ...
It complains native plugins not available. I tried adding old Storage and SQLStorage typescript files from Old Ionic 2.0.0 RC version to new ......
Read more >
What happened to SqlStorage? - ionic-v3 - Ionic Forum
In Ionic 2 RC0, Storage and SqlStorage classes have suddenly disappeared from ionic-angular module. Furthermore, the Storage link in Ionic ...
Read more >
@ionic/storage - npm
A simple key-value Storage module for Ionic apps based on LocalForage, with out-of-the-box support for SQLite. This utility makes it easy to use ......
Read more >
Use SQLite In Ionic Instead Of Local Storage
Use SQLite instead of local storage in your Ionic 2 Android and iOS application with the Storage and SqlStorage dependencies.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found