Implemented required_error from postgress to ash core#2636
Implemented required_error from postgress to ash core#2636zachdaniel merged 7 commits intoash-project:mainfrom
Conversation
| - String interpolation | `"#{first_name} #{last_name}"`, is remapped to the equivalent usage of `<>` | ||
| - `fragment/*` | Creates a fragment of a data layer expression. See the section on fragments below. | ||
| - `error/2` | Raises an error with a given exception module and parameters. See the section on error expressions below. | ||
| - `ash_required!/2` | Returns the given value when present, or produces a required-attribute error when it is `nil`. Typically used as `expr(ash_required!(^value, ^attribute))` where `attribute` has at least `:name` and `:resource`. |
There was a problem hiding this comment.
Sorry I keep requesting changes on you! I think the function inside of Ash core itself should just be called required!. The one that ash_postgres defines inside your database should be called ash_required to match how we use the ash_ prefix elsewhere.
There was a problem hiding this comment.
im just seeing this comment now... I will work on this right now
|
What we would then want to do is modify the code in |
|
Did I get this implemented correctly? |
|
Looks like some failing checks to address 😄 |
|
Also worth checking (or having claude check) if there are any other expression patterns that use that |
… it, but github actions doesn't like it.
|
I fixed the formatting issues, and I used Claude to check to see if anything else should use |
|
🚀 Thank you for your contribution! 🚀 |
Closes Issue in postgres:
ash-project/ash_postgres#261
More info can be found in the following PR:
ash-project/ash_postgres#707
Changes:
Contributor checklist
Leave anything that you believe does not apply unchecked.