-1

I am using the Ionic framework with Angular and Capacitor to build a chat application. I want to implement storage in my application. I am trying to set up an SQLite database for my Capacitor project. The purpose of using SQLite is so that I can store data locally in SQLite database after fetching it from server, so that I can get data even if server does not respond or store previous chat data even when we are offline.
I am using MongoDB in the backend, but the primary database model for SQLite is Relational DBMS. How can I make this work together?

I am hardly able to find any solution for this. Can anyone please guide me with all the steps required to set up SQLite for capacitor project.

Ada
  • 427
  • 2
  • 13
Mahima
  • 9
  • 2
  • see link below with full example on Ionic Angular: https://github.com/capacitor-community/sqlite/blob/master/docs/Ionic-Angular-Usage.md – Laith Bzour Aug 15 '23 at 05:46

1 Answers1

0

I had a similar issue and managed to set up an SQLite database for my Ionic App using this example. The process was a pain though (not just for me). Since you don't seem to need a relational database (you're already using MongoDB), I would recommend letting go of SQLite and using e.g. Ionic Storage instead.

Ada
  • 427
  • 2
  • 13