Skip to content

Instantly share code, notes, and snippets.

@ctataryn
Created March 15, 2016 18:04
Show Gist options
  • Save ctataryn/a195ac454fc8bd06cc9b to your computer and use it in GitHub Desktop.
Save ctataryn/a195ac454fc8bd06cc9b to your computer and use it in GitHub Desktop.
// implicit val chunkStateType = MappedColumnType.base[ChunkState,String](
// { cs:ChunkState => cs.toString},
// { s: String => ChunkState.valueOf(s).get}
// )
val query =
userDistributionQuery.leftJoin(ChunkTable.query.filter { c => c.state === (ChunkState.ASSIGNED:ChunkState) } )
.on { case ((u_id, d_id), c) => c.distributionId === d_id && c.transcriberId === u_id }
.map { case ((u_id, d_id), c) => c.id.? }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment