I am new to the Slick ORM using version 3.1.1 and in the examples for plain sql I did not see how I can retrieve the value of a database column http://slick.typesafe.com/doc/3.1.1/sql.html . This is my simple example
def listfollowing() = Action.async {
val selectq=sql"""SELECT model,id from carsDB where id=17""".as[(String,Int)]
// I would like to get the value of model back and put it in a Var
// var model= model
database.run(selectq).map {finished=>
// I would like to get the value of model back and put it in a Var
// var model= model
Ok(finished.toString())
}
}
How can I get back the value of the column model so that I could put it in a var or val ?