Leveling Up With Ecto
summary
Shows concrete Ecto techniques and what actually happens when they run: how repo/query/schema/changeset map to side effects and when database calls occur, examples of composable queries and preloads to avoid N+1s, using nested inserts work to create artists albums and tracks in one go, casting and change sets without schemas for API validation, unique_constraint handling at the DB level, virtual and embedded schemas for flexible forms, and a GitHub repo with runnable sample app and code snippets.
AI-written summary · about
chapters (25)
- 0:00Intro
- 0:25Leveling Up With Ecto
- 5:49Typical use
- 6:42Connect to another data source
- 7:18Add your own Repo functions
- 7:56Work directly with the data
- 9:01Low-level queries
- 9:24Feels a lot like SQL (in a good way)
- 10:49Use to interpolate
- 11:10Might have to think about types
- 12:03Queries are composable
- 14:02The story so far...
- 16:35But you don't always have to use them
- 18:10Associations
- 18:41Seeing the association records
- 20:02How to fix it
- 21:23Inserting new records is a breeze
- 23:19Filter and cast
- 24:45See if it works
- 25:17Validations
- 25:34Constraints
- 28:00Schemaless changesets
- 29:21Phoenix integration
- 31:55Validate, then convert
- 33:40Schemas don't have to have a database table








