After reading Towards Maintainable Elixir by Saša Jurić and hearing about his famous Repo.transact in some of his talks, I decided it was time to explore this for myself. This post takes into account that you (the reader) are aware and know why and when to use Ecto.
Every project I find myself writing the same bit of code. I love to use case and with statements for conditional control flow across my code base and much prefer to use ok/error tuples over pattern matching on nil. I find it weird that Ecto does not have this included in their API already, however luckily for us, it is easy to key in and extend the Repo module.