trilogy icon indicating copy to clipboard operation
trilogy copied to clipboard

Preload memory database content

Open sielay opened this issue 3 years ago • 0 comments

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

sielay avatar Jan 09 '23 21:01 sielay