(ctx context.Context, name string, value any)
| 568 | } |
| 569 | |
| 570 | func (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 | |
| 576 | func (c chainG[T]) Updates(ctx context.Context, t T) (rowsAffected int, err error) { |
| 577 | res := c.g.apply(ctx).Updates(t) |