Я использую Slick 3.0: https://github.com/slick/slick/tree/ 3.0.0а>
Примеры кодов выглядят так:
class Coffees(tag: Tag) extends Table[(String, Double)](tag, "COFFEES") {
def name = column[String]("COF_NAME", O.PrimaryKey)
def price = column[Double]("PRICE")
def * = (name, price)
}
val coffees = TableQuery[Coffees]
val coffeeNames: Future[Seq[Double]] = db.run(
coffees.map(_.price).result
)
Я думаю, что метод result
в coffees.map(_.price).result
описан здесь:
http://www.scala-lang.org/api/2.11.5/index.html#scala.collection.mutable.Builder@result():To
который является методом класса Builder
.
Однако coffees.map(_.price)
является классом Query
, а не классом Builder
, а класс Query
не является подклассом класса Builder
. Более того, кажется, что неявного преобразования из класса Query
в класс Builder
не существует. А в классе Query
нет метода result
.
Так как же result
применяется к объекту Query
. У кого-нибудь есть идеи по этому поводу?