yes, does the trick. Only missing feature is the ...
# announcements
n
yes, does the trick. Only missing feature is the "multiple resources in a single try expression" aka
try (Connection c = getConnection(); ResultSet rs = getRS(c, query) { while (rs.next()) { ... } }
e
nkiesel: If I were writing a lot of this kind of code then I'd write a couple of helper inline functions for myself, so that my actual DB-access code is clean and beautiful like:
Copy code
withConnection {
    forEachRow(query) { 
         // do something with it
    }
    forEachRow(anotherQuery) { 
         // do something with it
    }
}
In Kotlin you don't have to suffer with repeating bolierplate code.