Implement getColumnName

This commit is contained in:
김선우
2025-07-06 16:57:33 +09:00
parent 5d858052c1
commit 864fde2633

View File

@@ -1232,14 +1232,17 @@ public final class JDBC4ResultSet implements ResultSet, ResultSetMetaData {
@Override
public String getColumnLabel(int column) throws SQLException {
// TODO
return "";
// TODO: should consider "AS" keyword
return getColumnName(column);
}
@Override
public String getColumnName(int column) throws SQLException {
// TODO
return "";
if (column > 0 && column <= resultSet.getColumnNames().length) {
return resultSet.getColumnNames()[column - 1];
}
throw new SQLException("Index out of bound: " + column);
}
@Override