I was working on a Quill project and suddenly I wanted to execute raw SQL. I referred documentation and learn how to do it. When I execute below lines it worked greatly...
def getProjectsFromSql: Future[List[(Index, String)]] ={
val rawQuery = quote(
infix"""SELECT * FROM Project""".as[Query[Project_True]]
)
val result = ctx.run(rawQuery)
result
}
But when I execute below lines, it gives error...
def getProjectsFromSql: Future[List[(Index, String)]] ={
val rawQuery = quote(
infix"""SELECT project_id, name FROM Project""".as[Query[(Int, String)]]
)
val result = ctx.run(rawQuery)
result
}
error
com.github.mauricio.async.db.mysql.exceptions.MySQLException: Error 1054 - #42S22 - Unknown column 'x._1' in 'field list'
I couldn't identify what was the reason for the error. I want to solve this quickly. (My database is mysql)