Loading…
Back To Schedule
Saturday, November 18 • 4:00pm - 4:40pm
Implementing a Lazy Functional Language with Combinatory Logic

Sign up or log in to save this to your schedule, view media, leave feedback and see who's attending!

Feedback form is now closed.
Topic Change: Slick Schema Code Generation

In this session, we discuss the use of code generation to remove the pain of writing out Slick database schema when working with or evolving an existing database schema. We'll demo a plugin that, with only a few lines of configuration, enables:
  • generation of tagged id types for primary and foreign keys
  • restricting schema generation to specific tables
  • separation of row and table specifications into distinct compilation units
  • customizable mappings between application and database types

This work arises from real-world experience working with Slick and legacy database schemas. The feelings of safety of having a database schema described in Scala are sometimes dwarfed by the pain of actually having to write and maintain the Scala mappings. This becomes obvious when building a new project with an existing database.

The code generation component is bundled with Slick. However, the documentation and default implementation show only the most trivial use-case and require a more complecated build. With every new project we have updated and expanded on the use-cases the plugin covers. Now, we would like to share what we have built and learned.


Speakers
avatar for Stewart Stewart

Stewart Stewart

Software Consultant, Inner Product LLC
Stewart Stewart is a software developer at Driver, a San Francisco based startup that analyzes tumors and connects cancer patients with personalized medicine. He also helps organize events at SF Scala.


Saturday November 18, 2017 4:00pm - 4:40pm PST
Reactive