In the following code ... (taken from Scala Play Tutorial)
object Task {
val task = {
get[Long]("id") ~
get[String]("label") map {
case id~label => Task(id, label)
}
}
...
def create(label:String) {
DB.withConnection { implicit c =>
SQL("insert into task (label) values ({label})").on(
'label -> label
).executeUpdate()
}
}
Does the 'label -> label
mean insert the map { id : label }
?
I suppose the purpose is to write more concise code?