I could do that like this:
update_args = Keyword.new([{f, new}])
from(
a in table,
update: [set: ^update_args],
where: field(a, ^f) == ^old
)
|> MyApp.Repo.update_all([])
I could do that like this:
update_args = Keyword.new([{f, new}])
from(
a in table,
update: [set: ^update_args],
where: field(a, ^f) == ^old
)
|> MyApp.Repo.update_all([])