I want to create SQL using the 'between' keywork in Elixir Ecto.
I know how to create sql using like
where: like(t.descript, ^some_description)
But when I try to do it just like
where: between(t.start_date, ^start_date, ^end_date),
I got an invalid msg error
** (Ecto.Query.CompileError) `between(t.start_date(), ^start_date, ^end_date)` is not a valid query expression.**
How can I do it right?
Thanks in advance!
source share