seratch/scalikejdbc — pull request #71 by gakuzzzz (2013-02-20 10:29:52+00:00)
Title: Added foldLeft method

I want to folding for join queries or map building.

```scala
type EmployeeId = Int
type GroupId = Int

val result: Map[GroupId, Set[EmployeeId]] =
sql"SELECT id, group_id FROM employee".foldLeft(Map.empty[GroupId, Set[EmployeeId]].withDefaultValue(Set.empty)) {
case (map, rs) =>
val gId = rs.int("group_id")
val eId = rs.int("id")
map + (gId -> (map(gid) + eId))
}
```