It seems to me that I can return List [User] from a raw SQL query.
implicit val getUserResult = GetResult(r => User(r.nextInt, ....))
sql"""
select * from users where id =1
""".as[User]
This seems like a compilation, but if I change this to return a list, and not a single result, I get an error.
.as[List[User]]
Error:
could not find implicit value for parameter rconv: scala.slick.jdbc.GetResult[List[User]]
How can I change the implicit GetResult to return a list?
Update
So, I created an implicit like:
implicit val getUserResult = GetResult (r => User (r.nextInt, ....))
val query: StaticQuery0 [User] = sql "....."
query.list ()
I can this error:
[PSQLException: Bad value for type int : asdf asdfs]
In psql, I see that I have "asdf asdfs" in some columns, but not in INT columns. If things compile, I'm not sure why I get this error, looks like an error?