mirror of https://github.com/go-gorm/gorm.git
parent
33a11767ea
commit
bdb30da0a7
1
gorm.go
1
gorm.go
|
@ -117,6 +117,7 @@ func Open(dialector Dialector, config *Config) (db *DB, err error) {
|
|||
preparedStmt := &PreparedStmtDB{
|
||||
ConnPool: db.ConnPool,
|
||||
Stmts: map[string]*sql.Stmt{},
|
||||
Mux: &sync.RWMutex{},
|
||||
PreparedSQL: make([]string, 0, 100),
|
||||
}
|
||||
db.cacheStore.Store("preparedStmt", preparedStmt)
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
type PreparedStmtDB struct {
|
||||
Stmts map[string]*sql.Stmt
|
||||
PreparedSQL []string
|
||||
Mux sync.RWMutex
|
||||
Mux *sync.RWMutex
|
||||
ConnPool
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue