-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
sqlite: enable common flags #57621
base: main
Are you sure you want to change the base?
sqlite: enable common flags #57621
Conversation
Review requested:
|
Not sure whether this will be a problem, but this increases the binary size by 600KB. |
e4b93b9
to
9590dee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not saying whether or not we should land this, but https://github.com/nodejs/node/blob/main/deps/sqlite/unofficial.gni should be updated, and there should be at least one test for each new API to prevent regressions.
Good point. Also, I think it would be good to have some benchmarks on sqlite implementations. |
9590dee
to
0c1ec86
Compare
@cjihrig , what's the difference between .gyp and .gni file? |
0c1ec86
to
31c5aa5
Compare
They are for two different build systems. The .gyp file is used by the official build. The .gni file is used by the unofficial GN build. |
Thank you! |
Why not? And why not the Geopoly extension? |
For |
On the other hand, the issue mentions the SQLite Amalgamation. I think we could have RBU enabled.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #57621 +/- ##
==========================================
+ Coverage 90.22% 90.23% +0.01%
==========================================
Files 630 630
Lines 185054 185055 +1
Branches 36254 36219 -35
==========================================
+ Hits 166963 166985 +22
- Misses 11032 11037 +5
+ Partials 7059 7033 -26 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small typo
31c5aa5
to
3f64dfa
Compare
test('rbu is enabled', (t) => { | ||
const db = new DatabaseSync(':memory:'); | ||
t.assert.deepStrictEqual( | ||
db.prepare('SELECT sqlite_compileoption_used(\'SQLITE_ENABLE_RBU\') as rbu_enabled;').get(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is more straightforward because RBU is just a way to handle bulk updates from one database to another. The process needs more tools (either sqlitediff
or C/C++ implementation).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you thinking what I'm thinking? 😂
Maybe sqlitediff
could itself also be packaged in Node.js, with a JS API exposing it gracefully.
I do not have the time to work on this, but it could definitely be investigated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment, but changes LGTM.
Co-authored-by: Colin Ihrig <[email protected]>
); | ||
}); | ||
|
||
test('fts3 parenthesis', (t) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is inconsistent with the rest, missing is enabled
in its name.
This PR enables flags that are common to other sqlite players in Node.js ecosystem:
This is related to #56476, even though it does not enable the RBU extension.
I see this as a good step toward the stabilization since it will make it easier for people from other dependencies.