~/talk

Better Data Access with Composable Queries

Talkat Code BEAM America 2022 · 2022-11-03..11-04· [databases]
name:Andrew Ek
links:none on file
slides:none on file

Decomposes Ecto.Query into small composable functions that return a queriable, showing concrete helpers like joins, subqueries and named bindings so callers can write pipelines such as from(:bison) |> by_state_code |> with_last_appointment. Demonstrates using has_named_binding to avoid duplicate joins, creating a base query with soft-delete and running live code where tests pass. Recommends integration tests that assert which records do or don’t return, and positions this pattern as practical for reporting layers.

AI-written summary · about

  1. 0:00Introduction
  2. 4:45Legacy reporting problems
  3. 10:12Composable Ecto queries
  4. 18:54Reusable query functions
  5. 22:46Named bindings in joins
  6. 28:15Base queries and soft deletes
  7. 31:31Testing query builders
  8. 33:17Key takeaways
  9. 35:30Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.