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

Add NewFromUint64 #352

Merged
merged 2 commits into from Apr 8, 2024
Merged

Add NewFromUint64 #352

merged 2 commits into from Apr 8, 2024

Conversation

agmt
Copy link
Contributor

@agmt agmt commented Feb 13, 2024

Adds a new constructor NewFromUint64(uint64), which utilises big.Int.SetUint64() existing in Go at least since 1.7 (min supported by decimal): https://pkg.go.dev/math/big@go1.7#Int.SetUint64
Improves tests of existing constructors from signed int, covering the minimal negative value.

@serprex
Copy link
Contributor

serprex commented Apr 5, 2024

Similar to #131 (but less reformat noise), but the other PR also contains a nice fix for clickhouse

@mwoss
Copy link
Member

mwoss commented Apr 7, 2024

Agree, that fix for Clickhouse would be great to introduce in the 1.4.0 release too :3 I think we could merge this PR and I'll ask @Bububuger for the fix in the new PR, so you both could get contributor credits :D
(Tbh I think the precision parameter in the previous PR is not necessary tho and this PR adds the needed unit test too)

Copy link
Member

@mwoss mwoss left a comment

Choose a reason for hiding this comment

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

Looks good :3 Thanks for your contribution!

@mwoss mwoss mentioned this pull request Apr 7, 2024
@mwoss mwoss merged commit 80ec940 into shopspring:master Apr 8, 2024
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.

None yet

3 participants