Skip to content

Conversation

@TGRZiminiar
Copy link
Contributor

Scan
Why not using f.d.Scan directly?

  • Because we have a custom type that is fixedpoint.Fixpoint so when the driver see our custom type it pass the decimal.Decimal type and if we just call f.d.Scan in f.d.Scan it only handle type of float32, float64, int64, uint64, string (default case) so it fall to default case that is a string and then it will fall to another default case in unquoteIfQuote function that checking the type of string and []byte only, so it fall to another default case that return an error
    image

image

@TGRZiminiar TGRZiminiar requested a review from bombnp December 20, 2024 05:33
Copy link
Contributor

@bombnp bombnp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than that, LGTM

}

switch v := value.(type) {
case decimal.Decimal:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add case decimal.NullDecimal, because why not

@bombnp bombnp merged commit e59bb88 into main Feb 6, 2025
@github-actions
Copy link

github-actions bot commented Feb 6, 2025

❌ Failed to complete Code Analysis & Testing (go version go1.21.13 linux/amd64)

💡 Feat: Method Scan, Value fo fixedpoint (#14)
🔨 Merging commit b6f7128 on branch feat/fixpoint/scan-value
📝 Action Status #26
🤔 Requested by bombnp

Please fix the errors before merging this pull request.

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.

3 participants