Skip to content

sql: support named parameters in SQLite unsafe() queries - #37109

Merged
cirospaciari merged 11 commits into
mainfrom
farm/f2d73c10/sql-unsafe-named-params
Aug 13, 2026
Merged

sql: support named parameters in SQLite unsafe() queries#37109
cirospaciari merged 11 commits into
mainfrom
farm/f2d73c10/sql-unsafe-named-params

sql: finalize the SQLite statement when execution throws

fa34508
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 12, 2026 in 19m 24s

Code review found 1 potential issue

Found 1 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit test/js/sql/sqlite-sql.test.ts:1429-1442 Missing-binding test does not verify finalization on error

Annotations

Check warning on line 1442 in test/js/sql/sqlite-sql.test.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

Missing-binding test does not verify finalization on error

The comment says "The statement from the failed query is finalized", but neither assertion depends on the `try/finally` from fa34508c: strict-mode `rebindObject` throws before `sqlite3_step`, so an unfinalized statement acquires no lock, and `db.prepare()` returns a fresh statement each call — reverting the `try/finally` leaves this test green. Trim the comment to what is actually asserted ("the connection stays usable after a rejected bind"), or add a `heapStats`/`objectTypeCounts` check across