Skip to content

Fix DBInterface transaction values and NULL binding - #239

Merged
quinnj merged 1 commit into
mainfrom
fix/issue-238-dbinterface
Jul 31, 2026
Merged

Fix DBInterface transaction values and NULL binding#239
quinnj merged 1 commit into
mainfrom
fix/issue-238-dbinterface

Conversation

@quinnj

@quinnj quinnj commented Jul 31, 2026

Copy link
Copy Markdown
Member

Summary

  • return the transaction closure value after a successful commit
  • accept nothing as SQL NULL, matching the existing missing behavior
  • add MySQL integration coverage for both cases

Root cause

DBInterface.transaction discarded the closure result and returned the C API commit result. The prepared-statement binder had a null path only for Missing, so Nothing fell through to a MethodError.

Scope

This addresses behaviors 2 and 3 from #238. The connection-level DBInterface.execute(conn, sql, params) form remains unsupported. Implementing it safely requires a statement-lifetime design because query cursors can outlive the call.

Validation

  • full test suite passed against mysql:8: 200 tests
  • verified a prepared statement can bind nothing, a concrete value, and missing in sequence
  • verified a committed transaction returns the closure value
  • git diff --check

Refs #238

Co-authored by Codex

@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.89%. Comparing base (9db9900) to head (1c727f2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #239      +/-   ##
==========================================
+ Coverage   69.82%   69.89%   +0.07%     
==========================================
  Files          10       10              
  Lines        1183     1186       +3     
==========================================
+ Hits          826      829       +3     
  Misses        357      357              

☔ 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
quinnj merged commit d69e2d6 into main Jul 31, 2026
6 checks passed
@quinnj
quinnj deleted the fix/issue-238-dbinterface branch July 31, 2026 11:30
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