LeJoko
AEAsh Elixir
•Created by LeJoko on 4/24/2023 in #support
What is the "Ash way" to auto update related resources ?
Let's say that I have an invoice (postgres) resource and that it has_many lines. Let's say that I want the total_amount field of my invoice resource to be updated with the sum(amount) of all lines every time that a line is created, updated or deleted. What would be the idiomatic way to do that ? I understand that I should probably use aggregates and changes with an after_action, but I have a bit of a hard time to see exactly how to articulates all the pieces together.
27 replies
AEAsh Elixir
•Created by LeJoko on 1/23/2023 in #support
Ash and MySQL ?
Hi,
I've just discovered Ash, and it looks very interesting. In particular I love the idea of a declarative data model representation. However I've a problem : Im' in an environment where I must use MySQL (well... a Percona xtradb cluster actually). Is it possible to use Ash with MySQL ? Is there a data layer for MySQL (didn't find one) ? Is Ash usable with a db bu twithout a data layer ? Or even, how much work would it be to make a MySQL data layer for Ash ?
Thanks in advance.
3 replies