Preventing you from running write actions against your slave database, at compile time.
Scala
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
project
src/main
.gitignore
LICENSE
README.md
build.sbt

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