How to define generic type in Scala?
In Slick 2, we can map tables like this: case class Cooler(id: Option[Int], minTemp: Option[Double], maxTemp: Option[Double]) /** * Define table "cooler". */ class Coolers(tag: Tag) extends Table[Cooler](tag, "cooler") { def id = column[Int]("id", O.PrimaryKey, O.AutoInc) def minTemp = column[Double]("min_temp", O.Nullable) def maxTemp = column[Double]("max_temp", O.Nullable) def * = (id.?, minTemp.?, maxTemp.?) <> (Cooler.tupled, Cooler.unapply _) } object Coolers { val tableQuery = TableQuery[Coolers] } because I have a lot of tables, I want to define generic methods for them, like find ,