Skip to content

Instantly share code, notes, and snippets.

/post.scala
Created Aug 10, 2017

Embed
What would you like to do?
the description for this gist
val findMiddleUser = new ScalaToLanguageBridge[Seq[Person]] {
override def apply[Wrapper[_]](implicit L: Language[Wrapper]): Wrapper[Seq[Person]] = {
val base = L.people()
val full = L.paginate(L.filterByIds(base, Seq(1,2,3)), skip = 1, limit = 1)
L.run(full)
}
}
val result = Await.result(findMiddleUser.apply(slickInterpreter), 10.seconds)
println(s"Query result is $result")
// Query result is Vector(Person(2,person 2,1990))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.