GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — sqlite: propagate option getter errors and dedupe boolean options by araujogui · Pull Request #66748 · nodejs/node

Conversation

@araujogui

@araujogui araujogui commented Oct 15, 2026

Copy link
Copy Markdown
Member

new Database(path, options) read readBigInts, returnArrays, allowBareNamedParameters and allowUnknownNamedParameters without returning when the getter threw. The exception was lost, the constructor succeeded, and the database file was created anyway. Those options now propagate the error, and a regression test covers them.

Every boolean option in the binding now goes through a single ReadOptionalBool() helper instead of repeating the read/validate/throw logic for each one. Options are read in the same order and error messages are unchanged.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
araujogui added 2 commits October 14, 2026 23:09
@araujogui
sqlite: propagate errors from Database option getters
de34c1a
The readBigInts, returnArrays, allowBareNamedParameters and
allowUnknownNamedParameters options were read with
`if (Get().ToLocal())`, so a throwing getter left an exception pending
while the constructor carried on. Option parsing continued, the
database was opened, and the exception was lost, leaving a database
file on disk for a constructor call that should have failed.

Return as soon as reading any of these options fails, matching how
every other option is handled.

Signed-off-by: Guilherme Araújo <[email protected]>
Assisted-by: Claude
@araujogui
sqlite: add helper for reading boolean options
5f02b11
Reading an optional boolean option took about 15 lines of
Get/IsUndefined/IsBoolean/throw, repeated for every option across
Database's constructor, prepare(), function(), aggregate() and
createModule(). That repetition is also what let a missing early
return slip into four of the constructor's options.

Add ReadOptionalBool(), which reads one property, validates it and
reports whether an exception is pending, and use it for every boolean
option. Options are still read in the same order, and the error
messages are unchanged.

Signed-off-by: Guilherme Araújo <[email protected]>
Assisted-by: Claude
Copilot AI balanced review requested due to automatic review settings October 15, 2026 02:14
@nodejs-github-bot

nodejs-github-bot commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/sqlite
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Copilot AI reviewed Oct 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@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 Oct 15, 2026
@codecov

codecov Bot commented Oct 15, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.82540% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.49%. Comparing base (782a3ac) to head (5f02b11).
⚠️ Report is 130 commits behind head on main.

Files with missing lines Patch % Lines
src/node_sqlite.cc 96.82% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66748      +/-   ##
==========================================
+ Coverage   90.47%   90.49%   +0.02%     
==========================================
  Files         791      797       +6     
  Lines      277225   277250      +25     
  Branches    53313    53273      -40     
==========================================
+ Hits       250829   250908      +79     
+ Misses      16801    16780      -21     
+ Partials     9595     9562      -33     
Files with missing lines Coverage Δ
src/node_sqlite.cc 82.48% <96.82%> (+0.16%) ⬆️

... and 40 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.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mcollina
mcollina approved these changes Oct 15, 2026
View reviewed changes

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

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.

lgtm

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mcollina mcollina added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Oct 15, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Oct 15, 2026
@nodejs-github-bot

nodejs-github-bot commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/78401/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@araujogui araujogui added the resume-ci Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review. label Oct 15, 2026
@github-actions github-actions Bot removed the resume-ci Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review. label Oct 15, 2026
@nodejs-github-bot

nodejs-github-bot commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/78404/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@araujogui araujogui added commit-queue PRs queued for automated landing through the Commit Queue. commit-queue-squash PRs the Commit Queue should land as one squashed commit. labels Oct 22, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 1bffd1d into nodejs:main Oct 22, 2026
90 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

Landed in 1bffd1d

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Oct 22, 2026
@aduh95 aduh95 mentioned this pull request Oct 27, 2026
2026-10-28, Version 27.0.0-alpha.0.0.0 (Alpha) #67062
Merged
aduh95 pushed a commit that referenced this pull request Nov 12, 2026
@araujogui @aduh95
sqlite: propagate errors from Database option getters
558bc8e
The readBigInts, returnArrays, allowBareNamedParameters and
allowUnknownNamedParameters options were read with
`if (Get().ToLocal())`, so a throwing getter left an exception pending
while the constructor carried on. Option parsing continued, the
database was opened, and the exception was lost, leaving a database
file on disk for a constructor call that should have failed.

Return as soon as reading any of these options fails, matching how
every other option is handled.

Signed-off-by: Guilherme Araújo <[email protected]>
Assisted-by: Claude
PR-URL: #66748
Reviewed-By: Matteo Collina <[email protected]>
@github-actions github-actions Bot mentioned this pull request Nov 20, 2026
2026-11-30, Version 26.14.0 'Lithium' (LTS) #67664
Open
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@araujogui @gabylb
sqlite: propagate errors from Database option getters
e39af8a
The readBigInts, returnArrays, allowBareNamedParameters and
allowUnknownNamedParameters options were read with
`if (Get().ToLocal())`, so a throwing getter left an exception pending
while the constructor carried on. Option parsing continued, the
database was opened, and the exception was lost, leaving a database
file on disk for a constructor call that should have failed.

Return as soon as reading any of these options fails, matching how
every other option is handled.

Signed-off-by: Guilherme Araújo <[email protected]>
Assisted-by: Claude
PR-URL: nodejs#66748
Reviewed-By: Matteo Collina <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@mcollina mcollina mcollina approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-squash PRs the Commit Queue should land as one squashed commit. needs-ci PRs that need a full CI run. sqlite Issues and PRs related to the SQLite subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@araujogui @nodejs-github-bot @mcollina
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.