Call SQL function when dumping custom Ecto type with SQLite and virtual table

I’m not sure it would work in this context, but have you considered using Ecto’s fragment/1?