Commit Graph
2 Commits
Author SHA1 Message Date
what 5cdf1cc00d 重构: 虚拟资源改用 NewVirtualResource 显式构造,移除 WithVirtual
WithVirtual(bool) 只是给 New() 打一个标记位,虚拟资源需要的表达式(子查询)没有
承载的地方,之前借用 table string 字段硬拼字符串。改成 NewVirtualResource(res,
code, table, opts...) 专门构造:table 参数直接接收 exp.SQLExpression,
GetTableExpr 对虚拟资源直接用它生成子查询表达式,不用再手工拼括号和字符串;
container/conn/historyRoles 从传入的父资源上直接复用。

GetTableExpr 返回值类型从 exp.LiteralExpression 放宽成 exp.Aliaseable,
兼容 db.T(...)(IdentifierExpression)和 db.L(...)(LiteralExpression)两种
返回值。
2026-08-20 15:58:03 +08:00
what 09f4c40d67 新增 resx 包剩余实现:字段/查询字段/脱敏/变更行等类型及测试
res_field.go/res_field_option.go(字段定义)、res_query_field.go/res_query_field_option.go(查询字段)、res_change_row.go(变更行)、res_mask_field.go(字段脱敏标记)及对应测试文件,配合此前已提交的 resource.go/res_interceptor.go 组成完整的 resx 资源实现包。
2026-07-22 09:11:50 +08:00