Skip to content

fix: clearer error when scanning NULL into a Decimal - #474

Merged
mwoss merged 1 commit into
masterfrom
fix/scan-null-error
Oct 18, 2026
Merged

mwoss merged 1 commit into
masterfrom
fix/scan-null-error

Conversation

@mwoss

@mwoss mwoss commented Oct 18, 2026

Copy link
Copy Markdown
Member

Scanning NULL into a plain Decimal now returns can't scan NULL into a Decimal, use NullDecimal or *Decimal instead of could not convert value '<nil>' to any known type, so the error says how to fix it.

It still returns an error, like database/sql does for int. Follow-up to #139.

@mwoss
mwoss merged commit ddb96d1 into master Oct 18, 2026
7 checks passed
@mwoss
mwoss deleted the fix/scan-null-error branch October 18, 2026 14:56
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