Created
August 10, 2017 06:32
-
-
Save anonymous/47950508844fe8791e331f479a06347d to your computer and use it in GitHub Desktop.
the description for this gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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