Skip to content

Commit

Permalink
enable prepared statements in gorm config
Browse files Browse the repository at this point in the history
  • Loading branch information
sd-cyberinc committed Feb 5, 2021
1 parent a743f3a commit 36ce91f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (app *App) initializeDB() error {
var db *gorm.DB
err := retry.Do(3, time.Second*15, func() error {
var err error
dbconf := &gorm.Config{}
dbconf := &gorm.Config{PrepareStmt: true}
if strings.ToLower(app.Config.GetString("LOG_LEVEL")) == "trace" {
dbconf.Logger = glogger.Default.LogMode(glogger.Info)
}
Expand Down

0 comments on commit 36ce91f

Please sign in to comment.