- Sort Score
- Num 10 results
- Language All
Results 1 - 2 of 2 for InstanceSet (0.06 seconds)
-
callbacks/transaction.go
db.Statement.ConnPool = tx.Statement.ConnPool db.InstanceSet("gorm:started_transaction", true) } else if tx.Error == gorm.ErrInvalidTransaction { tx.Error = nil } else { db.Error = tx.Error } } } func CommitOrRollbackTransaction(db *gorm.DB) { if !db.Config.SkipDefaultTransaction { if _, ok := db.InstanceGet("gorm:started_transaction"); ok { if db.Error != nil { db.Rollback()Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Mon Nov 29 01:33:20 GMT 2021 - 675 bytes - Click Count (0) -
gorm.go
return db.Statement.Settings.Load(key) } // InstanceSet store value with key into current db instance's context func (db *DB) InstanceSet(key string, value interface{}) *DB { tx := db.getInstance() tx.Statement.Settings.Store(fmt.Sprintf("%p", tx.Statement)+key, value) return tx } // InstanceGet get value with key from current db instance's context func (db *DB) InstanceGet(key string) (interface{}, bool) {
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Tue Aug 26 06:24:29 GMT 2025 - 12.8K bytes - Click Count (0)