()
| 27 | } |
| 28 | |
| 29 | public void query() { |
| 30 | |
| 31 | String SQL = "SELECT * FROM my_view"; |
| 32 | |
| 33 | try (Connection conn = connect(); |
| 34 | Statement stmt = conn.createStatement(); |
| 35 | ResultSet rs = stmt.executeQuery(SQL)) { |
| 36 | while (rs.next()) { |
| 37 | System.out.println(rs.getString("my_column")); |
| 38 | } |
| 39 | } catch (SQLException ex) { |
| 40 | System.out.println(ex.getMessage()); |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | public static void main(String[] args) { |
| 45 | App app = new App(); |
no test coverage detected