WiseLibs / better-sqlite3

The fastest and simplest library for SQLite3 in Node.js.
MIT License
5.26k stars 391 forks source link

nodejs integration of sqlite3 for experimental storage #1086

Closed Uzlopak closed 9 months ago

Uzlopak commented 9 months ago

I wanted to inform you that there is PR for nodejs to sqlite3. https://github.com/nodejs/node/pull/50169

Maybe you can give some feedback regarding performance :)?

Currently it is about using is sqlite3 internally for the experimental web storage.

I thank you for your participation. :)

Prinzhorn commented 9 months ago

From what I understand this implements the Web Storage API and just happens to use SQLite for it's backing storage. The Web Storage API is a key/value storage. There is no discussion about exposing SQLite in Node.js, they explicitly say

sqlite is not exposed to users at all.

I don't see how this is relevant to better-sqlite3 then. I also don't understand why you'd want things like localStorage baked into Node.js, but I haven't looked into the discussion that lead to this decision and I don't really care. From peeking at the whole discussion I don't see this being shipped at all in this form. Including full SQLite just for a K/V store sounds like a waste when dedicated K/V stores exist (like LevelDB, which powers the storage in Chromium). But again, that's not my discussion and definitely the wrong place here.