Skip to content

Instantly share code, notes, and snippets.

Created Aug 10, 2017
What would you like to do?
the description for this gist
val slickInterpreter = new Language[Future] {
/// I've skipped the Slick related part, you probably seen it 100 times already
private val slickPersonQuery = TableQuery[SlickPersonTable]
override type QueryObj = Query[SlickPersonTable, Person, Seq]
override def people(): Future[Raw] = {
override def filterByIds(query: Future[Raw], ids: Seq[Int]): Future[WithFilter] = { inSet ids)).map(WithFilter)
override def paginate(query: Future[WithFilter], skip: Int, limit: Int): Future[WithPagination] = {
override def run(query: Future[WithPagination]): Future[Seq[Person]] = {
query.flatMap { case finalQuery =>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment