How can I perform the follow function using ecto fragments
Transaction
|> Enum.map(& &1.amount - &1.amountPaid)
How can I perform the follow function using ecto fragments
Transaction
|> Enum.map(& &1.amount - &1.amountPaid)
You shouldn’t need fragments. You could do this:
from r in Row, select: %{amount_unpaid: r.amount - r.amount_paid}