Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Method Scan, Value fo fixedpoint #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TGRZiminiar
Copy link

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

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

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

Please fix the errors before merging this pull request.

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

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.

2 participants