Search code examples
local-storagedatastoresproutcoreweb-sql

Sproutcore Datastore Local Storage sync


I was wondering if it is possible to sync the Sproutcore Datastore (in-memory) with a choice of browser storage mechanisms such as WebSQL, localStorage etc.

I do know about SC.UserDefaults but my use case is not about saving app-level or user-level settings.

If there is no such in-built way to achieve this, is there a project attempting to do this somewhere that I could fork?


Solution

  • you can look at the SCUDS framework. Specifically this part

    https://github.com/etgryphon/sproutcore-uds/tree/master/frameworks/local/lib/adaptors

    they have some adaptors in there for lawnchair and some client side sql libraries. Other than that I think you will have to roll your own.