You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When defining generated attributes for a resource, I often see people needing to manually edit the migration to use ALTER TABLE to explicitly add the column with the SQL statement used to populate the column.
Describe the solution you'd like
A way to in an Ash resource to define an attribute that is generated, specify the raw SQL statement to populate the field, and have the generated migration use the Ecto syntax for configuring such a column shown here
Describe alternatives you've considered
Continue manually changing migrations or replace generated attribute with calculations that are not persisted in a column
Express the feature either with a change to resource syntax, or with a change to the resource interface
Dak425
changed the title
Add an attribute option to make the attribute a persisted calculation in a sense
Add a way to persist a calculation for a resource
Sep 10, 2024
Is your feature request related to a problem? Please describe.
When defining generated attributes for a resource, I often see people needing to manually edit the migration to use ALTER TABLE to explicitly add the column with the SQL statement used to populate the column.
Describe the solution you'd like
A way to in an Ash resource to define an attribute that is generated, specify the raw SQL statement to populate the field, and have the generated migration use the Ecto syntax for configuring such a column shown here
Describe alternatives you've considered
Continue manually changing migrations or replace generated attribute with calculations that are not persisted in a column
Express the feature either with a change to resource syntax, or with a change to the resource interface
Idea 1 -
generate_with
attribute optionUsing calculation
Using raw SQL
Idea 2 -
persist
calculation optionAdditional context
Link to the start of the conversation in the Elixir Discord server that lead to this proposal: message
The text was updated successfully, but these errors were encountered: