u/GiraffeFireAlchemistin r/elixir • Recommends
SQL Grouping Sets & Ecto Fragments: Phoenix App from Scratch, Episode 7
#phoenixliveview#ecto#postgres
6.6K subscribers • 19 videos on Hallway
Intermediate. Assumes working knowledge.
1.4K views1 year ago1 recommendation
Web developmentDatabases and dataElixir and ErlangPostgresSQL
How to use Postgres grouping sets and Ecto fragments to calculate rolling balances in a Phoenix LiveView application.
[series] Build a complete budget tracking app in Phoenix LiveView! In this episode, we create a dedicated budget period view and implement advanced database aggregation to calculate rolling balances across budget periods! Along the way, we'll cover: - Moving functionality from one LiveView to another - Using Ecto fragments for Postgres specific features - How grouping sets can be used for efficient aggregation - Refactoring a changeset for validations - Calculating rolling balances with functional programming - Database query optimization techniques - Component reusability across LiveViews Links Screen recording software I use (affiliate): screen.studio/@Yy75o Project repo: github.com/ChristianAlexander/tutorial-budget-app Related changes: github.com/ChristianAlexander/tutorial-budget-app/pull/13 Related Documentation Ecto Fragments: hexdocs.pm/ecto/Ecto.Query.html#module-fragments Postgres grouping sets: postgresql.org/docs/current/queries-table-expressions.html#Q… Timestamps Context and setup - Implement get_budget_period - Pulling the right transactions - Ecto fragments - Bring back edit and delete - Better navigation - Refactor: enforce budget boundaries - Remove old table - Monthly grouping - Postgres grouping sets - Wire up the summaries - Calculate rolling balances - Zip and drop explained - Wire up the balances -What people say. Recommended as a helpful tutorial on using Ecto fragments and advanced SQL grouping sets in Elixir applications.
u/GiraffeFireAlchemistin r/elixir • Recommends