member = DB readOnly { implicit session => withSQL { select.from(Member as m) .where.eq(m.id, memberId).and.isNull(m.deletedAt) }.map(Member(m)).single.apply() }
member = DB readOnly { implicit session => sql”””select id, name from member where id = ${memberId} and deleted_at is null””” .map(Member(m)).single.apply() }
No need to google framework specific knowledges - Easy to find the first developer who use it correctly (required background is only Scala basics and SQL)
existing tables via sbt plugin - Logging slow queries, it’s also possible to send data to external services (e.g. Fluentd) - AutoRollback testing support for specs2ɺScalaTest
internally - Inspired by Activate ‘s async API support (2013/7) - Though some introduction examples are already reported, this library is still in the alpha stage.
val member = AsyncDB withPool { implicit session => withSQL { select.from(Member as m) .where.eq(m.id, memberId).and.isNull(m.deletedAt) }.map(Member(m)).single.future() }
still absent. So I just started developing Scala on Rails which is named “Skinny Framework”! Built with Scalatra + ScalikeJDBC + more, API is highly inspired by Rails. http://git.io/skinny