Skip to content

Instantly share code, notes, and snippets.

Created August 10, 2017 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/47950508844fe8791e331f479a06347d to your computer and use it in GitHub Desktop.
Save anonymous/47950508844fe8791e331f479a06347d to your computer and use it in GitHub Desktop.
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