Skip to content

Commit

Permalink
fix: new PreparedStmtDB error
Browse files Browse the repository at this point in the history
PreparedStmtDB Stmts use ptr
  • Loading branch information
9monsters committed Oct 7, 2022
1 parent 62871af commit 17116ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dbresolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (dr *DBResolver) convertToConnPool(dialectors []gorm.Dialector) (connPools

dr.prepareStmtStore[connPool] = &gorm.PreparedStmtDB{
ConnPool: db.Config.ConnPool,
Stmts: map[string]gorm.Stmt{},
Stmts: map[string]*gorm.Stmt{},
Mux: &sync.RWMutex{},
PreparedSQL: make([]string, 0, 100),
}
Expand Down

0 comments on commit 17116ba

Please sign in to comment.