Essential Slick by Richard Dallaway, Jonathan Ferguson, Underscore Consulting LLP is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Essential Slick is a book to get you started building application using the Slick database library. It is aimed at Scala developers who need to become productive with Slick quickly.
It follows a tutorial style and includes exercises.
You can download the PDF, EPUB, and HTML formats of this book for free from the book web page.
-
Basics
-
Selecting Data
-
Creating and Modifying Data
-
Action Combinators and Transactions
-
Data Modelling
-
Joins and Aggregates
-
Plain SQL
A. Using Different Database Products
B. Solutions to Exercises
This book uses Underscore's ebook build system.
The simplest way to build the book is to use Docker Compose:
- install Docker Compose (
brew install docker-compose
on OS X; or download from docker.com); and - run
go.sh
(ordocker-compose run book bash
ifgo.sh
doesn't work).
This will open a bash
shell running inside the Docker container which contains all the dependencies to build the book. From the shell run:
npm install
; and thensbt
.
To avoid running out of MetaSpace you'll also want to:
export JAVA_OPTS="-Xmx3g -XX:+TieredCompilation -XX:ReservedCodeCacheSize=256m -XX:+UseNUMA -XX:+UseParallelGC -XX:+CMSClassUnloadingEnabled"
Within sbt
you can issue the commands pdf
, html
, epub
, or all
to build the desired format(s) of the book. Targets are placed in the dist
directory.
Essential Slick uses tut to check the Scala code on the book. To avoid running out of MetaSpace you'll also want to:
export JAVA_OPTS="-Xmx3g -XX:+TieredCompilation -XX:ReservedCodeCacheSize=256m -XX:+UseNUMA -XX:+UseParallelGC -XX:+CMSClassUnloadingEnabled"
The source files are in src/pages
.
The tut converted sources are output to target/pages
.