-
-
Notifications
You must be signed in to change notification settings - Fork 649
Dexie.Syncable.IPersistedContext
interface IPersistedContext {
save ();
};
Context that the ISyncProtocol implementor may use to store persistant state info within.
ISyncProtocol may store any custom properties on the persistedContext and call save() to persist them.
Typically, this context could be used to save an identifyer for this particular local node agains the remote node. The remote node may then mark the changes applied by this node so that those changes are ignored when sending back its changes to you. In case the local database is deleted,
The context is saved in a special internal table within the same local database as you are syncing. If the database is deleted, so will you context be.
Persist your context object to local database. When done, the returned promise will resolve. You may only store primitive types, objects and arrays in this context. You may not store functions or DomNodes.
Dexie.js - minimalistic and bullet proof indexedDB library