Help with contains case insensitive Query
Hi I'm pretty new to elixir and ash. I'm trying to do a search by title. However I don't know how to make it case insensitive. I saw the Ash contains functions but it uses Ash.CiString. And I'm not sure how to use it.
this is my code read :by_title do argument :title, :string, allow_nil?: false filter expr(contains(title,^arg(:title))) end
this is my code read :by_title do argument :title, :string, allow_nil?: false filter expr(contains(title,^arg(:title))) end
2 Replies
Welcome! 👋 All you need to do is replace
:string
with :ci_string
. 🚀oh 👀 thanks
worked perfectly, thanks alot @frankdugan3