Merge branch 'yyoshiki41-refactor/engine'
This commit is contained in:
commit
dddc985b86
11
engine.go
11
engine.go
|
@ -1181,17 +1181,6 @@ func (engine *Engine) mapType(v reflect.Value) *core.Table {
|
||||||
return table
|
return table
|
||||||
}
|
}
|
||||||
|
|
||||||
// Map a struct to a table
|
|
||||||
func (engine *Engine) mapping(beans ...interface{}) (e error) {
|
|
||||||
engine.mutex.Lock()
|
|
||||||
defer engine.mutex.Unlock()
|
|
||||||
for _, bean := range beans {
|
|
||||||
v := rValue(bean)
|
|
||||||
engine.Tables[v.Type()] = engine.mapType(v)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsTableEmpty if a table has any reocrd
|
// IsTableEmpty if a table has any reocrd
|
||||||
func (engine *Engine) IsTableEmpty(bean interface{}) (bool, error) {
|
func (engine *Engine) IsTableEmpty(bean interface{}) (bool, error) {
|
||||||
session := engine.NewSession()
|
session := engine.NewSession()
|
||||||
|
|
Loading…
Reference in New Issue