You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After searching I couldn't find a way to do this in Capacitor. It seems that this issue has cropped up a few times, and I think the use of the official SQLite WASM build, and OPFS will become more frequent.
It also seems like a reasonable successor to jeep-sqlite. If I understand the history of the SQLite+WASM library space - the approach of putting SQLite into IndexedDB was a sort of hack to get around not having a place to store the SQLite db file on the web client, and has some downsides (performance and ACID compliance from what I've read). OPFS would resolve those - and open up the possibility of building doing "local-first" type architectures where all platforms use the same configuration for accessing a local SQLite database.
Related issues (Closed as completed but no resolution):
Another option would be to update the capacitor-community/sqlite plugin to use OPFS instead of jeep-sqlite on the "web" platform.
Additional Information
My motivation for exploring alternatives to capacitor-community/sqlite is that I need access to the actual SQLite .db file, from JS (I haven't explored this much - so maybe it's possible). I've also seen some issues regarding performance issues ( capacitor-community/sqlite#602 ) that were concerning - and I assume using the more recent / official SQLite WASM build would be more future proof.
The text was updated successfully, but these errors were encountered:
Description
Ability to set custom headers - so I can use OPFS and SQLite WASM backed by OPFS
Platforms
Request or proposed solution
I am trying to get the SQLite WASM build backed by OPFS working, and ran into the issue where it requires certain headers be set to work:
After searching I couldn't find a way to do this in Capacitor. It seems that this issue has cropped up a few times, and I think the use of the official SQLite WASM build, and OPFS will become more frequent.
It also seems like a reasonable successor to jeep-sqlite. If I understand the history of the SQLite+WASM library space - the approach of putting SQLite into IndexedDB was a sort of hack to get around not having a place to store the SQLite db file on the web client, and has some downsides (performance and ACID compliance from what I've read). OPFS would resolve those - and open up the possibility of building doing "local-first" type architectures where all platforms use the same configuration for accessing a local SQLite database.
Related issues (Closed as completed but no resolution):
Alternatives
Another option would be to update the capacitor-community/sqlite plugin to use OPFS instead of jeep-sqlite on the "web" platform.
Additional Information
My motivation for exploring alternatives to capacitor-community/sqlite is that I need access to the actual SQLite .db file, from JS (I haven't explored this much - so maybe it's possible). I've also seen some issues regarding performance issues ( capacitor-community/sqlite#602 ) that were concerning - and I assume using the more recent / official SQLite WASM build would be more future proof.
The text was updated successfully, but these errors were encountered: