Skip to content

Instantly share code, notes, and snippets.

@Arakaki
Last active December 22, 2015 01:29
Show Gist options
  • Select an option

  • Save Arakaki/6397073 to your computer and use it in GitHub Desktop.

Select an option

Save Arakaki/6397073 to your computer and use it in GitHub Desktop.
hello scalikejdbcの一部切り抜き
def findNoSkillProgrammers()(implicit session: DBSession = autoSession): List[Programmer] = withSQL {
select
.from(Programmer as p)
.leftJoin(Company as c).on(p.companyId, c.id)
.where.notIn(p.id, select(sqls.distinct(ps.programmerId)).from(ProgrammerSkill as ps))
.and.append(isNotDeleted)
.orderBy(p.id)
}.map(Programmer(p, c)).list.apply()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment