GoFrame框架扩展工具包
go get -u -v -d github.com/happylay-cloud/gf-extend
指定版本
go get github.com/happylay-cloud/[email protected]
或
require github.com/happylay-cloud/gf-extend latest
- 自动注册(无需关心数据源种类)
e, err := gfadapter.NewEnforcerBean()
- 手动注册
e, err := gfadapter.NewEnforcerBean(g.DB())
e, err := gfadapter.NewEnforcerBean(g.DB("sqlite"))
e, err := gfadapter.NewEnforcerBean(g.DB("mysql"))
e, err := gfadapter.NewEnforcerBean(g.DB("pgsql"))
- 自动注册
e, err := gfadapter.NewEnforcer()
- 手动注册
e, err := gfadapter.NewEnforcer(g.DB())
e, err := gfadapter.NewEnforcer(g.DB("mysql"))
e, err := gfadapter.NewEnforcer(g.DB("sqlite"))
e, err := gfadapter.NewEnforcer(g.DB("pgsql"))
gfboot.SingleFileMemoryToLocal("./db", "sqlite3.db", "db/sqlite3.db")
hres.Ok()
hdto.NewPage()