How to read all entities from Query [TableType] or from Query [TableType, EntityType, Seq] in slick 3.0.0? The textbook had a βresultβ, but it was not defined after all the configurations.
Edit:
I tried using qbooks.result and (for (book <- qbooks) yield (book)). Result from this model:
import java.sql.Date import slick.driver.H2Driver.api._ import slick.backend.DatabasePublisher import slick.driver.JdbcProfile import entities._ object tables { private val db = Database.forConfig("h2db") //one of the table queries val qbooks = TableQuery[Books] db.run( DBIO.seq( qbooks.schema.create, ... ) ) //one of the tables class Books(tag: Tag) extends Table[Book](tag, "books") { def isbn = column[Int]("isbn", O.PrimaryKey, O.AutoInc) def author = column[String]("author") def title = column[String]("title") def year = column[Int]("edition_year") def amount = column[Int]("amount") def * = (isbn, author, title, year, amount) <> (Book.tupled, Book.unapply) }
source share