Skip to content

fix: correct SQLite column metadata types - #313

Open
huytdps13400 wants to merge 1 commit into
margelo:mainfrom
huytdps13400:fix/305-column-metadata-types
Open

fix: correct SQLite column metadata types#313
huytdps13400 wants to merge 1 commit into
margelo:mainfrom
huytdps13400:fix/305-column-metadata-types

Conversation

@huytdps13400

Copy link
Copy Markdown

Summary

  • compare SQLite declared types with strcmp(...) == 0 instead of treating non-equality as a match
  • restore metadata mapping for BOOLEAN, FLOAT, INTEGER, TEXT, BLOB, and undeclared expressions
  • add real-database regression coverage for both execute() and executeAsync()

This preserves the current exact-declaration contract. Affinity aliases such as REAL, DOUBLE, VARCHAR(...), and INT remain outside the existing mapping and continue to fall back to NULL_VALUE.

Verification

  • iOS react-native-harness focused RED before fix: 2 metadata tests failed (BOOLEAN reported as NUMBER)
  • iOS react-native-harness focused GREEN after fix: 2 passed
  • iOS react-native-harness full unit file: 34 passed
  • bun run typecheck (all three workspaces)
  • Prettier check for the harness test
  • clang-format dry run for types.hpp
  • git diff --check

Closes #305.

Compare declared SQLite types for equality and cover sync and async metadata mapping. Closes margelo#305.
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.

Incorrect column metadata types because strcmp comparisons are inverted

1 participant