1、数据库PG切换为达梦的修改版本。
This commit is contained in:
@@ -22,6 +22,18 @@ public class JsonbUtil {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 达梦数据库:TEXT/CLOB 列返回 dm.jdbc.driver.DmdbNClob 对象,
|
||||
// toString() 只返回对象引用而非实际内容,必须通过 Clob 接口读取
|
||||
if (value instanceof java.sql.Clob) {
|
||||
try {
|
||||
java.sql.Clob clob = (java.sql.Clob) value;
|
||||
long length = clob.length();
|
||||
value = length > 0 ? clob.getSubString(1, (int) length) : "";
|
||||
} catch (Exception e) {
|
||||
value = value.toString();
|
||||
}
|
||||
}
|
||||
|
||||
// 如果已经是字符串,直接返回
|
||||
if (value instanceof String) {
|
||||
String strValue = (String) value;
|
||||
|
||||
Reference in New Issue
Block a user