Preventing you from running write actions against your slave database, at compile time.
Scala
Latest commit 0d01429 Feb 13, 2016 @dwestheide Update README.md
Permalink
Failed to load latest commit information.
project Initial commit Jun 21, 2015
src/main Restrict allowed effect types by role Jun 24, 2015
.gitignore Initial commit Jun 21, 2015
LICENSE Add license file Jun 24, 2015
README.md Update README.md Feb 13, 2016
build.sbt Initial commit Jun 21, 2015

README.md

This is a tiny, over-simplified example demonstrating how to prevent at compile time that you are writing to your slave database, leveraging Slick's DB action effect types.

Please read my corresponding blog post, Put your writes where your master is: Compile-time restriction of Slick effect types for more information.

Usage

The main goal of this is to show how to provoke compile errors when trying to run undesired actions against a certain database. If you want to do more than compiling and actually run the application, you need to install H2 and run it in server mode. On OS X, with Homebrew, it is as simple as this:

brew install h2
h2