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

repr: create newtypes for NumericMaxScale and [Var]CharMaxLength #10576

Closed
benesch opened this issue Feb 10, 2022 · 0 comments · Fixed by #10624
Closed

repr: create newtypes for NumericMaxScale and [Var]CharMaxLength #10576

benesch opened this issue Feb 10, 2022 · 0 comments · Fixed by #10624
Labels
A-glue Area: internal glue code C-refactoring Category: replacing or reorganizing code

Comments

@benesch
Copy link
Member

benesch commented Feb 10, 2022

See #10571 for context. It's a bit scary that it's possible to construct a ScalarType::Numeric or ScalarType::[Var]Char with invalid scale/length fields. We should introduce newtypes for these fields that perform the validation on construction.

@benesch benesch added C-refactoring Category: replacing or reorganizing code A-glue Area: internal glue code labels Feb 10, 2022
@benesch benesch mentioned this issue Feb 13, 2022
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-glue Area: internal glue code C-refactoring Category: replacing or reorganizing code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant