mirror of
https://github.com/ent/ent.git
synced 2026-05-28 09:49:08 +03:00
entc/gen: remoev unnecessary type arguments (#3503)
This commit is contained in:
@@ -74,7 +74,7 @@ func (nc *NodeCreate) Mutation() *NodeMutation {
|
||||
|
||||
// Save creates the Node in the database.
|
||||
func (nc *NodeCreate) Save(ctx context.Context) (*Node, error) {
|
||||
return withHooks[*Node, NodeMutation](ctx, nc.sqlSave, nc.mutation, nc.hooks)
|
||||
return withHooks(ctx, nc.sqlSave, nc.mutation, nc.hooks)
|
||||
}
|
||||
|
||||
// SaveX calls Save and panics if Save returns an error.
|
||||
|
||||
@@ -31,7 +31,7 @@ func (nd *NodeDelete) Where(ps ...predicate.Node) *NodeDelete {
|
||||
|
||||
// Exec executes the deletion query and returns how many vertices were deleted.
|
||||
func (nd *NodeDelete) Exec(ctx context.Context) (int, error) {
|
||||
return withHooks[int, NodeMutation](ctx, nd.sqlExec, nd.mutation, nd.hooks)
|
||||
return withHooks(ctx, nd.sqlExec, nd.mutation, nd.hooks)
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
|
||||
@@ -107,7 +107,7 @@ func (nu *NodeUpdate) ClearNext() *NodeUpdate {
|
||||
|
||||
// Save executes the query and returns the number of nodes affected by the update operation.
|
||||
func (nu *NodeUpdate) Save(ctx context.Context) (int, error) {
|
||||
return withHooks[int, NodeMutation](ctx, nu.sqlSave, nu.mutation, nu.hooks)
|
||||
return withHooks(ctx, nu.sqlSave, nu.mutation, nu.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
@@ -314,7 +314,7 @@ func (nuo *NodeUpdateOne) Select(field string, fields ...string) *NodeUpdateOne
|
||||
|
||||
// Save executes the query and returns the updated Node entity.
|
||||
func (nuo *NodeUpdateOne) Save(ctx context.Context) (*Node, error) {
|
||||
return withHooks[*Node, NodeMutation](ctx, nuo.sqlSave, nuo.mutation, nuo.hooks)
|
||||
return withHooks(ctx, nuo.sqlSave, nuo.mutation, nuo.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
|
||||
Reference in New Issue
Block a user