perf(scan): 使用缓存减少对象扫描
抽取函数,优化变量命名 支持了传入数组类型
This commit is contained in:
9
types.go
9
types.go
@@ -1,6 +1,7 @@
|
||||
package tdmap
|
||||
|
||||
type TableRowMateria struct {
|
||||
// TableRowMaterial 表行数据
|
||||
type TableRowMaterial struct {
|
||||
SuperTableName string
|
||||
TableName string
|
||||
|
||||
@@ -11,13 +12,13 @@ type TableRowMateria struct {
|
||||
Values []any // 值
|
||||
}
|
||||
|
||||
// StructMate 静态化的结构体信息
|
||||
type StructMate struct {
|
||||
// StructMeta 静态化的结构体信息
|
||||
type StructMeta struct {
|
||||
UniqueTypeName string // 结构体的唯一标识符
|
||||
|
||||
DBName2IndexCache map[string][]int // db 注解的名称到索引的映射缓存
|
||||
Field2IndexCache map[string][]int // 字段名到索引的映射缓存
|
||||
Filed2DBNameCache map[string]string // 字段名到 db 注解的名称的映射缓存
|
||||
Field2DBNameCache map[string]string // 字段名到 db 注解的名称的映射缓存
|
||||
|
||||
DBAnnotatedNames []string // 包含 db 注解的 属性的名称
|
||||
TaggedFieldNames []string // 包含的 tag 注解的 属性的名称
|
||||
|
||||
Reference in New Issue
Block a user