-
Notifications
You must be signed in to change notification settings - Fork 3
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
@check
convenience syntax for record/field-level value constraints
#69
Comments
Could this be done as a piece of syntax that |
Yup, that’s the intention, updated the title/OP to clarify |
jrevels
changed the title
Nov 14, 2022
@check
convenience macro for record/field-level value constraints@check
convenience syntax for record/field-level value constraints
Merged
The implementation in #119 changed a couple things from the design proposed here:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Split out from #20. With Legolas v0.5 (ref #54), we have a much nicer disciplined stance on validation-by-construction, so the path forward for convenient record-level check constraints is much simpler.
We should define a simple helper
@check
that can be used in the following manner:where the field-level
@check
expansion goes from statements like...to statements like:
...where
CheckConstraintError
might look like:The text was updated successfully, but these errors were encountered: