(ResultSet keys)
| 4973 | //------------------------------------------------------------------------- |
| 4974 | |
| 4975 | private static List<List<Object>> calculateKeys(ResultSet keys) throws SQLException { |
| 4976 | // Prepare a list to contain the auto-generated column |
| 4977 | // values, and then fetch them from the statement. |
| 4978 | List<List<Object>> autoKeys = new ArrayList<>(); |
| 4979 | int count = keys.getMetaData().getColumnCount(); |
| 4980 | |
| 4981 | // Copy the column values into a list of a list. |
| 4982 | while (keys.next()) { |
| 4983 | List<Object> rowKeys = new ArrayList<>(count); |
| 4984 | for (int i = 1; i <= count; i++) { |
| 4985 | rowKeys.add(keys.getObject(i)); |
| 4986 | } |
| 4987 | |
| 4988 | autoKeys.add(rowKeys); |
| 4989 | } |
| 4990 | return autoKeys; |
| 4991 | } |
| 4992 | |
| 4993 | private Statement createStatement(Connection connection) throws SQLException { |
| 4994 | if (resultSetHoldability == -1) { |
no test coverage detected