- Sort Score
- Num 10 results
- Language All
Results 1 - 4 of 4 for AfterUpdate (0.06 seconds)
-
callbacks/update.go
} } } } } // AfterUpdate after update hooks func AfterUpdate(db *gorm.DB) { if db.Error == nil && db.Statement.Schema != nil && !db.Statement.SkipHooks && (db.Statement.Schema.AfterSave || db.Statement.Schema.AfterUpdate) { callMethod(db, func(value interface{}, tx *gorm.DB) (called bool) { if db.Statement.Schema.AfterUpdate { if i, ok := value.(AfterUpdateInterface); ok {Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Sun May 25 07:40:40 GMT 2025 - 9.6K bytes - Click Count (0) -
schema/callbacks_test.go
if !reflect.Indirect(reflect.ValueOf(user)).FieldByName(str).Interface().(bool) { t.Errorf("%v should be true", str) } } for _, str := range []string{"BeforeCreate", "BeforeUpdate", "AfterUpdate", "AfterSave", "BeforeDelete", "AfterDelete", "AfterFind"} { if reflect.Indirect(reflect.ValueOf(user)).FieldByName(str).Interface().(bool) { t.Errorf("%v should be false", str) } }
Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 939 bytes - Click Count (0) -
callbacks/interfaces.go
} type AfterCreateInterface interface { AfterCreate(*gorm.DB) error } type BeforeUpdateInterface interface { BeforeUpdate(*gorm.DB) error } type AfterUpdateInterface interface { AfterUpdate(*gorm.DB) error } type BeforeSaveInterface interface { BeforeSave(*gorm.DB) error } type AfterSaveInterface interface { AfterSave(*gorm.DB) error } type BeforeDeleteInterface interface {Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Thu Aug 27 07:03:57 GMT 2020 - 667 bytes - Click Count (0) -
callbacks/callbacks.go
updateCallback.Register("gorm:update", Update(config)) updateCallback.Register("gorm:save_after_associations", SaveAfterAssociations(false)) updateCallback.Register("gorm:after_update", AfterUpdate) updateCallback.Match(enableTransaction).Register("gorm:commit_or_rollback_transaction", CommitOrRollbackTransaction) updateCallback.Clauses = config.UpdateClauses rowCallback := db.Callback().Row()
Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Sat Mar 21 11:35:55 GMT 2026 - 3.4K bytes - Click Count (0)