3 ms·
Very excited about this. When running inside the browser, is sqlite-vec able to persist data into the browser-native indexdb? Or, is this part left to the user
by xrd 2y ago
Very excited about this.
When running inside the browser, is sqlite-vec able to persist data into the browser-native indexdb? Or, is this part left to the user? If you can share the thinking there I would appreciate it, even if that is, "no thinking yet!"
- alexgarcia-xyz 2y agoIt could! It's based on the official SQLite WASM build, so you can use the same persistent options[0] that are offered there. Not sure if IndexedDB is specifically supported, but localStorage/OPFS VFS is available. [0] https://sqlite.org/wasm/doc/trunk/persistence.md#kvvfs https://sqlite.org/wasm/doc/trunk/persistence.md#kvvfs
- samwillis 2y agoOP is correct, the official WASM SQLite build is a sync only build and doesn't support async VFSs (which a IndexedDB VFS needs to be as it's an async api, unless you load the whole file into memory). The best option for IndexedDB backed WASM SQLite is wa-sqlite, it offered both a sync and async build and a bunch of different VFSs, including an IndexedDB one. Note however that the async builds add significant overhead and reduce performance. The most performant VFS is the "OPFS access handle pool" VFS that Roy developed for wa-SQLite and the official build also adopted as an option. That would be my recommendation for now.