خرید بک لینک

Vote count: 0

I am trying to implement a function with Slick3 to retu a tuple.

def executeQueryConfig2[T](sql: String, f : Option[T] => Unit): Future[T] = {
val action2 = sql"""$sql""".as[T].headOption
getDatabase(config).run(action2).mapTo[T].map(f(_)).recover{ case e: SQLException => println(e.getMessage) }
.......
}

The compiler shows the error:

Error:(66, 35) could not find implicit value for parameter rconv: slick.jdbc.GetResult[T]
val action2 = sql"""$sql""".as[T].headOption
                              ^

If T is the type in types which have been implemented by the slick 3, how I implement such function?

Thanks.

asked 1 min ago

- - , .
.

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 21 تير 1395 ساعت: 14:07

صفحه بندی