fix(db-query-value): 清理 query_value 合并冲突并保持零日期处理

This commit is contained in:
tianqijiuyun-latiao
2026-03-07 13:07:00 +08:00
parent cc201f3df6
commit adab24085e

View File

@@ -1,4 +1,4 @@
package db
package db
import (
"encoding/hex"
@@ -129,16 +129,6 @@ func normalizeCompositeQueryValue(v interface{}) interface{} {
return stringer.String()
}
return fmt.Sprintf("%v", v)
case reflect.Struct:
// 部分驱动(如 Kingbase会返回复杂结构体值直接透传会导致前端渲染和比较开销激增。
// 统一降级为可读字符串,避免对象深层序列化触发 UI 卡顿。
if tm, ok := v.(time.Time); ok {
return tm.Format(time.RFC3339Nano)
}
if stringer, ok := v.(fmt.Stringer); ok {
return stringer.String()
}
return fmt.Sprintf("%v", v)
default:
return normalizeUnsafeIntegerForJS(rv, v)
}