We`re pleased to announce the release of the 0.1.5 version of ScalaPrimavera

In this release we include a new class: DSLjdbcTemplate.

With this class you can make funny things like:

  1. val user = template.queryForObject("select * from users where id = :id")
  2. .parameters("id" -> 4567)
  3. .mappedWith((set, i) => {
  4. new User(set.getInt("id"),set.getString("first_name"),set.getString("last_name"),set.getInt("age"))
  5. })

Or if you prefer you can use infix notation:

  1. val user = template queryForObject "select * from users where id = :id" parameters "id" -> 4567 mappedWith {
  2. (set, i) => {
  3. new User(set.getInt("id"),set.getString("first_name"),set.getString("last_name"),set.getInt("age"))
  4. }
  5. }

Grab you copy, check the docs on GitHub, have fun