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())
{{#tags}}- {{label}}
{{/tags}}