3 ms·
Well, 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
by JohnBooty 4y ago
Well, 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.