diff --git a/gorm.go b/gorm.go index d253736d..63a28b37 100644 --- a/gorm.go +++ b/gorm.go @@ -110,8 +110,6 @@ type DB struct { type Session struct { DryRun bool PrepareStmt bool - PrepareStmtMaxSize int - PrepareStmtTTL time.Duration NewDB bool Initialized bool SkipHooks bool @@ -275,7 +273,7 @@ func (db *DB) Session(config *Session) *DB { if v, ok := db.cacheStore.Load(preparedStmtDBKey); ok { preparedStmt = v.(*PreparedStmtDB) } else { - preparedStmt = NewPreparedStmtDB(db.ConnPool, config.PrepareStmtMaxSize, config.PrepareStmtTTL) + preparedStmt = NewPreparedStmtDB(db.ConnPool, db.PrepareStmtMaxSize, db.PrepareStmtTTL) db.cacheStore.Store(preparedStmtDBKey, preparedStmt) } diff --git a/tests/go.mod b/tests/go.mod index 778e3bca..432e1f79 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -31,8 +31,8 @@ require ( github.com/microsoft/go-mssqldb v1.7.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect - golang.org/x/crypto v0.37.0 // indirect - golang.org/x/text v0.24.0 // indirect + golang.org/x/crypto v0.38.0 // indirect + golang.org/x/text v0.25.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect )