mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 01:02:42 +08:00
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:
@ -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,
|
||||
}
|
||||
|
Reference in New Issue
Block a user