// http://scalikejdbc.org/documentation/query-dsl.html
val o = Order.syntax("o")
val orders = withSQL {
select
.from(Order as o)
.where
.eq(o.productId, 123)
.and
.isNotNull(o.orderedAt)
[tsukaby@tsukamac tmp]% date
2015年 6月27日 土曜日 12時48分46秒 JST
[tsukaby@tsukamac tmp]%
[tsukaby@tsukamac tmp]%
[tsukaby@tsukamac tmp]% wget https://repo1.maven.org/maven2/com/github/tototoshi/play-json4s-native_2.11/0.4.0/play-json4s-native_2.11-0.4.0.pom.sha1
--2015-06-27 12:49:49-- https://repo1.maven.org/maven2/com/github/tototoshi/play-json4s-native_2.11/0.4.0/play-json4s-native_2.11-0.4.0.pom.sha1
Resolving repo1.maven.org... 23.235.47.209
Connecting to repo1.maven.org|23.235.47.209|:443... connected.
HTTP request sent, awaiting response... 200 OK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Person extends SkinnyCRUDMapper[Person] { | |
override def defaultAlias = createAlias("person") | |
override def extract(rs: WrappedResultSet, n: ResultName[Person]): Person = new Person( | |
id = rs.get(n.id), | |
name = rs.get(n.name) | |
) | |
val companyRef = | |
belongsTo[Company](Company, (p, c) => p.copy(company = c)) |
NOTICE: This is just a draft of Skinny framework introduction (written in Japanese for now). English version will be published soon.
https://github.com/seratch/skinny-framework
Skinny Framework は Scala のフルスタックな Web アプリケーション開発フレームワークです。2014/03 を目処に最初の安定バージョン 1.0.0 をリリースするべく精力的に開発しています。(追記: 2014/03/28 に 1.0.0 がリリースされました)