Slick 2 aggregation - how to get a scalar result?
问题 I have a table with an Int column TIME in it: def time = column[Int]("TIME") The table is mapped to a custom type. I want to find a maximum time value, i.e. to perform a simple aggregation. The example in the documentation seems easy enough: val q = coffees.map(_.price) val q1 = q.min val q2 = q.max However, when I do this, the type of q1 and q2 is Column[Option[Int]] . I can perform a get or getOrElse on this to get a result of type Column[Int] (even this seems somewhat surprising to me - is