Slick provides a very “Scala” way to do SQL.
I love learning new tools in a REPL environment, so I thought I’d document my workflow here.
Prereq
Steps
Load up a new Ammonite session:
!!! note scala version is 2.12 in this example
Run the following in the amm
session to imports the needed Slick dependencies:
Ok now let’s play! First we need to establish a connection with our PG instance:
Now we can run the examples seen on http://slick.lightbend.com/doc/3.2.3/gettingstarted.html#schema in a live REPL session.