Chore: Clean up unused parts of xorm/core (#104260)

* remove unused part of xorm

* remove onlytodb and onlyfromdb tags

* only keep snapemapper, since we always assumed it is the only one available in xorm
This commit is contained in:
Serge Zaitsev
2025-04-22 11:37:07 +02:00
committed by GitHub
parent fc9f32a9f6
commit 1d180c0611
6 changed files with 1 additions and 279 deletions

View File

@ -30,8 +30,7 @@ type Engine struct {
TagIdentifier string
Tables map[reflect.Type]*core.Table
mutex *sync.RWMutex
Cacher core.Cacher
mutex *sync.RWMutex
showSQL bool
showExecTime bool
@ -371,13 +370,6 @@ func (engine *Engine) autoMapType(v reflect.Value) (*core.Table, error) {
}
engine.Tables[t] = table
if engine.Cacher != nil {
if v.CanAddr() {
engine.GobRegister(v.Addr().Interface())
} else {
engine.GobRegister(v.Interface())
}
}
}
return table, nil
}
@ -437,7 +429,6 @@ func (engine *Engine) mapType(v reflect.Value) (*core.Table, error) {
Nullable: true,
IsPrimaryKey: false,
IsAutoIncrement: false,
MapType: core.TWOSIDES,
Indexes: make(map[string]int),
DefaultIsEmpty: true,
}