I have mutiple tables on my server side which I need to fetch data from and store it on my client side Phonegap so it can be accessed offline.
I found Lawnchair but I can't find enough documentation how to save and update mutiple tables.
There is also WebSQL but I believe it's deprecated. (Please correct me if I'm wrong)
How can new data get fetched/ current data gets updated only when the device gets connected online?! In other words, any operation will be done on the data saved on the device.
There are a couple SQLite plugins, I've used the one from Brodysoft with success: https://github.com/litehelpers/Cordova-sqlite-storage
There are no events for when a device goes online/offline.There's a plugin for network connectivity events (cordova-plugin-network-information). You can also sync when the app launches, or have a "sync now" button/gesture so the user can sync on demand.