forked from mirrors/homebox
parent
feab9f4c46
commit
a042496c71
96 changed files with 1650 additions and 491 deletions
|
@ -688,7 +688,7 @@ func (iu *ItemUpdate) RemoveAttachments(a ...*Attachment) *ItemUpdate {
|
|||
// Save executes the query and returns the number of nodes affected by the update operation.
|
||||
func (iu *ItemUpdate) Save(ctx context.Context) (int, error) {
|
||||
iu.defaults()
|
||||
return withHooks[int, ItemMutation](ctx, iu.sqlSave, iu.mutation, iu.hooks)
|
||||
return withHooks(ctx, iu.sqlSave, iu.mutation, iu.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
|
@ -1901,7 +1901,7 @@ func (iuo *ItemUpdateOne) Select(field string, fields ...string) *ItemUpdateOne
|
|||
// Save executes the query and returns the updated Item entity.
|
||||
func (iuo *ItemUpdateOne) Save(ctx context.Context) (*Item, error) {
|
||||
iuo.defaults()
|
||||
return withHooks[*Item, ItemMutation](ctx, iuo.sqlSave, iuo.mutation, iuo.hooks)
|
||||
return withHooks(ctx, iuo.sqlSave, iuo.mutation, iuo.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue