trilogy
trilogy copied to clipboard
Preload memory database content
context
I build an app using this library with sql.js and memory storage. I'd like to persist data in the local storage.
I found that sql.js support that officially - wiki and developer workaround by monkey patching your code in my project - code
proposed solution
Add native support by adding optional option to the config that allows to set localStorage dumps and read from them on init. In the perfect scenario it would be hooked to your update/insert methods to trigger saves to localStorage only after query execution.
alternatives
Monkey patching as I do