Repository navigation
Enable all SQLite extensions that do not require code changes. #56476
Description
Activity
- addedfeature requestIssues requesting new Node.js features.Issues requesting new Node.js features.
on Jan 5, 2025 Would you have any objection, @cjihrig?
(I'm about to mention better-sqlite3 again 😅 ) better-sqlite has some of these
TheOneTheOnlyJJ commented
on Jan 16, 2025 ContributorAuthorMore actionsAfter taking another look at this, I noticed that the RBU extension is not fit to be added. However, from the list you shared here, I now see even more viable extensions that I didn't know existed until now (like geopoly).
Adding these flags would increase the build size, but other than that, we would get more SQLite features with no other effort involved.Reacted by Edy SilvaWould you have any objection, @cjihrig?
No objection, but I think we should evaluate each one of these individually. We need to weigh features against any impact on performance and/or binary size.
Reacted by Edy SilvaTheOneTheOnlyJJ commented
on Jan 17, 2025 ContributorAuthorMore actionsI'm very busy at this time and cannot contribute, but what are the steps required to do this properly?
Do tests have to be written?
No objection, but I think we should evaluate each one of these individually. We need to weigh features against any impact on performance and/or binary size.
How would this impact be effectively measured?
I'm interested in the perspectives being considered when deciding on each extension.
Do tests have to be written?
If new functionality is enabled, there should be at least one test to prevent regressions.
How would this impact be effectively measured?
For #56541 I wrote a script and compared the execution time with and without the change. To evaluate the binary size, you can look at the file size of the node binary.
- addedsqliteIssues and PRs related to the SQLite subsystem.Issues and PRs related to the SQLite subsystem.
on Feb 7, 2025 I tried out the experimental
node:sqlitemodule and was very happy with it—until I realized extensions that are part of the default SQLite amalgamation are not enabled in Node.js by default.I upgraded to v22.14.0 specifically for the Math functions—that was a blocker for me. Now, I’m needing FTS5 and realized that it is not included either.
Anyway, a definite 👍 from me as the current behavior is unexpected, coming from other SQLite packages in the Node.js ecosystem as well as from other languages where SQLite is a builtin
Reacted by Jurj Andrei GeorgeClosing since #57621 landed.
Reacted by Jurj Andrei George
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsAwaiting Triage
What is the problem this feature will solve?
SQLite has a few compile-time extensions that are not enabled by default in Node.js, meaning developers cannot use them out of the box.
Inspired by #56447, I suggest enabling all SQLite extensions that do not require additional code written by default (just as the math functions from #56447). We should target the entire SQLite amalgamation and all the other default extensions (again, such as the math functions from #56447).
Potential candidates include:
-DSQLITE_ENABLE_FTS5.-DSQLITE_ENABLE_FTS3and-DSQLITE_ENABLE_FTS3_PARENTHESIS.-DSQLITE_ENABLE_RTREE.-DSQLITE_ENABLE_DBSTAT_VTAB.-DSQLITE_ENABLE_RBU.Unless there are explicit reasons why these should not be included, I see no reason to withhold them from developers.
What is the feature you are proposing to solve the problem?
Add the extensions' compile-time extension flags to Node.
What alternatives have you considered?
Compiling and linking your build of SQLite with the extensions enabled is a major hassle for developers and users alike.