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
2 Replies
frankdugan3
frankdugan3•3y ago
Welcome! 👋 All you need to do is replace :string with :ci_string. 🚀
setonics
setonicsOP•3y ago
oh 👀 thanks worked perfectly, thanks alot @frankdugan3

Did you find this page helpful?