Refactor db package (#35380)

Remove unnecessary code
This commit is contained in:
wxiaoguang authored and GitHub committed 2025-08-30 01:04:06 +08:00
1 parent aef4a3514c
commit 1f50048ac9
11 files changed
+37 -52

No files matched your search

-6
View File
@@ -12,7 +12,6 @@ import (
"strings"
"xorm.io/xorm"
"xorm.io/xorm/schemas"
_ "github.com/go-sql-driver/mysql" // Needed for the MySQL driver
_ "github.com/lib/pq" // Needed for the Postgresql driver
@@ -67,11 +66,6 @@ var (
_ Engine = (*xorm.Session)(nil)
)
// TableInfo returns table's information via an object
func TableInfo(v any) (*schemas.Table, error) {
return xormEngine.TableInfo(v)
}
// RegisterModel registers model, if initFuncs provided, it will be invoked after data model sync
func RegisterModel(bean any, initFunc ...func() error) {
registeredModels = append(registeredModels, bean)