The code snippet shown below is supposed to be used to retrieve some data from database.
import anorm._
object Instruction {
def findAll(date:String):List[RealTimeInstruction]={
query = SQL("""
select * from instructions where date > {dd}
""").on("dd"->date)
}
}
Then I would like to use pattern matching to execute the query and process the results.
However, when I attemp to use query.map(...) I get the following:
value map is not a member of anorm SimpleSql.
How can I do it?
You need to create a ResultSetParser to parse the result set into somehting you can pattern match on. perhaps something like