3 ms·
The OP does not mention that IndexedDB itself is built on top of... SQLite. Abandoning WebSQL was truly a heinous crime against the Web.
by fmajid 1y ago
The OP does not mention that IndexedDB itself is built on top of... SQLite. Abandoning WebSQL was truly a heinous crime against the Web.
- dunham 1y agoIt's leveldb with a custom key format in chrome and electron. It would be nice to have WebSQL though, even if it has to be spec'd as "it's sqlite".
- jitl 1y agoIndexedDB is a standard and can be implemented however the user-agent sees fit. Chromium source tree has an implementation on LevelDB and an implementation on SQLite; I'm not sure how they pick the appropriate backend. Firefox and WebKit both appear to use SQLite as the backend. WebSQL was a clunky API, but not as clunky as IndexedDB which is truly yucky and very easy to get wrong in modern apps that use promises.
- nchmy 1y agoI think chromium still uses leveldb, but have been working towards changing to sqlite for a while. https://issues.chromium.org/issues/40253999 https://issues.chromium.org/issues/40253999
- matharmin 1y agowa-sqlite on top of OPFS is actually pretty great these days. Performance is about half of what I'd get in native SQLite, which is not too bad overall. It's around 10x faster than SQLite on top of IndexedDB for large databases in my experience. It's much better than WebSQL could ever be. You get the full power of modern SQLite, with the version, compile options, additional extensions, all under your control.