Hello, i just have on doubt, is about code design, i have this case:
def searched_for?(user_id, term) do
search_length = from(se in Project.Search,
where: ilike(se.keywords, ^"%#{term}%") and se.user_id == ^user_id,
select: se.id)
|> Project.Repo.all
|> length
search_length > 0
end
As your guys can see i needed create the variable search_length
to compare in the final result, have some way to put arythmetic operators in the pipe operator ? i tried |> >(0)
and |> != 0
but without succeded.