mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-03 23:20:26 +08:00
优化自增锁性能
This commit is contained in:
@@ -97,7 +97,13 @@ func (this *Setup) Run() error {
|
||||
}
|
||||
for _, db := range config.DBs {
|
||||
// 可以同时运行多条语句
|
||||
db.Dsn += "&multiStatements=true"
|
||||
if !strings.Contains(db.Dsn, "multiStatements=") {
|
||||
if strings.Contains(db.Dsn, "?") {
|
||||
db.Dsn += "&multiStatements=true"
|
||||
} else {
|
||||
db.Dsn += "?multiStatements=true"
|
||||
}
|
||||
}
|
||||
}
|
||||
dbConfig, ok := config.DBs[Tea.Env]
|
||||
if !ok {
|
||||
|
||||
Reference in New Issue
Block a user