Ecto custom SQL function

From the viewpoint of Ecto/EctoFunction there is no difference between these two, so in you case it should work like that:

defqueryfunc slugify(value)

from u un user,
  where: slugify(u.administrative) == ^administrative