To use dynamic fields you can use the field
macro.
https://hexdocs.pm/ecto/Ecto.Query.API.html#field/2
thing = :points
from a in Foo, where: field(a, ^thing) > 8
To use dynamic fields you can use the field
macro.
https://hexdocs.pm/ecto/Ecto.Query.API.html#field/2
thing = :points
from a in Foo, where: field(a, ^thing) > 8