支持lru缓存

This commit is contained in:
xiezhaodong 2025-04-14 20:17:12 +08:00
parent 565375dfb7
commit e284eebbc5

View File

@ -62,6 +62,9 @@ func (db *PreparedStmtDB) GetDBConn() (*sql.DB, error) {
func (db *PreparedStmtDB) Close() {
db.Mux.Lock()
defer db.Mux.Unlock()
if db.Stmts == nil {
return
}
for _, stmt := range db.Stmts.AllMap() {
go func(s *Stmt) {