readOnly { implicit session => sql"select id from members where name = ${name}" .map(rs => rs.long("id")) .single .apply() } scalikeJDBC "Specs2" should { "use infix notation" in { "test" mustEqual "test" } } specs2 val route: Route = get { pathPrefix("item" / LongNumber) { id => // there might be no item for a given id val maybeItem: Future[Option[Item]] = fetchItem(id) akka-http should, inが高階関数 () => Flagment readOnly が高階関数 DBSession => A pathPrefixが高階関数 Directive1