From adab24085efb586641bebb320c2381905fbcd05d Mon Sep 17 00:00:00 2001 From: tianqijiuyun-latiao <69459608+tianqijiuyun-latiao@users.noreply.github.com> Date: Sat, 7 Mar 2026 13:07:00 +0800 Subject: [PATCH] =?UTF-8?q?fix(db-query-value):=20=E6=B8=85=E7=90=86=20que?= =?UTF-8?q?ry=5Fvalue=20=E5=90=88=E5=B9=B6=E5=86=B2=E7=AA=81=E5=B9=B6?= =?UTF-8?q?=E4=BF=9D=E6=8C=81=E9=9B=B6=E6=97=A5=E6=9C=9F=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/db/query_value.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/internal/db/query_value.go b/internal/db/query_value.go index ebe5342..24388e5 100644 --- a/internal/db/query_value.go +++ b/internal/db/query_value.go @@ -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) }