我得到了這個類似的問題,但它並沒有幫助我。 (Anorm parse float values)。
我可以誠實地說,我不明白這個問題的解決方案。
我得到這個complie時錯誤:無法找到參數c的隱式值:anorm.Column [Float]
could not find implicit value for parameter c: anorm.Column[Float]
在
def getInformation(id: Long): List[(Float, Float, Float)] = {
DB.withConnection { implicit con =>
val query = SQL("select principal,interest,value from myTable where userId={id} and status=true").on("id"->id)
val result = query().map { row =>
Tuple3(row[Float]("principal"), row[Float]("inetrest"), row[Float]("value"))
// ^
}.toList
return result
}
}
您是否在您的作用域中標記爲隱式的所述類型的變量? (只需在'val'前加'implicit') – bluenote10
你需要這個問題的更多幫助嗎? – bluenote10