Database access using Slick
Slick or Scala Language-Integrated Connection Kit (apparently) is a Functional Relational Mapping (FRM) library for Scala that makes it possible to work with relational databases using abstractions natural to the Scala language. The library is developed by Typesafe, which is the company founded by Scala's creator Martin Odersky. Working with the library makes working with databases similar to working with Scala's Collections API. The library can be found at the following website:
http://slick.typesafe.com/
To install the library with sbt
, you should add the following to the build.sbt
file library dependencies:
libraryDependencies ++= Seq( "com.typesafe.slick" %% "slick" % "3.0.3", "org.slf4j" % "slf4j-nop" % "1.6.4" )
Plain SQL
Slick supports Plain SQL queries. This basically means that you can write your queries in straight SQL without having to bother with JDBC access. To use them, you need to create a database object first. In our case, you will also need...