public ResultSetRecordSet(final ResultSet rs, final RecordSchema readerSchema) throws SQLException { this.rs = rs; moreRows = rs.next(); this.schema = createSchema(rs, readerSchema); rsColumnNames = new HashSet<>(); final ResultSetMetaData metadata = rs.getMetaData(); for (int i = 0; i < metadata.getColumnCount(); i++) { rsColumnNames.add(metadata.getColumnLabel(i + 1)); } }
public ResultSetRecordSet(final ResultSet rs, final RecordSchema readerSchema) throws SQLException { this.rs = rs; moreRows = rs.next(); this.schema = createSchema(rs, readerSchema); rsColumnNames = new HashSet<>(); final ResultSetMetaData metadata = rs.getMetaData(); for (int i = 0; i < metadata.getColumnCount(); i++) { rsColumnNames.add(metadata.getColumnLabel(i + 1)); } }