JSONStore provides us with a great way to sync data with a server and track changes a user makes while offline. Is there a limit as to how much information could be saved on JSONStore? I found that Webkit database has a limit of 5 MB where as SQLLite database has no limit. Also wondering where JSONStore uses WebKit database or SQLLite to store its underlying information
Asked
Active
Viewed 1,146 times
1 Answers
4
JSONStore ultimately stores information on the file system. The only bounds would be the space remaining on the device or any file size limits imposed the the devices operating system. We have easily created JSONStore instances that were hundreds and hundres of MB on disk.

rooftop
- 3,031
- 1
- 22
- 33
-
Thanks, Also wondering could I retrieve data that was stored in JSONStore after app restart? I see that initCollection initializes JSONStore by calling adapter but I do not want to initialize the collection on restarting the app every-time but rather retrieve what was stored last time. – lakssundar Feb 28 '13 at 15:16
-
2The data is stored in the collection on the disk, it will persist across all app restarts. The simplest way to handle this case is to check the count of a collection with the app starts, and if it's 0 assume it's empty and you need to load data. – rooftop Feb 28 '13 at 15:20
-
I checked the API and count can be executed on a collection. My question is how do I retrieve a collection when the app initializes again. I do not want to call initCollection as it will load the data from database which will overwrite the existing data. – lakssundar Feb 28 '13 at 15:32
-
initCollection will not put any data into or out of the collection, it will simply "open" the collection. You must be thinking of the load() function. – rooftop Feb 28 '13 at 20:27
-
3Yes, I got it. Once I use load:true option in initCollection it will goto adapter if not loaded. Else, it will load the collection from local store. That's a nice way of implementing persistent storage – lakssundar Feb 28 '13 at 21:39