diff --git a/src/main/scala/com/typesafe/slick/examples/jdbc/PlainSQL.scala b/src/main/scala/com/typesafe/slick/examples/jdbc/PlainSQL.scala index 261a28b..ee389d2 100644 --- a/src/main/scala/com/typesafe/slick/examples/jdbc/PlainSQL.scala +++ b/src/main/scala/com/typesafe/slick/examples/jdbc/PlainSQL.scala @@ -70,7 +70,7 @@ object PlainSQL extends App { where c.price < ? and s.id = c.sup_id """) // This time we read the result set into a List - val l2 = q2.list(9.0) + val l2 = q2(9.0).list for (t <- l2) println(" " + t._1 + " supplied by " + t._2) // Append to a StaticQuery diff --git a/src/main/scala/com/typesafe/slick/examples/lifted/MultiDBExample.scala b/src/main/scala/com/typesafe/slick/examples/lifted/MultiDBExample.scala index 042c87d..f54b688 100644 --- a/src/main/scala/com/typesafe/slick/examples/lifted/MultiDBExample.scala +++ b/src/main/scala/com/typesafe/slick/examples/lifted/MultiDBExample.scala @@ -27,7 +27,7 @@ class DAO(val driver: JdbcProfile) { def get(k: String)(implicit session: Session): Option[String] = (for(p <- props if p.key === k) yield p.value).firstOption - def getFirst[M, U](q: Query[M, U])(implicit s: Session) = q.first + def getFirst[M, U](q: Query[M, U, Seq])(implicit s: Session) = q.first } /** @@ -37,8 +37,8 @@ class DAO(val driver: JdbcProfile) { class DAOHelper(val d: DAO) { import d.driver.simple._ - def restrictKey(s: String, q: Query[d.Props, (String, String)]): - Query[d.Props, (String, String)] = q.filter(_.key === s) + def restrictKey(s: String, q: Query[d.Props, (String, String),Seq]): + Query[d.Props, (String, String),Seq] = q.filter(_.key === s) } /** diff --git a/src/main/scala/com/typesafe/slick/examples/lifted/UseInvoker.scala b/src/main/scala/com/typesafe/slick/examples/lifted/UseInvoker.scala index 78e799f..b424336 100644 --- a/src/main/scala/com/typesafe/slick/examples/lifted/UseInvoker.scala +++ b/src/main/scala/com/typesafe/slick/examples/lifted/UseInvoker.scala @@ -29,20 +29,20 @@ object UseInvoker extends App { ts.filter(_.k <= k).sortBy(_.k) } - println("List of k/v pairs up to 3 with .list") - println(" " + upTo(3).list) + //println("List of k/v pairs up to 3 with .list") + //println(" " + upTo(3).list) - println("IndexedSeq of k/v pairs up to 3 with .to") - println(" " + upTo(3).buildColl[IndexedSeq]) + //println("IndexedSeq of k/v pairs up to 3 with .buildColl") + //println(" " + upTo(3).buildColl[IndexedSeq]) - println("Set of k/v pairs up to 3 with .to") - println(" " + upTo(3).buildColl[Set]) + //println("Set of k/v pairs up to 3 with .buildColl") + //println(" " + upTo(3).buildColl[Set]) - println("Array of k/v pairs up to 3 with .to") - println(" " + upTo(3).buildColl[Array]) + //println("Array of k/v pairs up to 3 with .buildColl") + //println(" " + upTo(3).buildColl[Array]) - println("All keys in an unboxed Array[Int]") - val allKeys = ts.map(_.k) - println(" " + allKeys.buildColl[Array]()) + //println("All keys in an unboxed Array[Int]") + //val allKeys = ts.map(_.k) + //println(" " + allKeys.buildColl[Array]()) } }