From bcc2d4845ffbdfca5b92ea14e8b71c86e8e138ea Mon Sep 17 00:00:00 2001 From: yinheli Date: Thu, 13 Jan 2022 11:34:47 +0800 Subject: [PATCH] feat: disable `PrepareStmt` globally --- pkg/gormx/config.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/gormx/config.go b/pkg/gormx/config.go index 87ce7a2..8a85c19 100644 --- a/pkg/gormx/config.go +++ b/pkg/gormx/config.go @@ -75,7 +75,6 @@ func Config(v *viper.Viper, configureFn ...ConfigureFn) { // MySQLDbConfig for mysql config func MySQLDbConfig(cfg DbConfig) *gorm.DB { db, err := gorm.Open(mysql.Open(cfg.Uri), &gorm.Config{ - PrepareStmt: true, QueryFields: cfg.QueryFields, CreateBatchSize: cfg.CreateBatchSize, NamingStrategy: schema.NamingStrategy{