I have an app where I can manually choose to go offline. When a user does that I fire an ajax requests to get data and save it in websql db. My retrieved data consists of a collection of models, which I want to write separately in a single transaction. (each model has its own id, which I want to use as a keypath for easier queries afterwards)
The closest method that I can use is add(store_name, values)
but I don't know exactly how to use it. There is no example, and I can't figure it out. I am also not sure that this method is exactly what I need to do. Any feedback here? Can you give me a short example how I can achieve this?
Regards, Florin