SHARE
TWEET

Untitled

a guest Jul 22nd, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. val messageIdsInAgoraQuery = quote {
  2.       query[ClientMessages]
  3.         .leftJoin(query[Comments])
  4.         .on {
  5.           case (messages, comments) => messages.messageId == comments.commentId
  6.         }
  7.         .map {
  8.           case (messages, maybeComments) => (messages.messageId, maybeComments.map(_.commentId))
  9.         }
  10.         .groupBy {
  11.           case (messageId, _) => messageId
  12.         }
  13.         .map {
  14.           case (messageId, rows) => (messageId, rows.map(_._2).size)
  15.         }
  16.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top