LokiDB
LokiDB copied to clipboard
[Request] Cordova-fs-adapter
I'm currently using the old LokiJS, which is great, but when the new LokiDB releases, I'd love to switch. 🔄
I see there's a wonderful arsenal of adapters ready for LokiDB. There is only one adapter that I'd like to request extra. 📌
- Meet loki-cordova-fs-adapter.
This adaptor is abandoned three years ago but still works on cordova v8 and cordova-ios v5 versions in my tests. It's amazing as it allows cordova apps to save Loki data to the File Storage. Which is persistent (unlike indexedDB which might get deleted by iOS during low memory).
If any one of you JS Gurus could look at the source code (only 100 lines!) and create an official version for LokiDB that'd be super cool! 😎
If any further information is required on Cordova File Storage, they have a great guide on this in their docs.
Happy easter! 🥚 🗿
I was able to do that ...please check out https://github.com/LokiJS-Forge/LokiDB/issues/84 I haven't had time to put in a repo yet.
Hi @greaterking thanks for your comment!! Unfortunately i don’t use ionic. :( I use VueJS with Cordova ;)
@mesqueeb hopefully you'll be able to port this over somehow I hope since its all js in the end ..but glad I could help :)
@mesqueeb Is it true that iOS on low memory is deleting indexedDB persistent memory? I am making an Ionic4 app for iOS and I need to use persistent memory for a huge amount of data. Can you please reply, its critical. Thank you
It's true. You need to use Filestorage instead. Don't know how to best do that.
As mentioned earlier you need to use the file storage adapter which leverages the official Cordova file plugin to persist the data to the devices file system. Since the adapter part of Loki isn’t tightly coupled you should be able to write your own..I did for use with ionic. Other frameworks you’ll just have to look at existing examples, build and share. If not you’ll have to use another lib like couchdb and others.