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

Method UpdateColumns

finisher_api.go:433–438  ·  view source on GitHub ↗
(values interface{})

Source from the content-addressed store, hash-verified

431}
432
433func (db *DB) UpdateColumns(values interface{}) (tx *DB) {
434 tx = db.getInstance()
435 tx.Statement.Dest = values
436 tx.Statement.SkipHooks = true
437 return tx.callbacks.Update().Execute(tx)
438}
439
440// Delete deletes value matching given conditions. If value contains primary key it is included in the conditions. If
441// value includes a deleted_at field, then Delete performs a soft delete instead by setting deleted_at with the current

Callers 7

ReplaceMethod · 0.80
DeleteMethod · 0.80
TestSetColumnFunction · 0.80
TestUpdateColumnFunction · 0.80
TestOmitWithUpdateColumnFunction · 0.80
TestToSQLFunction · 0.80

Calls 3

getInstanceMethod · 0.95
ExecuteMethod · 0.80
UpdateMethod · 0.65

Tested by 5

TestSetColumnFunction · 0.64
TestUpdateColumnFunction · 0.64
TestOmitWithUpdateColumnFunction · 0.64
TestToSQLFunction · 0.64