public static String getString(ResultSet rs, int columnIndex){
        try {
            Object obj = rs.getObject(columnIndex);
            if (obj == null) {
                return null;
            }
            if(obj instanceof String){
                return (String) obj;
            }else if (obj instanceof BigDecimal bigDecimal) {
                return bigDecimal.toPlainString();
            } else if (obj instanceof Double d) {
                return BigDecimal.valueOf(d).toPlainString();
            } else if (obj instanceof Float f) {
                return BigDecimal.valueOf(f).toPlainString();
            } else if (obj instanceof Clob) {
                return largeString(rs, columnIndex);
            } else if (obj instanceof byte[]) {
                return largeString(rs, columnIndex);
            } else if (obj instanceof Blob blob) {
                return largeStringBlob(blob);
            } else if (obj instanceof Timestamp || obj instanceof LocalDateTime) {
                return largeTime(obj);
            } else if (obj instanceof SQLXML){
                return ((SQLXML) obj).getString();
            } else {
                return obj.toString();
            }
        } catch (Exception e) {
            log.warn("Failed to parse number:{},", columnIndex, e);
            try {
                return rs.getString(columnIndex);
            } catch (SQLException ex) {
                throw new RuntimeException(ex);
            }
        }
    }
@param rs
@param clazz
@return
@param <T>
chat2db-server/chat2db-spi/src/main/java/ai/chat2db/spi/util/ResultSetUtils.java