4 ms·
I really wish that modern browsers add support for it. It’s supported virtually everywhere except for browsers
by me551ah 4y ago
I really wish that modern browsers add support for it. It’s supported virtually everywhere except for browsers
- vbezhenar 4y agoWhy do you need any special support from browsers? Just compile it to JS or Wasm and use it like any other library.
- JohnBooty 4y agoWell, I mean, with enough work you can make a key/value store (what browsers have) sort of act like a relational store, but the results aren't necessarily going to be awesome. You could brute force it and just compile SQLite to WASM, maybe, like you say? need to persist that data into IndexedDB's key/data store somehow which is probably not going to be totally awesome. There are polyfill solutions like JSStore that let you treat IndexedDB like a SQL database which would probably make more sense. That's why it would be nice (for some use cases) if SQLite was baked into browsers themselves and exposed to Javascript. We had that at one point with WebSQL, and I think Firefox ships with a non-exposed dependency on SQLite for bookmark storage anyway, so it's not too unreasonable.
- chasil 4y agoIt is actually supported in browsers. It is not a formal standard, because two implementations are required for that, and there can be only one SQLite. "Mozilla's argument against it becoming a standard was because it would codify the quirks of SQLite." https://en.wikipedia.org/wiki/Web_SQL_Database https://en.wikipedia.org/wiki/Web_SQL_Database
- laurencerowe 4y agoHowever it is in the process of being deprecated and removed: https://developer.chrome.com/blog/deprecating-web-sql/ https://developer.chrome.com/blog/deprecating-web-sql/
- chasil 4y agoIn any case, whether WebSQL is supported, every major browser is using it for internal functions.