mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: remoev unnecessary type arguments (#3503)
This commit is contained in:
@@ -47,7 +47,7 @@ func (uc *UserCreate) Save(ctx context.Context) (*User, error) {
|
||||
if err := uc.defaults(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return withHooks[*User, UserMutation](ctx, uc.sqlSave, uc.mutation, uc.hooks)
|
||||
return withHooks(ctx, uc.sqlSave, uc.mutation, uc.hooks)
|
||||
}
|
||||
|
||||
// SaveX calls Save and panics if Save returns an error.
|
||||
|
||||
@@ -31,7 +31,7 @@ func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete {
|
||||
|
||||
// Exec executes the deletion query and returns how many vertices were deleted.
|
||||
func (ud *UserDelete) Exec(ctx context.Context) (int, error) {
|
||||
return withHooks[int, UserMutation](ctx, ud.sqlExec, ud.mutation, ud.hooks)
|
||||
return withHooks(ctx, ud.sqlExec, ud.mutation, ud.hooks)
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
|
||||
@@ -52,7 +52,7 @@ func (uu *UserUpdate) Mutation() *UserMutation {
|
||||
|
||||
// Save executes the query and returns the number of nodes affected by the update operation.
|
||||
func (uu *UserUpdate) Save(ctx context.Context) (int, error) {
|
||||
return withHooks[int, UserMutation](ctx, uu.sqlSave, uu.mutation, uu.hooks)
|
||||
return withHooks(ctx, uu.sqlSave, uu.mutation, uu.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
@@ -143,7 +143,7 @@ func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
|
||||
|
||||
// Save executes the query and returns the updated User entity.
|
||||
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error) {
|
||||
return withHooks[*User, UserMutation](ctx, uuo.sqlSave, uuo.mutation, uuo.hooks)
|
||||
return withHooks(ctx, uuo.sqlSave, uuo.mutation, uuo.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
|
||||
Reference in New Issue
Block a user