Skip to content

Conversation

@mike-git374
Copy link

@mike-git374 mike-git374 commented Jan 3, 2026

This implements Proposal 1 of issue #61235

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/sqlite

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. sqlite Issues and PRs related to the SQLite subsystem. labels Jan 3, 2026
Copy link
Member

@himself65 himself65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please update the test case?

@mike-git374
Copy link
Author

I updated all tests with statement.set* functions

Copy link
Member

@Renegade334 Renegade334 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm -0.5 on this, as repeated calls across the JS-C++ boundary to set statement options is a very much less efficient paradigm than the alternative proposal, which was to allow options to be passed to prepare(). Passing a consolidated options object to set statement options also matches the pattern already in use in the database constructor.

@mike-git374
Copy link
Author

mike-git374 commented Jan 3, 2026

I updated the issue to address this and now recommend db.prepare(sql[, options]) as an alternative to or in addition to this PR

@codecov
Copy link

codecov bot commented Jan 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.53%. Comparing base (95852d7) to head (302305c).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #61263      +/-   ##
==========================================
- Coverage   88.54%   88.53%   -0.02%     
==========================================
  Files         704      704              
  Lines      208753   208757       +4     
  Branches    40280    40288       +8     
==========================================
- Hits       184847   184820      -27     
- Misses      15907    15952      +45     
+ Partials     7999     7985      -14     
Files with missing lines Coverage Δ
src/node_sqlite.cc 80.20% <100.00%> (+0.03%) ⬆️

... and 29 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. sqlite Issues and PRs related to the SQLite subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants