Elixir Mix cover image

Reusable Ecto Code with Mika Kalathil - EMx 164

Elixir Mix

CHAPTER

Query Reusability

A lot of queries are just like fragments under the hood so they're just calling out to a fragment and if you had that in the context directly we'd probably have double if not more context than we do already. We'd also lose the ability to reuse the functions very easily or else the reusability would just look a bit weird because you're calling other context modules from within a context. You might get cyclical calls to your context essentiallyYes it also I feel like it cleans up the context because I mean otherwise you kind of operate in different layers of abstraction there. It's similar to what I did with ectoshorts which is a library I also introduced at the very bottom of the

00:00
Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner