feat(java): implement getCharacterStream() in JDBC4ResultSet

This commit is contained in:
kimminseok
2025-10-07 14:06:59 +09:00
parent fcb0323218
commit 2aa76709c2
2 changed files with 49 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
package tech.turso.jdbc4;
import java.io.InputStream;
import java.io.StringReader;
import java.io.Reader;
import java.math.BigDecimal;
import java.math.RoundingMode;
@@ -380,13 +381,17 @@ public final class JDBC4ResultSet implements ResultSet, ResultSetMetaData {
@Override
@SkipNullableCheck
public Reader getCharacterStream(int columnIndex) throws SQLException {
throw new UnsupportedOperationException("not implemented");
final Object result = resultSet.get(columnIndex);
if (result == null) {
return null;
}
return wrapTypeConversion(() -> new StringReader((String) result));
}
@Override
@SkipNullableCheck
public Reader getCharacterStream(String columnLabel) throws SQLException {
throw new UnsupportedOperationException("not implemented");
return getCharacterStream(findColumn(columnLabel));
}
@Override