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?
queryis just an SQL query. You first have to execute it. Then you can pattern match results or use the parser to create the objects you want. The usage depends on what you are trying to do. You should perhaps read again the anorm tutorial. If it's not clear for you, you should edit your code snippet to explain your goal.