remove unnecessary session-level configuration for prepared statements
This commit is contained in:
		
							parent
							
								
									8c4e8e2d2a
								
							
						
					
					
						commit
						e5b867e785
					
				
							
								
								
									
										4
									
								
								gorm.go
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								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) | ||||
| 		} | ||||
| 
 | ||||
|  | ||||
| @ -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 | ||||
| ) | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jinzhu
						Jinzhu