Skip to content

fix: resolve #4284 β€” Claude Code Review Report#4290

Open
chinhkrb113 wants to merge 4 commits into
transact-rs:mainfrom
chinhkrb113:improve/quality/fix-swapped-null-float-type-mappings-in-
Open

fix: resolve #4284 β€” Claude Code Review Report#4290
chinhkrb113 wants to merge 4 commits into
transact-rs:mainfrom
chinhkrb113:improve/quality/fix-swapped-null-float-type-mappings-in-

Conversation

@chinhkrb113
Copy link
Copy Markdown

Summary

Combined multi-file contribution:

Changes

  • sqlx-core/src/any/arguments.rs
  • sqlx-core/src/any/connection/mod.rs
  • sqlx-sqlite/src/logger.rs
  • sqlx-macros-core/src/query/metadata.rs

Why

sqlx-core/src/any/arguments.rs: In AnyArguments::convert_into, the NULL float type mappings are swapped. AnyTypeInfoKind::Real corresponds to f32 but is encoded as Option::<f64>::None, and AnyTypeInfoKind::Double corresponds to f64 but is encoded as Option::<f32>::None. Binding a NULL f32/f64 through the Any driver sends the wrong SQL type hint, which can produce a type-mismatch error on strongly-typed backends like Postgres.

Fixes transact-rs#4284

Signed-off-by: ChinhLee <76194645+chinhkrb113@users.noreply.github.com>
Fixes transact-rs#4284

Signed-off-by: ChinhLee <76194645+chinhkrb113@users.noreply.github.com>
Fixes transact-rs#4284

Signed-off-by: ChinhLee <76194645+chinhkrb113@users.noreply.github.com>
Fixes transact-rs#4284

Signed-off-by: ChinhLee <76194645+chinhkrb113@users.noreply.github.com>
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