added a test case showing map() in use

This commit is contained in:
James Strachan
2012-08-02 12:21:42 +01:00
parent 7eba9c3896
commit 9a33ca43bb
@@ -68,6 +68,15 @@ class JdbcTest {
}
}
test fun map() {
dataSource.query("select * from foo") {
val rows = it.map { "id: ${it["id"]}" }
for (row in rows) {
println(row)
}
}
}
test fun count() {
dataSource.query("select count(*) from foo") {
println("count: ${it.singleInt()}")