How do I translate this SQL to ecto query
SELECT *
FROM table_name
WHERE table_name.the_date > DATE_SUB(NOW(), INTERVAL 1 DAY)
without using fragment.
This works for me but I am wondering is there is a ecto idiomatic way to do this kind of query.
iex(22)> query = from n in Table,
...(22)> where: fragment("updatedAt > DATE_SUB(now(), INTERVAL 1 DAY)"),
...(22)> select: n;