Hi there,
I was wondering what approach you would recommend for adding update conditions to an Ecto changeset that do not just check for equality but maybe do a comparison with the < operator or use the SQL keyword LIKE.
What I’m trying to do is allow the update of a database record only if a particular integer field is smaller or equal to a specific value. I tried putting something like %{field: “<n”} or %{field: 0…n} in Ecto.Changeset.filters but obviously Ecto was unable to do anything with those statements. The great advantage of filters is of course that you don’t need to query the database twice.