Book Image

Mastering play framework for scala

By : Shiti Saxena
Book Image

Mastering play framework for scala

By: Shiti Saxena

Overview of this book

Table of Contents (21 chapters)
Mastering Play Framework for Scala
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Getting Started with Play
Index

Slick


According to Slick's website (http://slick.typesafe.com/doc/2.1.0/introduction.html#what-is-slick):

Slick is Typesafe's modern database query and access library for Scala. It allows you to work with stored data almost as if you were using Scala collections while at the same time giving you full control over when a database access happens and which data is transferred. You can also use SQL directly.

When using Scala instead of raw SQL for your queries you benefit from compile-time safety and compositionality. Slick can generate queries for different backend databases including your own, using its extensible query compiler.

We can use Slick in our Play application through the play-slick plugin. The plugin provides some additional features for the use of Slick in a Play application. According to https://github.com/playframework/, play-slick consists of three features:

  • A wrapper DB object that uses the datasources defined in the Play config files, and pulls them from a connection pool. It...