-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature-request - include sqlite3 as builtin module for node v9.x #15128
Comments
-1 this is best left to userland. |
but you have to admit, there are many times when writing "throwaway" scripts on remote/unfamiliar machines, you wished there was a builtin and portable way to persist data other than read/write json files ;) |
I'm -1 on this too. |
FWIW, one solution is to create your custom version of Node.js by packging sqlite3 as a builtin module, so it does not have to be done in this repo. I am not sure if there is an existing guide on how to do this, but #10187 can be a reference on how to integrate a npm module into Node core. EDIT: should've link to the PR instead of the commit.. |
that's a worse solution than npm-installing. there are common use-cases where you would want to write a quick-and-dirty script to transpose/sort/serve a 100mb spreadsheet-like data, with a bare vm and vanilla nodejs, and not bother with the flakiness of npm-install. a builtin sqlite3 would make these expendable scripts simpler and more practical. e.g. perhaps a 200-line portable standalone script to transform/save datapoints, and then export it in highcharts-format for visualization with various transpose/sort/filter parameters. |
@kaizhu256 That's true. But, y'know, the same can be said about numerous packages on https://www.npmjs.com/browse/depended |
@joyeecheung , just going thru the list you presented and why are less useful than sqlite3 for quick-scripting:
pretty much everything in that list either has no use-case in throw-away scripting or is redundant to builtins in some way. sqlite3, however is not. |
Another -1 on this. You can install sqlite3 in a single shell command. Node.js has a philosophy of doings its best to enable a good package ecosystem but not pick sides. Adding something like sqlite3 in Node.js core would have to show a distinct advantage over doing so in userland.
I agree, and |
@kaizhu256 Not every throw-away script is the same. For some throw-away scripts, writing and reading JSON files are pretty enough for persistent storage (in fact "throw-away" seems a bit at odds with "persistent", I would say a lot of scripts only need in-memory storage), for others they are not. This can be said about "using Date v.s. moment" (like for people who does not/does need locales for datetimes), .etc, as you have described, and npm is a good solution to this problem. |
I'm also -1 on this. Given the feedback so far, and the fact that we are extremely unlikely to add this feature, I'm going to close this out. |
i'm generally happy with nodejs keeping the codebase lean and free of cruft, but sqlite3 is the one exception. it would allow us to write standalone, PERSISTENT webservers in embedded systems with zero-dependencies. recent activity indicates code for the sqlite3 npm-package has stabilized:
The text was updated successfully, but these errors were encountered: