entc/gen: remoev unnecessary type arguments (#3503)

This commit is contained in:
Ariel Mashraki
2023-04-25 13:46:29 +03:00
committed by GitHub
parent 6198beb484
commit a675412c96
435 changed files with 580 additions and 580 deletions

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.