Let's say I have this query:
User
|> where([u], u.name == "John" or u.age == 24)
I want to turn this into a function that can take a keyword list of field names and field values and dynamically generate this same query. The function definition would look something like this:
def where_any(query, field_names_to_values) do
...
end
Is this possible with Elixir and Ecto?