Working offline mode, + synchronization (ionic 3)

Hi everybody,
I am developing an app in ionic3 framework and i want to use PostgreSQL as database. I want to work my app on offline (sqlite) and sync the data to my database.I found PouchDB which works as a local storage and sync with CouchDB(NoSQL solution) . there is any other local storage which work offline and sync with postgresql data base ?, (documentation,tutorials,…)

1 Like

Hi, @pierreLitto please refer this tutorial for offline sync data

2 Likes

thx… but it’s a NoSQL solution !!

@pierreLitto For MySQL, you have to use ionic SQLite plugin for offline sync.

I have suggested this tutorial follow for MySQL database

1 Like

thank you ,… but this tutorial … just for local Storage with sqlite (=offline ), I’m looking for a way to sync my data to PosgreSql database(=onlline mode )

1 Like

@pierreLitto, For sync data from the offline database to online you have to add boolean type field like(isSync BOOLEAN) in the offline database table and append false value by default. when your app is online gets all isSync false data and passing all the data in API and after successfully call API you need to change isSync value to true

1 Like

You could potentially do a “facade” service that acts as couchdb and then your node.js translates required actions to persistence (PostGres etc). But I am not aware of anyone in production who did that and is happy with it.

1 Like

You can try: http://docs.sqlite-sync.com/