Documentation ¶ Index ¶ func NewDB(proto string, setting *Setting, opts ...xdb.Option) (obj xdb.IDB, err error) func RegisterDbType(dbType string, reflectType reflect.Type) error type Setting func NewConfig(connName string, opts ...xdb.Option) *Setting Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func NewDB ¶ func NewDB(proto string, setting *Setting, opts ...xdb.Option) (obj xdb.IDB, err error) NewDB 创建DB实例 func RegisterDbType ¶ added in v0.1.36 func RegisterDbType(dbType string, reflectType reflect.Type) error 注册自定义类型转换 Types ¶ type Setting ¶ added in v0.2.3 type Setting struct { ConnName string `json:"-"` Cfg *xdb.Config `json:"-"` // contains filtered or unexported fields } DB 数据库配置 func NewConfig ¶ added in v0.2.3 func NewConfig(connName string, opts ...xdb.Option) *Setting New 构建DB连接信息 Source Files ¶ View all Source files config.go db.go debug.go slow.query.go trans.go Directories ¶ Show internal Expand all Path Synopsis expression implement mysql oracle postgres sqlite sqlserver tpl xgorm Click to show internal directories. Click to hide internal directories.