Tutorials/links on CRUD using "Ionic Storage" with capacitor?

Hi,

I want to create an app that can be used on the web, android, and ios. It will need to have offline storage and syncing when it goes online again. Ionic storage is a good choice for this? Is it free? There are better alternatives?

p.s do you know any tutorials/links on how to achieve a simple CRUD for this?
Most of the tutorials are using the Cordova plugin instead of capacitor.

thank you

Which “storage” are you referring to exactly? There are a few of them. Capacitor has its own Storage plugin. It’s good for saving small amounts of data, like user preferences, but as the docs say

Note: this API is not meant for high-performance data storage applications. Take a look at using SQLite or a separate data engine if your application will store a lot of items, have high read/write load, or require complex querying.

In addition to @mirkonasato’s questions, it would be useful to know what sort of data you are trying to store, and how it is to be fetched (e.g., can everything be a black box with a unique key, or do you need to query based on things inside the stored objects?).

Thank you for your answer, I’m referring to “Ionic Storage”:

I need a database for high-performance data, not just small amount of data. SQLite is a good option for this? how will it work SQLite on the web part?

thank you

Thank you for your answer,
yes, the data will become a little complex and I will need to query things inside objects, so a high-performance data storage I need. All the guides/tutorials are using Cordova but I’m searching for some alternatives without using Cordova since ionic suggests using Capacitor, right? correct me if I’m wrong. (I’m still a beginner learning about ionic).

thank you

This sounds like a rather ambitious first project. If you’ve been given this task for work, you might want to ask for some backup or assistance. If it’s a “learn as you go” self-driven app, maybe you might work up to it by, for example, going through the Angular Tour of Heroes.

That being said, you have described two goals that are both doable, if not exactly easy, in Ionic apps:

  • structurally stored data that can be queried
  • offline / online syncing

Unfortunately, they’re served by two completely different (and thoroughly incompatible) solutions: SQLite and PouchDB. I would first think if there is any way you can prioritize one of those features over the other, because doing both is going to be a rather herculean task.