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

Method Update

generics.go:570–574  ·  view source on GitHub ↗
(ctx context.Context, name string, value any)

Source from the content-addressed store, hash-verified

568}
569
570func (c chainG[T]) Update(ctx context.Context, name string, value any) (rowsAffected int, err error) {
571 var r T
572 res := c.g.apply(ctx).Model(r).Update(name, value)
573 return int(res.RowsAffected), res.Error
574}
575
576func (c chainG[T]) Updates(ctx context.Context, t T) (rowsAffected int, err error) {
577 res := c.g.apply(ctx).Updates(t)

Callers

nothing calls this directly

Calls 3

ModelMethod · 0.80
applyMethod · 0.80
UpdateMethod · 0.65

Tested by

no test coverage detected