Using Database Dialects within Play Framework

Eishay Smith
Keep It Up
Published in
1 min readJul 18, 2013

This post follows up on the Scala Slick Database Drivers & Type-Safing Session Concurrency post where we discussed the abstraction layer we’re implementing on top of the slick driver and db access. In the post we mention we’re using DatabaseDialect traits in the DataBaseComponent but didn’t explain much more.

Here’s an example DatabaseDialect with two implementations:

Its usage is usually when you have to use raw SQL on some rare occasion. You can always extract the connection out of Slick and query the db directly using StaticQuery and the like:

Originally published at eng.kifi.com on July 18, 2013.

--

--

Eishay Smith
Keep It Up

Founder & CEO at Kifi: Connecting People with Knowledge