Populate from external file.

42 views
Skip to first unread message

Carlos Pinto

unread,
Jun 11, 2016, 9:31:16 AM6/11/16
to Dexie.js
I have just read that there is some kind of sync option with Dexie.
Before getting too deep into it, it would be awesome if someone could tell me if i am on a right path...

At this moment i check if a Dexie DB exists - if it doesn't populate it with the first data.

The point is that i regularly add new pre-populated data.
But when a user starts my page, the user still has the old content.

So instead of some kind of versioning of the store scheme (index, keys), i would like to know if anyone can tell me how to check if the pre-populated data is the same as the one on the users browser IndexedDB.

My theorotical solution at this moment:
Whenever the page starts, first delete the table (with null) and then populate.
The worst part of this is that it reload all new data and not only the new entries.

Sorry for my bad english and i hope you know what i mean :)

David Fahlander

unread,
Jun 13, 2016, 5:26:03 AM6/13/16
to Dexie.js
Seems the answer was just sent privately. Here's the answer once again for the forum.

There's a similar discussion at https://github.com/dfahlander/Dexie.js/issues/194 where that points to some hints of how to do a simple one way sync from server -> client. It also links to Dexie.Syncable for two-way sync when that is needed.
Reply all
Reply to author
Forward
0 new messages