MCPcopy
hub / github.com/go-gorm/gorm / Updates

Method Updates

finisher_api.go:420–424  ·  view source on GitHub ↗

Updates updates attributes using callbacks. values must be a struct or map. Reference: https://gorm.io/docs/update.html#Update-Changed-Fields

(values interface{})

Source from the content-addressed store, hash-verified

418
419// Updates updates attributes using callbacks. values must be a struct or map. Reference: https://gorm.io/docs/update.html#Update-Changed-Fields
420func (db *DB) Updates(values interface{}) (tx *DB) {
421 tx = db.getInstance()
422 tx.Statement.Dest = values
423 return tx.callbacks.Update().Execute(tx)
424}
425
426func (db *DB) UpdateColumn(column string, value interface{}) (tx *DB) {
427 tx = db.getInstance()

Callers

nothing calls this directly

Calls 3

getInstanceMethod · 0.95
ExecuteMethod · 0.80
UpdateMethod · 0.65

Tested by

no test coverage detected