We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go1.21
2.7.0
Option Yes
package main import ( "database/sql" "fmt" "github.com/gogf/gf/contrib/drivers/mysql/v2" "github.com/gogf/gf/v2/database/gdb" "github.com/gogf/gf/v2/frame/g" ) func main() { if err := gdb.Register("MyBizDriver", &MyBizDriver{}); err != nil { panic(err) } s, err := g.Model("sys_log").One() fmt.Println(s, err) } type MyBizDriver struct { *mysql.Driver } func (d *MyBizDriver) Open(config *gdb.ConfigNode) (db *sql.DB, err error) { config.User = "aaaa" // **bug: 这里就没执行** config.Pass = "bbbb" return d.Driver.Open(config) } func (d *MyBizDriver) decode(s string) string { // 执行字段解密处理逻辑 // ... return s }
config.yaml
database: default: link: "MyBizDriver:root:123456@tcp(127.0.0.1:3306)/test" timezone: "Asia/Shanghai" debug: true
The Open function is not executed
The Open function executed
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Go version
go1.21
GoFrame version
2.7.0
Can this bug be reproduced with the latest release?
Option Yes
What did you do?
config.yaml
What did you see happen?
The Open function is not executed
What did you expect to see?
The Open function executed
The text was updated successfully, but these errors were encountered: