~/talk

Implementing the Active Slick

Talkat Scala.IO 2014 · 2014-10-23..10-24· [databases]
slides:none on file

Shows a concrete implementation of a type-safe Active Record for Scala using Slick: code on GitHub and an activator template, table-query extensions that auto-assign IDs, and a small lens-based mechanism (Mon-style) to extract and set ID fields. Uses the cake pattern to inject Slick drivers, generalizes ID column types, and adds optimistic locking with version columns. Library reduces repetitive insert/copy code, is used in production, and exposes save/delete/find methods that actually work.

AI-written summary · about

  1. 0:00Introduction
  2. 2:57Slick’s immutable data model
  3. 4:04Object lifecycle and CRUD
  4. 8:18ID assignment challenges
  5. 11:28Extending Slick with ID tables
  6. 14:18Active Record pattern in Slick
  7. 16:25Implementing save in Active Slick
  8. 19:23Generic entity support
  9. 22:44Reducing boilerplate
  10. 24:31Cake pattern for driver injection
  11. 26:17Simplifying ID handling
  12. 28:06Monocle for ID lens
  13. 31:28Active Slick consequences
  14. 32:14Optimistic locking with versioning
  15. 35:50Library availability
  16. 37:36Q&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.