Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danieldietrich/slick-integration-example
Example on how to use slick-integration with Play
https://github.com/danieldietrich/slick-integration-example
Last synced: about 1 month ago
JSON representation
Example on how to use slick-integration with Play
- Host: GitHub
- URL: https://github.com/danieldietrich/slick-integration-example
- Owner: danieldietrich
- Created: 2012-12-08T09:45:24.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2012-12-10T23:09:05.000Z (almost 12 years ago)
- Last Synced: 2024-05-16T01:07:21.312Z (6 months ago)
- Language: Scala
- Size: 148 KB
- Stars: 13
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Slick Integration Example #
## Usage ##
Currently there are only tests. Start ```play test```.
Also have a look at the [schema generator](https://github.com/danieldietrich/slick-integration-example/blob/master/test/EvolutionsGenerator.scala). Call it as Scala standalone app.
## Dependencies ##
project/Build.scala
```scala
jdbc,
"com.typesafe" % "slick_2.10.0-RC5" % "0.11.2",
"net.danieldietrich" %% "slick-integration" % "1.0-SNAPSHOT"
``````scala
resolvers += "Daniel's Repository" at "http://danieldietrich.net/repository/snapshots"
```## Driver Configuration ##
conf/application.conf
```scala
db {
default {
slick.driver=scala.slick.driver.MySQLDriver
driver=com.mysql.jdbc.Driver
url="jdbc:mysql://localhost/slicktest?characterEncoding=UTF-8"
user="root"
password=""
}
test {
slick.driver=scala.slick.driver.H2Driver
driver=org.h2.Driver
url="jdbc:h2:mem:slicktest"
user="sa"
password=""
}
}
```## Model Implementation ##
see [app/models](https://github.com/danieldietrich/slick-integration-example/tree/master/app/models)
## Example Model Usage ##
see [test/DomainModelSpec.scala](https://github.com/danieldietrich/slick-integration-example/blob/master/test/DomainModelSpec.scala)