SQL in Java 8: ResultSet Streams. With Java 8, writing SQL will change fundamentally, no matter what API you're using. List<Schema> result = new ArrayList<>(); try (Connection c = getConnection()) { String sql = "select schema_name, is_default " + "from information_schema.schemata " + "order by schema_name"; try (PreparedStatement stmt = c.prepareStatement(sql); ResultSet rs = stmt.executeQuery())
![Write SQL in Java 8 using ResultSet Streams.](https://cdn-ak-scissors.b.st-hatena.com/image/square/56f412150f491a5c8303e4cc56c6cc7894d4f90c/height=288;version=1;width=512/https%3A%2F%2Fwww.jooq.org%2Fimg%2Fjooq-logo-white-750x750-padded.png)