package callbacks
import "gorm.io/gorm/callbacks"
Index ¶
- func AfterCreate(db *gorm.DB)
- func AfterDelete(db *gorm.DB)
- func AfterQuery(db *gorm.DB)
- func AfterUpdate(db *gorm.DB)
- func BeforeCreate(db *gorm.DB)
- func BeforeDelete(db *gorm.DB)
- func BeforeUpdate(db *gorm.DB)
- func BeginTransaction(db *gorm.DB)
- func BuildQuerySQL(db *gorm.DB)
- func CommitOrRollbackTransaction(db *gorm.DB)
- func ConvertMapToValuesForCreate(stmt *gorm.Statement, mapValue map[string]interface{}) (values clause.Values)
- func ConvertSliceOfMapToValuesForCreate(stmt *gorm.Statement, mapValues []map[string]interface{}) (values clause.Values)
- func ConvertToAssignments(stmt *gorm.Statement) (set clause.Set)
- func ConvertToCreateValues(stmt *gorm.Statement) (values clause.Values)
- func Create(config *Config) func(db *gorm.DB)
- func Delete(config *Config) func(db *gorm.DB)
- func DeleteBeforeAssociations(db *gorm.DB)
- func Preload(db *gorm.DB)
- func Query(db *gorm.DB)
- func RawExec(db *gorm.DB)
- func RegisterDefaultCallbacks(db *gorm.DB, config *Config)
- func RowQuery(db *gorm.DB)
- func SaveAfterAssociations(create bool) func(db *gorm.DB)
- func SaveBeforeAssociations(create bool) func(db *gorm.DB)
- func SetupUpdateReflectValue(db *gorm.DB)
- func Update(config *Config) func(db *gorm.DB)
- type AfterCreateInterface
- type AfterDeleteInterface
- type AfterFindInterface
- type AfterSaveInterface
- type AfterUpdateInterface
- type BeforeCreateInterface
- type BeforeDeleteInterface
- type BeforeSaveInterface
- type BeforeUpdateInterface
- type Config
Functions ¶
func AfterCreate ¶
AfterCreate after create hooks
func AfterDelete ¶
func AfterQuery ¶
func AfterUpdate ¶
AfterUpdate after update hooks
func BeforeCreate ¶
BeforeCreate before create hooks
func BeforeDelete ¶
func BeforeUpdate ¶
BeforeUpdate before update hooks
func BeginTransaction ¶
func BuildQuerySQL ¶
func CommitOrRollbackTransaction ¶
func ConvertMapToValuesForCreate ¶
func ConvertMapToValuesForCreate(stmt *gorm.Statement, mapValue map[string]interface{}) (values clause.Values)
ConvertMapToValuesForCreate convert map to values
func ConvertSliceOfMapToValuesForCreate ¶
func ConvertSliceOfMapToValuesForCreate(stmt *gorm.Statement, mapValues []map[string]interface{}) (values clause.Values)
ConvertSliceOfMapToValuesForCreate convert slice of map to values
func ConvertToAssignments ¶
ConvertToAssignments convert to update assignments
func ConvertToCreateValues ¶
ConvertToCreateValues convert to create values
func Create ¶
Create create hook
func Delete ¶
func DeleteBeforeAssociations ¶
func Preload ¶
func Query ¶
func RawExec ¶
func RegisterDefaultCallbacks ¶
func RowQuery ¶
func SaveAfterAssociations ¶
func SaveBeforeAssociations ¶
func SetupUpdateReflectValue ¶
func Update ¶
Update update hook
Types ¶
type AfterCreateInterface ¶
type AfterDeleteInterface ¶
type AfterFindInterface ¶
type AfterSaveInterface ¶
type AfterUpdateInterface ¶
type BeforeCreateInterface ¶
type BeforeDeleteInterface ¶
type BeforeSaveInterface ¶
type BeforeUpdateInterface ¶
type Config ¶
type Config struct { LastInsertIDReversed bool CreateClauses []string QueryClauses []string UpdateClauses []string DeleteClauses []string }
Source Files ¶
associations.go callbacks.go callmethod.go create.go delete.go helper.go interfaces.go preload.go query.go raw.go row.go transaction.go update.go
- Version
- v1.26.1 (latest)
- Published
- May 7, 2025
- Platform
- linux/amd64
- Imports
- 8 packages
- Last checked
- 1 week ago –
Tools for package owners.