WEAKTY WEAKTY
  • posts
  • updates
  • tags
WEAKTY
  • posts
  • updates
  • tags
tagged: ecto
tagged: ecto
tagged: ecto
Refactoring Ecto queries with reduce
2022-07-08

Today I want to share a fun refactor that finally "clicked" for me (and it was right there in plain view for quite some time!). Let me set the stage.


Conditionals in Ecto Queries
2022-05-15

I had a fairly productive refactoring session on a small function that I thought I would write about. In Galley, my recipe/cooking application, I have a home / index page where users can search and view recipes. At the current state, a user can search by recipe name and can filter by all recipes or their recipes. At the moment I am building out a tagging functionality such that a user can search by tags shared between recipes such as spicy, salad, or easy, for example.

With these three sources of permutation, I need to account for a database query that could have a mixed bag of search queries, tags, and filters.


  • All Posts
  • Updates
  • Tags
  • Say Hi
  • RSS
Last compiled 2025-06-24