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:
@@ -52,7 +52,7 @@ func (gc *GroupCreate) Mutation() *GroupMutation {
|
||||
|
||||
// Save creates the Group in the database.
|
||||
func (gc *GroupCreate) Save(ctx context.Context) (*Group, error) {
|
||||
return withHooks[*Group, GroupMutation](ctx, gc.sqlSave, gc.mutation, gc.hooks)
|
||||
return withHooks(ctx, gc.sqlSave, gc.mutation, gc.hooks)
|
||||
}
|
||||
|
||||
// SaveX calls Save and panics if Save returns an error.
|
||||
|
||||
@@ -31,7 +31,7 @@ func (gd *GroupDelete) Where(ps ...predicate.Group) *GroupDelete {
|
||||
|
||||
// Exec executes the deletion query and returns how many vertices were deleted.
|
||||
func (gd *GroupDelete) Exec(ctx context.Context) (int, error) {
|
||||
return withHooks[int, GroupMutation](ctx, gd.sqlExec, gd.mutation, gd.hooks)
|
||||
return withHooks(ctx, gd.sqlExec, gd.mutation, gd.hooks)
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
|
||||
@@ -81,7 +81,7 @@ func (gu *GroupUpdate) RemoveUsers(u ...*User) *GroupUpdate {
|
||||
|
||||
// Save executes the query and returns the number of nodes affected by the update operation.
|
||||
func (gu *GroupUpdate) Save(ctx context.Context) (int, error) {
|
||||
return withHooks[int, GroupMutation](ctx, gu.sqlSave, gu.mutation, gu.hooks)
|
||||
return withHooks(ctx, gu.sqlSave, gu.mutation, gu.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
@@ -245,7 +245,7 @@ func (guo *GroupUpdateOne) Select(field string, fields ...string) *GroupUpdateOn
|
||||
|
||||
// Save executes the query and returns the updated Group entity.
|
||||
func (guo *GroupUpdateOne) Save(ctx context.Context) (*Group, error) {
|
||||
return withHooks[*Group, GroupMutation](ctx, guo.sqlSave, guo.mutation, guo.hooks)
|
||||
return withHooks(ctx, guo.sqlSave, guo.mutation, guo.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
|
||||
@@ -58,7 +58,7 @@ func (uc *UserCreate) Mutation() *UserMutation {
|
||||
|
||||
// Save creates the User in the database.
|
||||
func (uc *UserCreate) Save(ctx context.Context) (*User, error) {
|
||||
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.
|
||||
|
||||
@@ -94,7 +94,7 @@ func (uu *UserUpdate) RemoveGroups(g ...*Group) *UserUpdate {
|
||||
|
||||
// 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.
|
||||
@@ -277,7 +277,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