isar-community / isar

Extremely fast, easy to use, and fully async NoSQL database for Flutter
https://isar-community.dev
Apache License 2.0
171 stars 15 forks source link

Web storage missing #50

Open mrclauss opened 7 months ago

mrclauss commented 7 months ago

Steps to Reproduce

Currently web in v4 only supports in-memory storage, no persistence. Needs to be fixed

Code sample

Provide a few simple lines of code to show your problem.

Details


mdmm13 commented 7 months ago

Discussion with options: https://t.me/isardb/6339/8816:

Oh, one thing I could really use help: Isar currently only supports in memory SQLite on web. To persist data we need to write a custom virtual file system VFS that supports persistence.

We can either use IndexedDB to emulate a file system or we use the new Origin Private File system. There is some projects we can base our work on:

If you have experience with SQLite and javascript and would like to start a discussion/work on this let me know 💜

mrclauss commented 7 months ago

Yes I remember the discussion. In my opinion the most promising way to tackle this would be to adapt how drift/sqlite3 realised it. Drift web is announced as stanle, wo the same mechabism should work for isar.

Am 13. April 2024 13:24:34 MESZ schrieb mdmm13 @.***>:

Discussion with options: https://t.me/isardb/6339/8816:

Oh, one thing I could really use help: Isar currently only supports in memory SQLite on web. To persist data we need to write a custom virtual file system VFS that supports persistence.

We can either use IndexedDB to emulate a file system or we use the new Origin Private File system. There is some projects we can base our work on:

If you have experience with SQLite and javascript and would like to start a discussion/work on this let me know 💜

-- Reply to this email directly or view it on GitHub: https://github.com/isar-community/isar/issues/50#issuecomment-2053618439 You are receiving this because you authored the thread.

Message ID: @.***>

-- Martin Clauss Meine Contactulater Card - All meine Kontaktinfo immer aktuell und vollständig: https://contactulater.app/me/mc

rackberg commented 4 weeks ago

Any progress here? We also need isar v4 persistence storage in web.

Why is it so complicated to implement the feature like drift/sqlite3? Can someone explain it to me? I don't get it (no 'im not an expert with virtual filesystems using flutter).

Has someone tried to reach out to @simolus3 (aka Simon Binder, developer of drift) and asked him for help?

Thanks in advance.