Skip to content

Accept strict and allowduplicates in every DBInterface.execute form - #379

Merged
quinnj-bot[bot] merged 2 commits into
masterfrom
claude/execute-result-options
Nov 16, 2026
Merged

quinnj-bot[bot] merged 2 commits into
masterfrom
claude/execute-result-options

Conversation

@quinnj-bot

@quinnj-bot quinnj-bot Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Why

strict and allowduplicates worked only in one form, DBInterface.execute(stmt, params; strict=true). The obvious call, DBInterface.execute(db, sql; strict=true), returned a normal non-strict query with no error, because DBInterface binds every keyword of that form as a named SQL parameter, and SQLite ignores parameters with no matching placeholder. With explicit params, DBInterface.execute(db, sql, params; strict=true) threw a MethodError. The do-block forms behaved the same way.

What changed

  • DBInterface.execute on a SQLite.DB or SQLite.Stmt takes strict and allowduplicates in all eight forms: with or without params, and with or without a callback f.
  • In the forms without params, every other keyword is still bound as a named parameter.
  • The docstring shows the keywords and documents allowduplicates, which had no docs.

Scope

  • A SQL placeholder named :strict or :allowduplicates can no longer be bound by keyword in the forms without params. Pass it in a NamedTuple instead.
  • DBInterface.executemultiple still takes no options.

Blast Radius

Every DBInterface.execute call on SQLite now goes through SQLite's own methods instead of DBInterface's generic ones. They do the same prepare, execute, and close-on-error steps. Inferred return types match master for every form, and Test.detect_ambiguities(SQLite, DBInterface) is empty.

Verification

  • New testset Every execute form takes strict and allowduplicates. On master: 1 pass, 4 fails (([:a, :a_1], nothing, 1) == ([:a, :a], Tables.Schema(...), 1), the options silently dropped), and 3 MethodErrors. On this branch: 8/8.
  • Pkg.test() passes on Julia 1.12 and 1.10 (531/531).

🤖 Generated with Claude Code

quinnj and others added 2 commits November 16, 2026 12:17
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DBInterface's connection and callback forms of execute take no keywords,
and its keyword-only forms bind every keyword as a named parameter. So
DBInterface.execute(db, sql; strict=true) bound an unused parameter
named strict and returned a non-strict query, and the forms with
explicit params threw a MethodError.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.89%. Comparing base (adc6694) to head (e48458f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #379      +/-   ##
==========================================
+ Coverage   96.81%   96.89%   +0.08%     
==========================================
  Files           5        5              
  Lines         785      806      +21     
==========================================
+ Hits          760      781      +21     
  Misses         25       25              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@quinnj-bot
quinnj-bot Bot merged commit 789098b into master Nov 16, 2026
13 of 16 checks passed
@quinnj-bot
quinnj-bot Bot deleted the claude/execute-result-options branch November 16, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant