Skip to content

iammichiel/play-slick

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

This plugin makes Slick a first-class citizen of Play 2.1.

The play-slick plugins consists of 2 parts:

  • DDL schema generation Plugin that works like the Ebean DDL Plugin. Based on config it generates create schema and drop schema SQL commands and writes them to evolutions.
  • A wrapper DB object that uses the datasources defined in the Play config files. It is there so it is possible to use Slick sessions in the same fashion as you would Anorm JDBC connections.

The intent is to get this plugin into Play 2.2 if possible.

Setup

In your application, add "com.typesafe.play" %% "play-slick" % "0.3.3" to the appDependencies in your project/Build.scala file:

val appDependencies = Seq(
  //other deps
  "com.typesafe.play" %% "play-slick" % "0.3.3" 
)

Add slick.default="models.*" and:

db.default.driver=org.h2.Driver
db.default.url="jdbc:h2:mem:play"
db.default.user=sa
db.default.password=""

to application.conf and create a model.

Note that only Play 2.1.1 is supported.

Please read more about usage on the wiki

Copyright

Copyright: Typesafe 2013 License: Apache License 2.0, http://www.apache.org/licenses/LICENSE-2.0.html

About

Slick Plugin for Play

Resources

Stars

Watchers

Forks

Packages

No packages published