Skip to content

fix: surface SQLite parameter binding errors - #314

Open
huytdps13400 wants to merge 1 commit into
margelo:mainfrom
huytdps13400:fix/309-check-bind-errors
Open

fix: surface SQLite parameter binding errors#314
huytdps13400 wants to merge 1 commit into
margelo:mainfrom
huytdps13400:fix/309-check-bind-errors

Conversation

@huytdps13400

Copy link
Copy Markdown

Summary

  • check every sqlite3_bind_* return status in the shared statement binder
  • throw a normalized SQL execution error with the 1-based parameter index, SQLite code, and SQLite error text
  • avoid including parameter values in errors
  • cover sync, async, sync batch, and async batch APIs with real-database harness tests

Missing parameters retain their existing SQLite behavior; this change only rejects actual bind failures such as extra parameters returning SQLITE_RANGE.

Verification

  • focused iOS harness RED before fix: 4 new tests failed because extra parameters completed silently
  • focused iOS harness GREEN after fix: 4 passed
  • full iOS react-native-harness: 3 suites, 72 tests passed
  • iOS native app build: succeeded
  • bun typecheck (all three workspaces)
  • Prettier check for changed TypeScript
  • clang-format check for changed C++
  • git diff --check
  • no lockfile changes

Closes #309.

Check every sqlite3_bind result and reject invalid parameter indexes across sync, async, and batch APIs. Closes margelo#309.
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.

Check sqlite3_bind return codes so extra parameters are not silently ignored

1 participant