diff --git a/entc/gen/template/builder/create.tmpl b/entc/gen/template/builder/create.tmpl index 785f49a9f..bdb2919f9 100644 --- a/entc/gen/template/builder/create.tmpl +++ b/entc/gen/template/builder/create.tmpl @@ -47,7 +47,7 @@ func ({{ $receiver }} *{{ $builder }}) Save(ctx context.Context) (*{{ $.Name }}, {{ $receiver }}.defaults() {{- end }} {{- end }} - return withHooks[*{{ $.Name }}, {{ $.MutationName }}](ctx, {{ $receiver }}.{{ $.Storage }}Save, {{ $mutation }}, {{ $receiver }}.hooks) + return withHooks(ctx, {{ $receiver }}.{{ $.Storage }}Save, {{ $mutation }}, {{ $receiver }}.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/gen/template/builder/delete.tmpl b/entc/gen/template/builder/delete.tmpl index 42edba80a..6eb088881 100644 --- a/entc/gen/template/builder/delete.tmpl +++ b/entc/gen/template/builder/delete.tmpl @@ -36,7 +36,7 @@ func ({{ $receiver }} *{{ $builder }}) Where(ps ...predicate.{{ $.Name }}) *{{ $ // Exec executes the deletion query and returns how many vertices were deleted. func ({{ $receiver }} *{{ $builder }}) Exec(ctx context.Context) (int, error) { - return withHooks[int, {{ $.MutationName }}](ctx, {{ $receiver }}.{{ $.Storage }}Exec, {{ $mutation }}, {{ $receiver }}.hooks) + return withHooks(ctx, {{ $receiver }}.{{ $.Storage }}Exec, {{ $mutation }}, {{ $receiver }}.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/gen/template/builder/update.tmpl b/entc/gen/template/builder/update.tmpl index c34017082..5cf7fdb3a 100644 --- a/entc/gen/template/builder/update.tmpl +++ b/entc/gen/template/builder/update.tmpl @@ -51,7 +51,7 @@ func ({{ $receiver }} *{{ $builder }}) Save(ctx context.Context) (int, error) { {{ $receiver }}.defaults() {{- end }} {{- end }} - return withHooks[int, {{ $.MutationName }}](ctx, {{ $receiver }}.{{ $.Storage }}Save, {{ $mutation }}, {{ $receiver }}.hooks) + return withHooks(ctx, {{ $receiver }}.{{ $.Storage }}Save, {{ $mutation }}, {{ $receiver }}.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -129,7 +129,7 @@ func ({{ $receiver }} *{{ $onebuilder }} ) Save(ctx context.Context) (*{{ $.Name {{ $receiver }}.defaults() {{- end }} {{- end }} - return withHooks[*{{ $.Name }}, {{ $.MutationName }}](ctx, {{ $receiver }}.{{ $.Storage }}Save, {{ $mutation }}, {{ $receiver }}.hooks) + return withHooks(ctx, {{ $receiver }}.{{ $.Storage }}Save, {{ $mutation }}, {{ $receiver }}.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/cascadelete/ent/comment_create.go b/entc/integration/cascadelete/ent/comment_create.go index 4ae7f9cdf..3a349a583 100644 --- a/entc/integration/cascadelete/ent/comment_create.go +++ b/entc/integration/cascadelete/ent/comment_create.go @@ -48,7 +48,7 @@ func (cc *CommentCreate) Mutation() *CommentMutation { // Save creates the Comment in the database. func (cc *CommentCreate) Save(ctx context.Context) (*Comment, error) { - return withHooks[*Comment, CommentMutation](ctx, cc.sqlSave, cc.mutation, cc.hooks) + return withHooks(ctx, cc.sqlSave, cc.mutation, cc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/cascadelete/ent/comment_delete.go b/entc/integration/cascadelete/ent/comment_delete.go index 075321d88..72d7bb164 100644 --- a/entc/integration/cascadelete/ent/comment_delete.go +++ b/entc/integration/cascadelete/ent/comment_delete.go @@ -31,7 +31,7 @@ func (cd *CommentDelete) Where(ps ...predicate.Comment) *CommentDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (cd *CommentDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, CommentMutation](ctx, cd.sqlExec, cd.mutation, cd.hooks) + return withHooks(ctx, cd.sqlExec, cd.mutation, cd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/cascadelete/ent/comment_update.go b/entc/integration/cascadelete/ent/comment_update.go index e266339f2..20d2e88b3 100644 --- a/entc/integration/cascadelete/ent/comment_update.go +++ b/entc/integration/cascadelete/ent/comment_update.go @@ -62,7 +62,7 @@ func (cu *CommentUpdate) ClearPost() *CommentUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (cu *CommentUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, CommentMutation](ctx, cu.sqlSave, cu.mutation, cu.hooks) + return withHooks(ctx, cu.sqlSave, cu.mutation, cu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -202,7 +202,7 @@ func (cuo *CommentUpdateOne) Select(field string, fields ...string) *CommentUpda // Save executes the query and returns the updated Comment entity. func (cuo *CommentUpdateOne) Save(ctx context.Context) (*Comment, error) { - return withHooks[*Comment, CommentMutation](ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) + return withHooks(ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/cascadelete/ent/post_create.go b/entc/integration/cascadelete/ent/post_create.go index a5bf916db..bdb179be0 100644 --- a/entc/integration/cascadelete/ent/post_create.go +++ b/entc/integration/cascadelete/ent/post_create.go @@ -81,7 +81,7 @@ func (pc *PostCreate) Mutation() *PostMutation { // Save creates the Post in the database. func (pc *PostCreate) Save(ctx context.Context) (*Post, error) { pc.defaults() - return withHooks[*Post, PostMutation](ctx, pc.sqlSave, pc.mutation, pc.hooks) + return withHooks(ctx, pc.sqlSave, pc.mutation, pc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/cascadelete/ent/post_delete.go b/entc/integration/cascadelete/ent/post_delete.go index f53e5e61a..7d0f659c7 100644 --- a/entc/integration/cascadelete/ent/post_delete.go +++ b/entc/integration/cascadelete/ent/post_delete.go @@ -31,7 +31,7 @@ func (pd *PostDelete) Where(ps ...predicate.Post) *PostDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (pd *PostDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, PostMutation](ctx, pd.sqlExec, pd.mutation, pd.hooks) + return withHooks(ctx, pd.sqlExec, pd.mutation, pd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/cascadelete/ent/post_update.go b/entc/integration/cascadelete/ent/post_update.go index 63c3fc435..654febf02 100644 --- a/entc/integration/cascadelete/ent/post_update.go +++ b/entc/integration/cascadelete/ent/post_update.go @@ -121,7 +121,7 @@ func (pu *PostUpdate) RemoveComments(c ...*Comment) *PostUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (pu *PostUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, PostMutation](ctx, pu.sqlSave, pu.mutation, pu.hooks) + return withHooks(ctx, pu.sqlSave, pu.mutation, pu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -353,7 +353,7 @@ func (puo *PostUpdateOne) Select(field string, fields ...string) *PostUpdateOne // Save executes the query and returns the updated Post entity. func (puo *PostUpdateOne) Save(ctx context.Context) (*Post, error) { - return withHooks[*Post, PostMutation](ctx, puo.sqlSave, puo.mutation, puo.hooks) + return withHooks(ctx, puo.sqlSave, puo.mutation, puo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/cascadelete/ent/user_create.go b/entc/integration/cascadelete/ent/user_create.go index a0402c790..423da683c 100644 --- a/entc/integration/cascadelete/ent/user_create.go +++ b/entc/integration/cascadelete/ent/user_create.go @@ -61,7 +61,7 @@ func (uc *UserCreate) Mutation() *UserMutation { // Save creates the User in the database. func (uc *UserCreate) Save(ctx context.Context) (*User, error) { uc.defaults() - 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. diff --git a/entc/integration/cascadelete/ent/user_delete.go b/entc/integration/cascadelete/ent/user_delete.go index 97f980976..98c4afbf0 100644 --- a/entc/integration/cascadelete/ent/user_delete.go +++ b/entc/integration/cascadelete/ent/user_delete.go @@ -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. diff --git a/entc/integration/cascadelete/ent/user_update.go b/entc/integration/cascadelete/ent/user_update.go index 88ea73bda..fa80ab97a 100644 --- a/entc/integration/cascadelete/ent/user_update.go +++ b/entc/integration/cascadelete/ent/user_update.go @@ -89,7 +89,7 @@ func (uu *UserUpdate) RemovePosts(p ...*Post) *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. @@ -261,7 +261,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. diff --git a/entc/integration/config/ent/user_create.go b/entc/integration/config/ent/user_create.go index 20c22a4e2..8e61b835a 100644 --- a/entc/integration/config/ent/user_create.go +++ b/entc/integration/config/ent/user_create.go @@ -63,7 +63,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. diff --git a/entc/integration/config/ent/user_delete.go b/entc/integration/config/ent/user_delete.go index 52e80ca0c..ce135d27b 100644 --- a/entc/integration/config/ent/user_delete.go +++ b/entc/integration/config/ent/user_delete.go @@ -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. diff --git a/entc/integration/config/ent/user_update.go b/entc/integration/config/ent/user_update.go index 48d88b048..256430cc7 100644 --- a/entc/integration/config/ent/user_update.go +++ b/entc/integration/config/ent/user_update.go @@ -78,7 +78,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. @@ -204,7 +204,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. diff --git a/entc/integration/customid/ent/account_create.go b/entc/integration/customid/ent/account_create.go index c11b311fe..9de8b0524 100644 --- a/entc/integration/customid/ent/account_create.go +++ b/entc/integration/customid/ent/account_create.go @@ -71,7 +71,7 @@ func (ac *AccountCreate) Mutation() *AccountMutation { // Save creates the Account in the database. func (ac *AccountCreate) Save(ctx context.Context) (*Account, error) { ac.defaults() - return withHooks[*Account, AccountMutation](ctx, ac.sqlSave, ac.mutation, ac.hooks) + return withHooks(ctx, ac.sqlSave, ac.mutation, ac.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/customid/ent/account_delete.go b/entc/integration/customid/ent/account_delete.go index dec189cd4..9135ea464 100644 --- a/entc/integration/customid/ent/account_delete.go +++ b/entc/integration/customid/ent/account_delete.go @@ -31,7 +31,7 @@ func (ad *AccountDelete) Where(ps ...predicate.Account) *AccountDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (ad *AccountDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, AccountMutation](ctx, ad.sqlExec, ad.mutation, ad.hooks) + return withHooks(ctx, ad.sqlExec, ad.mutation, ad.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/customid/ent/account_update.go b/entc/integration/customid/ent/account_update.go index cce7b7083..9aa93edab 100644 --- a/entc/integration/customid/ent/account_update.go +++ b/entc/integration/customid/ent/account_update.go @@ -82,7 +82,7 @@ func (au *AccountUpdate) RemoveToken(t ...*Token) *AccountUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (au *AccountUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, AccountMutation](ctx, au.sqlSave, au.mutation, au.hooks) + return withHooks(ctx, au.sqlSave, au.mutation, au.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -259,7 +259,7 @@ func (auo *AccountUpdateOne) Select(field string, fields ...string) *AccountUpda // Save executes the query and returns the updated Account entity. func (auo *AccountUpdateOne) Save(ctx context.Context) (*Account, error) { - return withHooks[*Account, AccountMutation](ctx, auo.sqlSave, auo.mutation, auo.hooks) + return withHooks(ctx, auo.sqlSave, auo.mutation, auo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/customid/ent/blob_create.go b/entc/integration/customid/ent/blob_create.go index 0362af558..7b21b45bd 100644 --- a/entc/integration/customid/ent/blob_create.go +++ b/entc/integration/customid/ent/blob_create.go @@ -111,7 +111,7 @@ func (bc *BlobCreate) Mutation() *BlobMutation { // Save creates the Blob in the database. func (bc *BlobCreate) Save(ctx context.Context) (*Blob, error) { bc.defaults() - return withHooks[*Blob, BlobMutation](ctx, bc.sqlSave, bc.mutation, bc.hooks) + return withHooks(ctx, bc.sqlSave, bc.mutation, bc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/customid/ent/blob_delete.go b/entc/integration/customid/ent/blob_delete.go index 6fdc9ca0e..5c5ddd611 100644 --- a/entc/integration/customid/ent/blob_delete.go +++ b/entc/integration/customid/ent/blob_delete.go @@ -31,7 +31,7 @@ func (bd *BlobDelete) Where(ps ...predicate.Blob) *BlobDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (bd *BlobDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, BlobMutation](ctx, bd.sqlExec, bd.mutation, bd.hooks) + return withHooks(ctx, bd.sqlExec, bd.mutation, bd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/customid/ent/blob_update.go b/entc/integration/customid/ent/blob_update.go index 157006c84..60812a7f4 100644 --- a/entc/integration/customid/ent/blob_update.go +++ b/entc/integration/customid/ent/blob_update.go @@ -135,7 +135,7 @@ func (bu *BlobUpdate) RemoveLinks(b ...*Blob) *BlobUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (bu *BlobUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, BlobMutation](ctx, bu.sqlSave, bu.mutation, bu.hooks) + return withHooks(ctx, bu.sqlSave, bu.mutation, bu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -400,7 +400,7 @@ func (buo *BlobUpdateOne) Select(field string, fields ...string) *BlobUpdateOne // Save executes the query and returns the updated Blob entity. func (buo *BlobUpdateOne) Save(ctx context.Context) (*Blob, error) { - return withHooks[*Blob, BlobMutation](ctx, buo.sqlSave, buo.mutation, buo.hooks) + return withHooks(ctx, buo.sqlSave, buo.mutation, buo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/customid/ent/bloblink_create.go b/entc/integration/customid/ent/bloblink_create.go index c8236f4b3..855f675f0 100644 --- a/entc/integration/customid/ent/bloblink_create.go +++ b/entc/integration/customid/ent/bloblink_create.go @@ -72,7 +72,7 @@ func (blc *BlobLinkCreate) Mutation() *BlobLinkMutation { // Save creates the BlobLink in the database. func (blc *BlobLinkCreate) Save(ctx context.Context) (*BlobLink, error) { blc.defaults() - return withHooks[*BlobLink, BlobLinkMutation](ctx, blc.sqlSave, blc.mutation, blc.hooks) + return withHooks(ctx, blc.sqlSave, blc.mutation, blc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/customid/ent/bloblink_delete.go b/entc/integration/customid/ent/bloblink_delete.go index 4f9592846..8cb4e78df 100644 --- a/entc/integration/customid/ent/bloblink_delete.go +++ b/entc/integration/customid/ent/bloblink_delete.go @@ -30,7 +30,7 @@ func (bld *BlobLinkDelete) Where(ps ...predicate.BlobLink) *BlobLinkDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (bld *BlobLinkDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, BlobLinkMutation](ctx, bld.sqlExec, bld.mutation, bld.hooks) + return withHooks(ctx, bld.sqlExec, bld.mutation, bld.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/customid/ent/bloblink_update.go b/entc/integration/customid/ent/bloblink_update.go index 0ed74f75f..763653f4d 100644 --- a/entc/integration/customid/ent/bloblink_update.go +++ b/entc/integration/customid/ent/bloblink_update.go @@ -89,7 +89,7 @@ func (blu *BlobLinkUpdate) ClearLink() *BlobLinkUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (blu *BlobLinkUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, BlobLinkMutation](ctx, blu.sqlSave, blu.mutation, blu.hooks) + return withHooks(ctx, blu.sqlSave, blu.mutation, blu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -286,7 +286,7 @@ func (bluo *BlobLinkUpdateOne) Select(field string, fields ...string) *BlobLinkU // Save executes the query and returns the updated BlobLink entity. func (bluo *BlobLinkUpdateOne) Save(ctx context.Context) (*BlobLink, error) { - return withHooks[*BlobLink, BlobLinkMutation](ctx, bluo.sqlSave, bluo.mutation, bluo.hooks) + return withHooks(ctx, bluo.sqlSave, bluo.mutation, bluo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/customid/ent/car_create.go b/entc/integration/customid/ent/car_create.go index 7878e807c..5bc79f2f7 100644 --- a/entc/integration/customid/ent/car_create.go +++ b/entc/integration/customid/ent/car_create.go @@ -92,7 +92,7 @@ func (cc *CarCreate) Mutation() *CarMutation { // Save creates the Car in the database. func (cc *CarCreate) Save(ctx context.Context) (*Car, error) { - return withHooks[*Car, CarMutation](ctx, cc.sqlSave, cc.mutation, cc.hooks) + return withHooks(ctx, cc.sqlSave, cc.mutation, cc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/customid/ent/car_delete.go b/entc/integration/customid/ent/car_delete.go index 4fc8375a3..98c471ac1 100644 --- a/entc/integration/customid/ent/car_delete.go +++ b/entc/integration/customid/ent/car_delete.go @@ -31,7 +31,7 @@ func (cd *CarDelete) Where(ps ...predicate.Car) *CarDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (cd *CarDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, CarMutation](ctx, cd.sqlExec, cd.mutation, cd.hooks) + return withHooks(ctx, cd.sqlExec, cd.mutation, cd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/customid/ent/car_update.go b/entc/integration/customid/ent/car_update.go index f1f12610d..589e02400 100644 --- a/entc/integration/customid/ent/car_update.go +++ b/entc/integration/customid/ent/car_update.go @@ -124,7 +124,7 @@ func (cu *CarUpdate) ClearOwner() *CarUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (cu *CarUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, CarMutation](ctx, cu.sqlSave, cu.mutation, cu.hooks) + return withHooks(ctx, cu.sqlSave, cu.mutation, cu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -351,7 +351,7 @@ func (cuo *CarUpdateOne) Select(field string, fields ...string) *CarUpdateOne { // Save executes the query and returns the updated Car entity. func (cuo *CarUpdateOne) Save(ctx context.Context) (*Car, error) { - return withHooks[*Car, CarMutation](ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) + return withHooks(ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/customid/ent/device_create.go b/entc/integration/customid/ent/device_create.go index 411265c90..6ffd61d81 100644 --- a/entc/integration/customid/ent/device_create.go +++ b/entc/integration/customid/ent/device_create.go @@ -84,7 +84,7 @@ func (dc *DeviceCreate) Mutation() *DeviceMutation { // Save creates the Device in the database. func (dc *DeviceCreate) Save(ctx context.Context) (*Device, error) { dc.defaults() - return withHooks[*Device, DeviceMutation](ctx, dc.sqlSave, dc.mutation, dc.hooks) + return withHooks(ctx, dc.sqlSave, dc.mutation, dc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/customid/ent/device_delete.go b/entc/integration/customid/ent/device_delete.go index 4a791715e..611b03f94 100644 --- a/entc/integration/customid/ent/device_delete.go +++ b/entc/integration/customid/ent/device_delete.go @@ -31,7 +31,7 @@ func (dd *DeviceDelete) Where(ps ...predicate.Device) *DeviceDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (dd *DeviceDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, DeviceMutation](ctx, dd.sqlExec, dd.mutation, dd.hooks) + return withHooks(ctx, dd.sqlExec, dd.mutation, dd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/customid/ent/device_update.go b/entc/integration/customid/ent/device_update.go index 31a267a2f..e6ebe17b0 100644 --- a/entc/integration/customid/ent/device_update.go +++ b/entc/integration/customid/ent/device_update.go @@ -101,7 +101,7 @@ func (du *DeviceUpdate) RemoveSessions(s ...*Session) *DeviceUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (du *DeviceUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, DeviceMutation](ctx, du.sqlSave, du.mutation, du.hooks) + return withHooks(ctx, du.sqlSave, du.mutation, du.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -310,7 +310,7 @@ func (duo *DeviceUpdateOne) Select(field string, fields ...string) *DeviceUpdate // Save executes the query and returns the updated Device entity. func (duo *DeviceUpdateOne) Save(ctx context.Context) (*Device, error) { - return withHooks[*Device, DeviceMutation](ctx, duo.sqlSave, duo.mutation, duo.hooks) + return withHooks(ctx, duo.sqlSave, duo.mutation, duo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/customid/ent/doc_create.go b/entc/integration/customid/ent/doc_create.go index 1c0c7c90e..a02037d4f 100644 --- a/entc/integration/customid/ent/doc_create.go +++ b/entc/integration/customid/ent/doc_create.go @@ -112,7 +112,7 @@ func (dc *DocCreate) Mutation() *DocMutation { // Save creates the Doc in the database. func (dc *DocCreate) Save(ctx context.Context) (*Doc, error) { dc.defaults() - return withHooks[*Doc, DocMutation](ctx, dc.sqlSave, dc.mutation, dc.hooks) + return withHooks(ctx, dc.sqlSave, dc.mutation, dc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/customid/ent/doc_delete.go b/entc/integration/customid/ent/doc_delete.go index b8d2c8243..4c30a7d95 100644 --- a/entc/integration/customid/ent/doc_delete.go +++ b/entc/integration/customid/ent/doc_delete.go @@ -31,7 +31,7 @@ func (dd *DocDelete) Where(ps ...predicate.Doc) *DocDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (dd *DocDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, DocMutation](ctx, dd.sqlExec, dd.mutation, dd.hooks) + return withHooks(ctx, dd.sqlExec, dd.mutation, dd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/customid/ent/doc_update.go b/entc/integration/customid/ent/doc_update.go index 63c67990b..364b06823 100644 --- a/entc/integration/customid/ent/doc_update.go +++ b/entc/integration/customid/ent/doc_update.go @@ -156,7 +156,7 @@ func (du *DocUpdate) RemoveRelated(d ...*Doc) *DocUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (du *DocUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, DocMutation](ctx, du.sqlSave, du.mutation, du.hooks) + return withHooks(ctx, du.sqlSave, du.mutation, du.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -472,7 +472,7 @@ func (duo *DocUpdateOne) Select(field string, fields ...string) *DocUpdateOne { // Save executes the query and returns the updated Doc entity. func (duo *DocUpdateOne) Save(ctx context.Context) (*Doc, error) { - return withHooks[*Doc, DocMutation](ctx, duo.sqlSave, duo.mutation, duo.hooks) + return withHooks(ctx, duo.sqlSave, duo.mutation, duo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/customid/ent/group_create.go b/entc/integration/customid/ent/group_create.go index c06973eaa..6b18b51a0 100644 --- a/entc/integration/customid/ent/group_create.go +++ b/entc/integration/customid/ent/group_create.go @@ -54,7 +54,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. diff --git a/entc/integration/customid/ent/group_delete.go b/entc/integration/customid/ent/group_delete.go index 5f3a6a631..f9caa724b 100644 --- a/entc/integration/customid/ent/group_delete.go +++ b/entc/integration/customid/ent/group_delete.go @@ -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. diff --git a/entc/integration/customid/ent/group_update.go b/entc/integration/customid/ent/group_update.go index a00b42f4c..6515242c9 100644 --- a/entc/integration/customid/ent/group_update.go +++ b/entc/integration/customid/ent/group_update.go @@ -75,7 +75,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. @@ -230,7 +230,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. diff --git a/entc/integration/customid/ent/intsid_create.go b/entc/integration/customid/ent/intsid_create.go index 7ba1ffc3a..7655f895e 100644 --- a/entc/integration/customid/ent/intsid_create.go +++ b/entc/integration/customid/ent/intsid_create.go @@ -73,7 +73,7 @@ func (isc *IntSIDCreate) Mutation() *IntSIDMutation { // Save creates the IntSID in the database. func (isc *IntSIDCreate) Save(ctx context.Context) (*IntSID, error) { - return withHooks[*IntSID, IntSIDMutation](ctx, isc.sqlSave, isc.mutation, isc.hooks) + return withHooks(ctx, isc.sqlSave, isc.mutation, isc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/customid/ent/intsid_delete.go b/entc/integration/customid/ent/intsid_delete.go index bb496c10a..1a0aeeefa 100644 --- a/entc/integration/customid/ent/intsid_delete.go +++ b/entc/integration/customid/ent/intsid_delete.go @@ -31,7 +31,7 @@ func (isd *IntSIDDelete) Where(ps ...predicate.IntSID) *IntSIDDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (isd *IntSIDDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, IntSIDMutation](ctx, isd.sqlExec, isd.mutation, isd.hooks) + return withHooks(ctx, isd.sqlExec, isd.mutation, isd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/customid/ent/intsid_update.go b/entc/integration/customid/ent/intsid_update.go index 50f4ba159..362ce6189 100644 --- a/entc/integration/customid/ent/intsid_update.go +++ b/entc/integration/customid/ent/intsid_update.go @@ -100,7 +100,7 @@ func (isu *IntSIDUpdate) RemoveChildren(i ...*IntSID) *IntSIDUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (isu *IntSIDUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, IntSIDMutation](ctx, isu.sqlSave, isu.mutation, isu.hooks) + return withHooks(ctx, isu.sqlSave, isu.mutation, isu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -309,7 +309,7 @@ func (isuo *IntSIDUpdateOne) Select(field string, fields ...string) *IntSIDUpdat // Save executes the query and returns the updated IntSID entity. func (isuo *IntSIDUpdateOne) Save(ctx context.Context) (*IntSID, error) { - return withHooks[*IntSID, IntSIDMutation](ctx, isuo.sqlSave, isuo.mutation, isuo.hooks) + return withHooks(ctx, isuo.sqlSave, isuo.mutation, isuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/customid/ent/link_create.go b/entc/integration/customid/ent/link_create.go index d92181b08..621a681c6 100644 --- a/entc/integration/customid/ent/link_create.go +++ b/entc/integration/customid/ent/link_create.go @@ -56,7 +56,7 @@ func (lc *LinkCreate) Mutation() *LinkMutation { // Save creates the Link in the database. func (lc *LinkCreate) Save(ctx context.Context) (*Link, error) { lc.defaults() - return withHooks[*Link, LinkMutation](ctx, lc.sqlSave, lc.mutation, lc.hooks) + return withHooks(ctx, lc.sqlSave, lc.mutation, lc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/customid/ent/link_delete.go b/entc/integration/customid/ent/link_delete.go index f78d62b68..9a5d0abf5 100644 --- a/entc/integration/customid/ent/link_delete.go +++ b/entc/integration/customid/ent/link_delete.go @@ -31,7 +31,7 @@ func (ld *LinkDelete) Where(ps ...predicate.Link) *LinkDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (ld *LinkDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, LinkMutation](ctx, ld.sqlExec, ld.mutation, ld.hooks) + return withHooks(ctx, ld.sqlExec, ld.mutation, ld.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/customid/ent/link_update.go b/entc/integration/customid/ent/link_update.go index fc038240f..0745556a5 100644 --- a/entc/integration/customid/ent/link_update.go +++ b/entc/integration/customid/ent/link_update.go @@ -45,7 +45,7 @@ func (lu *LinkUpdate) Mutation() *LinkMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (lu *LinkUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, LinkMutation](ctx, lu.sqlSave, lu.mutation, lu.hooks) + return withHooks(ctx, lu.sqlSave, lu.mutation, lu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -128,7 +128,7 @@ func (luo *LinkUpdateOne) Select(field string, fields ...string) *LinkUpdateOne // Save executes the query and returns the updated Link entity. func (luo *LinkUpdateOne) Save(ctx context.Context) (*Link, error) { - return withHooks[*Link, LinkMutation](ctx, luo.sqlSave, luo.mutation, luo.hooks) + return withHooks(ctx, luo.sqlSave, luo.mutation, luo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/customid/ent/mixinid_create.go b/entc/integration/customid/ent/mixinid_create.go index e5a9a4c47..ad76395da 100644 --- a/entc/integration/customid/ent/mixinid_create.go +++ b/entc/integration/customid/ent/mixinid_create.go @@ -61,7 +61,7 @@ func (mic *MixinIDCreate) Mutation() *MixinIDMutation { // Save creates the MixinID in the database. func (mic *MixinIDCreate) Save(ctx context.Context) (*MixinID, error) { mic.defaults() - return withHooks[*MixinID, MixinIDMutation](ctx, mic.sqlSave, mic.mutation, mic.hooks) + return withHooks(ctx, mic.sqlSave, mic.mutation, mic.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/customid/ent/mixinid_delete.go b/entc/integration/customid/ent/mixinid_delete.go index e65f73610..e73802d23 100644 --- a/entc/integration/customid/ent/mixinid_delete.go +++ b/entc/integration/customid/ent/mixinid_delete.go @@ -31,7 +31,7 @@ func (mid *MixinIDDelete) Where(ps ...predicate.MixinID) *MixinIDDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (mid *MixinIDDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, MixinIDMutation](ctx, mid.sqlExec, mid.mutation, mid.hooks) + return withHooks(ctx, mid.sqlExec, mid.mutation, mid.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/customid/ent/mixinid_update.go b/entc/integration/customid/ent/mixinid_update.go index 5bdafd354..e4fcf4b1f 100644 --- a/entc/integration/customid/ent/mixinid_update.go +++ b/entc/integration/customid/ent/mixinid_update.go @@ -50,7 +50,7 @@ func (miu *MixinIDUpdate) Mutation() *MixinIDMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (miu *MixinIDUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, MixinIDMutation](ctx, miu.sqlSave, miu.mutation, miu.hooks) + return withHooks(ctx, miu.sqlSave, miu.mutation, miu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -142,7 +142,7 @@ func (miuo *MixinIDUpdateOne) Select(field string, fields ...string) *MixinIDUpd // Save executes the query and returns the updated MixinID entity. func (miuo *MixinIDUpdateOne) Save(ctx context.Context) (*MixinID, error) { - return withHooks[*MixinID, MixinIDMutation](ctx, miuo.sqlSave, miuo.mutation, miuo.hooks) + return withHooks(ctx, miuo.sqlSave, miuo.mutation, miuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/customid/ent/note_create.go b/entc/integration/customid/ent/note_create.go index 20f542035..5c9177591 100644 --- a/entc/integration/customid/ent/note_create.go +++ b/entc/integration/customid/ent/note_create.go @@ -97,7 +97,7 @@ func (nc *NoteCreate) Mutation() *NoteMutation { // Save creates the Note in the database. func (nc *NoteCreate) Save(ctx context.Context) (*Note, error) { nc.defaults() - return withHooks[*Note, NoteMutation](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. diff --git a/entc/integration/customid/ent/note_delete.go b/entc/integration/customid/ent/note_delete.go index 99355ef67..def57db26 100644 --- a/entc/integration/customid/ent/note_delete.go +++ b/entc/integration/customid/ent/note_delete.go @@ -31,7 +31,7 @@ func (nd *NoteDelete) Where(ps ...predicate.Note) *NoteDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (nd *NoteDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, NoteMutation](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. diff --git a/entc/integration/customid/ent/note_update.go b/entc/integration/customid/ent/note_update.go index 58fad52e2..60f1f6a1d 100644 --- a/entc/integration/customid/ent/note_update.go +++ b/entc/integration/customid/ent/note_update.go @@ -120,7 +120,7 @@ func (nu *NoteUpdate) RemoveChildren(n ...*Note) *NoteUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (nu *NoteUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, NoteMutation](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. @@ -355,7 +355,7 @@ func (nuo *NoteUpdateOne) Select(field string, fields ...string) *NoteUpdateOne // Save executes the query and returns the updated Note entity. func (nuo *NoteUpdateOne) Save(ctx context.Context) (*Note, error) { - return withHooks[*Note, NoteMutation](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. diff --git a/entc/integration/customid/ent/other_create.go b/entc/integration/customid/ent/other_create.go index 322d251fd..c109100cf 100644 --- a/entc/integration/customid/ent/other_create.go +++ b/entc/integration/customid/ent/other_create.go @@ -49,7 +49,7 @@ func (oc *OtherCreate) Mutation() *OtherMutation { // Save creates the Other in the database. func (oc *OtherCreate) Save(ctx context.Context) (*Other, error) { oc.defaults() - return withHooks[*Other, OtherMutation](ctx, oc.sqlSave, oc.mutation, oc.hooks) + return withHooks(ctx, oc.sqlSave, oc.mutation, oc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/customid/ent/other_delete.go b/entc/integration/customid/ent/other_delete.go index 647090d46..8ef19a80a 100644 --- a/entc/integration/customid/ent/other_delete.go +++ b/entc/integration/customid/ent/other_delete.go @@ -31,7 +31,7 @@ func (od *OtherDelete) Where(ps ...predicate.Other) *OtherDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (od *OtherDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, OtherMutation](ctx, od.sqlExec, od.mutation, od.hooks) + return withHooks(ctx, od.sqlExec, od.mutation, od.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/customid/ent/other_update.go b/entc/integration/customid/ent/other_update.go index 22e7a65cc..c3d049f2f 100644 --- a/entc/integration/customid/ent/other_update.go +++ b/entc/integration/customid/ent/other_update.go @@ -38,7 +38,7 @@ func (ou *OtherUpdate) Mutation() *OtherMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (ou *OtherUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, OtherMutation](ctx, ou.sqlSave, ou.mutation, ou.hooks) + return withHooks(ctx, ou.sqlSave, ou.mutation, ou.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -112,7 +112,7 @@ func (ouo *OtherUpdateOne) Select(field string, fields ...string) *OtherUpdateOn // Save executes the query and returns the updated Other entity. func (ouo *OtherUpdateOne) Save(ctx context.Context) (*Other, error) { - return withHooks[*Other, OtherMutation](ctx, ouo.sqlSave, ouo.mutation, ouo.hooks) + return withHooks(ctx, ouo.sqlSave, ouo.mutation, ouo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/customid/ent/pet_create.go b/entc/integration/customid/ent/pet_create.go index 1a234a99b..bb8e57b6f 100644 --- a/entc/integration/customid/ent/pet_create.go +++ b/entc/integration/customid/ent/pet_create.go @@ -118,7 +118,7 @@ func (pc *PetCreate) Mutation() *PetMutation { // Save creates the Pet in the database. func (pc *PetCreate) Save(ctx context.Context) (*Pet, error) { pc.defaults() - return withHooks[*Pet, PetMutation](ctx, pc.sqlSave, pc.mutation, pc.hooks) + return withHooks(ctx, pc.sqlSave, pc.mutation, pc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/customid/ent/pet_delete.go b/entc/integration/customid/ent/pet_delete.go index 6f7d69b1b..1ffe05787 100644 --- a/entc/integration/customid/ent/pet_delete.go +++ b/entc/integration/customid/ent/pet_delete.go @@ -31,7 +31,7 @@ func (pd *PetDelete) Where(ps ...predicate.Pet) *PetDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (pd *PetDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pd.sqlExec, pd.mutation, pd.hooks) + return withHooks(ctx, pd.sqlExec, pd.mutation, pd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/customid/ent/pet_update.go b/entc/integration/customid/ent/pet_update.go index 770cca6d3..342213aca 100644 --- a/entc/integration/customid/ent/pet_update.go +++ b/entc/integration/customid/ent/pet_update.go @@ -162,7 +162,7 @@ func (pu *PetUpdate) ClearBestFriend() *PetUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (pu *PetUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pu.sqlSave, pu.mutation, pu.hooks) + return withHooks(ctx, pu.sqlSave, pu.mutation, pu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -506,7 +506,7 @@ func (puo *PetUpdateOne) Select(field string, fields ...string) *PetUpdateOne { // Save executes the query and returns the updated Pet entity. func (puo *PetUpdateOne) Save(ctx context.Context) (*Pet, error) { - return withHooks[*Pet, PetMutation](ctx, puo.sqlSave, puo.mutation, puo.hooks) + return withHooks(ctx, puo.sqlSave, puo.mutation, puo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/customid/ent/revision_create.go b/entc/integration/customid/ent/revision_create.go index 7e18d3af8..68e0dfcf2 100644 --- a/entc/integration/customid/ent/revision_create.go +++ b/entc/integration/customid/ent/revision_create.go @@ -39,7 +39,7 @@ func (rc *RevisionCreate) Mutation() *RevisionMutation { // Save creates the Revision in the database. func (rc *RevisionCreate) Save(ctx context.Context) (*Revision, error) { - return withHooks[*Revision, RevisionMutation](ctx, rc.sqlSave, rc.mutation, rc.hooks) + return withHooks(ctx, rc.sqlSave, rc.mutation, rc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/customid/ent/revision_delete.go b/entc/integration/customid/ent/revision_delete.go index 867a0744d..ff268af34 100644 --- a/entc/integration/customid/ent/revision_delete.go +++ b/entc/integration/customid/ent/revision_delete.go @@ -31,7 +31,7 @@ func (rd *RevisionDelete) Where(ps ...predicate.Revision) *RevisionDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (rd *RevisionDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, RevisionMutation](ctx, rd.sqlExec, rd.mutation, rd.hooks) + return withHooks(ctx, rd.sqlExec, rd.mutation, rd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/customid/ent/revision_update.go b/entc/integration/customid/ent/revision_update.go index 3bc0d55f9..8ba9ee269 100644 --- a/entc/integration/customid/ent/revision_update.go +++ b/entc/integration/customid/ent/revision_update.go @@ -38,7 +38,7 @@ func (ru *RevisionUpdate) Mutation() *RevisionMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (ru *RevisionUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, RevisionMutation](ctx, ru.sqlSave, ru.mutation, ru.hooks) + return withHooks(ctx, ru.sqlSave, ru.mutation, ru.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -112,7 +112,7 @@ func (ruo *RevisionUpdateOne) Select(field string, fields ...string) *RevisionUp // Save executes the query and returns the updated Revision entity. func (ruo *RevisionUpdateOne) Save(ctx context.Context) (*Revision, error) { - return withHooks[*Revision, RevisionMutation](ctx, ruo.sqlSave, ruo.mutation, ruo.hooks) + return withHooks(ctx, ruo.sqlSave, ruo.mutation, ruo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/customid/ent/session_create.go b/entc/integration/customid/ent/session_create.go index 06a8b0c8a..96a9bfdd9 100644 --- a/entc/integration/customid/ent/session_create.go +++ b/entc/integration/customid/ent/session_create.go @@ -69,7 +69,7 @@ func (sc *SessionCreate) Mutation() *SessionMutation { // Save creates the Session in the database. func (sc *SessionCreate) Save(ctx context.Context) (*Session, error) { sc.defaults() - return withHooks[*Session, SessionMutation](ctx, sc.sqlSave, sc.mutation, sc.hooks) + return withHooks(ctx, sc.sqlSave, sc.mutation, sc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/customid/ent/session_delete.go b/entc/integration/customid/ent/session_delete.go index 75ce6247a..57f5dcf17 100644 --- a/entc/integration/customid/ent/session_delete.go +++ b/entc/integration/customid/ent/session_delete.go @@ -31,7 +31,7 @@ func (sd *SessionDelete) Where(ps ...predicate.Session) *SessionDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (sd *SessionDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, SessionMutation](ctx, sd.sqlExec, sd.mutation, sd.hooks) + return withHooks(ctx, sd.sqlExec, sd.mutation, sd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/customid/ent/session_update.go b/entc/integration/customid/ent/session_update.go index 7c9f172c0..d06f197cd 100644 --- a/entc/integration/customid/ent/session_update.go +++ b/entc/integration/customid/ent/session_update.go @@ -65,7 +65,7 @@ func (su *SessionUpdate) ClearDevice() *SessionUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (su *SessionUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, SessionMutation](ctx, su.sqlSave, su.mutation, su.hooks) + return withHooks(ctx, su.sqlSave, su.mutation, su.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -193,7 +193,7 @@ func (suo *SessionUpdateOne) Select(field string, fields ...string) *SessionUpda // Save executes the query and returns the updated Session entity. func (suo *SessionUpdateOne) Save(ctx context.Context) (*Session, error) { - return withHooks[*Session, SessionMutation](ctx, suo.sqlSave, suo.mutation, suo.hooks) + return withHooks(ctx, suo.sqlSave, suo.mutation, suo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/customid/ent/token_create.go b/entc/integration/customid/ent/token_create.go index f2d210bb8..27f52f1ab 100644 --- a/entc/integration/customid/ent/token_create.go +++ b/entc/integration/customid/ent/token_create.go @@ -67,7 +67,7 @@ func (tc *TokenCreate) Mutation() *TokenMutation { // Save creates the Token in the database. func (tc *TokenCreate) Save(ctx context.Context) (*Token, error) { tc.defaults() - return withHooks[*Token, TokenMutation](ctx, tc.sqlSave, tc.mutation, tc.hooks) + return withHooks(ctx, tc.sqlSave, tc.mutation, tc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/customid/ent/token_delete.go b/entc/integration/customid/ent/token_delete.go index 0b597466c..397d22ceb 100644 --- a/entc/integration/customid/ent/token_delete.go +++ b/entc/integration/customid/ent/token_delete.go @@ -31,7 +31,7 @@ func (td *TokenDelete) Where(ps ...predicate.Token) *TokenDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (td *TokenDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, TokenMutation](ctx, td.sqlExec, td.mutation, td.hooks) + return withHooks(ctx, td.sqlExec, td.mutation, td.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/customid/ent/token_update.go b/entc/integration/customid/ent/token_update.go index c662c0515..9d9e4c6ab 100644 --- a/entc/integration/customid/ent/token_update.go +++ b/entc/integration/customid/ent/token_update.go @@ -63,7 +63,7 @@ func (tu *TokenUpdate) ClearAccount() *TokenUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (tu *TokenUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, TokenMutation](ctx, tu.sqlSave, tu.mutation, tu.hooks) + return withHooks(ctx, tu.sqlSave, tu.mutation, tu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -208,7 +208,7 @@ func (tuo *TokenUpdateOne) Select(field string, fields ...string) *TokenUpdateOn // Save executes the query and returns the updated Token entity. func (tuo *TokenUpdateOne) Save(ctx context.Context) (*Token, error) { - return withHooks[*Token, TokenMutation](ctx, tuo.sqlSave, tuo.mutation, tuo.hooks) + return withHooks(ctx, tuo.sqlSave, tuo.mutation, tuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/customid/ent/user_create.go b/entc/integration/customid/ent/user_create.go index b84abf444..bcfbeb552 100644 --- a/entc/integration/customid/ent/user_create.go +++ b/entc/integration/customid/ent/user_create.go @@ -104,7 +104,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. diff --git a/entc/integration/customid/ent/user_delete.go b/entc/integration/customid/ent/user_delete.go index 5fe5e7b15..56da7b4e1 100644 --- a/entc/integration/customid/ent/user_delete.go +++ b/entc/integration/customid/ent/user_delete.go @@ -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. diff --git a/entc/integration/customid/ent/user_update.go b/entc/integration/customid/ent/user_update.go index 7d745bef0..6db49d557 100644 --- a/entc/integration/customid/ent/user_update.go +++ b/entc/integration/customid/ent/user_update.go @@ -173,7 +173,7 @@ func (uu *UserUpdate) RemovePets(p ...*Pet) *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. @@ -544,7 +544,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. diff --git a/entc/integration/edgefield/ent/car_create.go b/entc/integration/edgefield/ent/car_create.go index b578c0cb2..643d6f1cb 100644 --- a/entc/integration/edgefield/ent/car_create.go +++ b/entc/integration/edgefield/ent/car_create.go @@ -75,7 +75,7 @@ func (cc *CarCreate) Mutation() *CarMutation { // Save creates the Car in the database. func (cc *CarCreate) Save(ctx context.Context) (*Car, error) { cc.defaults() - return withHooks[*Car, CarMutation](ctx, cc.sqlSave, cc.mutation, cc.hooks) + return withHooks(ctx, cc.sqlSave, cc.mutation, cc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/edgefield/ent/car_delete.go b/entc/integration/edgefield/ent/car_delete.go index 6ce9133de..e7a9b58b5 100644 --- a/entc/integration/edgefield/ent/car_delete.go +++ b/entc/integration/edgefield/ent/car_delete.go @@ -31,7 +31,7 @@ func (cd *CarDelete) Where(ps ...predicate.Car) *CarDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (cd *CarDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, CarMutation](ctx, cd.sqlExec, cd.mutation, cd.hooks) + return withHooks(ctx, cd.sqlExec, cd.mutation, cd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/edgefield/ent/car_update.go b/entc/integration/edgefield/ent/car_update.go index 311cf754c..d5d276fbe 100644 --- a/entc/integration/edgefield/ent/car_update.go +++ b/entc/integration/edgefield/ent/car_update.go @@ -95,7 +95,7 @@ func (cu *CarUpdate) RemoveRentals(r ...*Rental) *CarUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (cu *CarUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, CarMutation](ctx, cu.sqlSave, cu.mutation, cu.hooks) + return withHooks(ctx, cu.sqlSave, cu.mutation, cu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -276,7 +276,7 @@ func (cuo *CarUpdateOne) Select(field string, fields ...string) *CarUpdateOne { // Save executes the query and returns the updated Car entity. func (cuo *CarUpdateOne) Save(ctx context.Context) (*Car, error) { - return withHooks[*Car, CarMutation](ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) + return withHooks(ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/edgefield/ent/card_create.go b/entc/integration/edgefield/ent/card_create.go index 0a7bdfd5d..1e4896993 100644 --- a/entc/integration/edgefield/ent/card_create.go +++ b/entc/integration/edgefield/ent/card_create.go @@ -63,7 +63,7 @@ func (cc *CardCreate) Mutation() *CardMutation { // Save creates the Card in the database. func (cc *CardCreate) Save(ctx context.Context) (*Card, error) { - return withHooks[*Card, CardMutation](ctx, cc.sqlSave, cc.mutation, cc.hooks) + return withHooks(ctx, cc.sqlSave, cc.mutation, cc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/edgefield/ent/card_delete.go b/entc/integration/edgefield/ent/card_delete.go index 90f09b863..0150c7da3 100644 --- a/entc/integration/edgefield/ent/card_delete.go +++ b/entc/integration/edgefield/ent/card_delete.go @@ -31,7 +31,7 @@ func (cd *CardDelete) Where(ps ...predicate.Card) *CardDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (cd *CardDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, CardMutation](ctx, cd.sqlExec, cd.mutation, cd.hooks) + return withHooks(ctx, cd.sqlExec, cd.mutation, cd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/edgefield/ent/card_update.go b/entc/integration/edgefield/ent/card_update.go index ace453508..6546245bf 100644 --- a/entc/integration/edgefield/ent/card_update.go +++ b/entc/integration/edgefield/ent/card_update.go @@ -90,7 +90,7 @@ func (cu *CardUpdate) ClearOwner() *CardUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (cu *CardUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, CardMutation](ctx, cu.sqlSave, cu.mutation, cu.hooks) + return withHooks(ctx, cu.sqlSave, cu.mutation, cu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -250,7 +250,7 @@ func (cuo *CardUpdateOne) Select(field string, fields ...string) *CardUpdateOne // Save executes the query and returns the updated Card entity. func (cuo *CardUpdateOne) Save(ctx context.Context) (*Card, error) { - return withHooks[*Card, CardMutation](ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) + return withHooks(ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/edgefield/ent/info_create.go b/entc/integration/edgefield/ent/info_create.go index 8b77063d4..70a8e3312 100644 --- a/entc/integration/edgefield/ent/info_create.go +++ b/entc/integration/edgefield/ent/info_create.go @@ -63,7 +63,7 @@ func (ic *InfoCreate) Mutation() *InfoMutation { // Save creates the Info in the database. func (ic *InfoCreate) Save(ctx context.Context) (*Info, error) { - return withHooks[*Info, InfoMutation](ctx, ic.sqlSave, ic.mutation, ic.hooks) + return withHooks(ctx, ic.sqlSave, ic.mutation, ic.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/edgefield/ent/info_delete.go b/entc/integration/edgefield/ent/info_delete.go index 57017b9a3..ff683430c 100644 --- a/entc/integration/edgefield/ent/info_delete.go +++ b/entc/integration/edgefield/ent/info_delete.go @@ -31,7 +31,7 @@ func (id *InfoDelete) Where(ps ...predicate.Info) *InfoDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (id *InfoDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, InfoMutation](ctx, id.sqlExec, id.mutation, id.hooks) + return withHooks(ctx, id.sqlExec, id.mutation, id.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/edgefield/ent/info_update.go b/entc/integration/edgefield/ent/info_update.go index 9fc80dcd2..150f6a5cc 100644 --- a/entc/integration/edgefield/ent/info_update.go +++ b/entc/integration/edgefield/ent/info_update.go @@ -78,7 +78,7 @@ func (iu *InfoUpdate) ClearUser() *InfoUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (iu *InfoUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, InfoMutation](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. @@ -226,7 +226,7 @@ func (iuo *InfoUpdateOne) Select(field string, fields ...string) *InfoUpdateOne // Save executes the query and returns the updated Info entity. func (iuo *InfoUpdateOne) Save(ctx context.Context) (*Info, error) { - return withHooks[*Info, InfoMutation](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. diff --git a/entc/integration/edgefield/ent/metadata_create.go b/entc/integration/edgefield/ent/metadata_create.go index 06910ef4a..1665afa5f 100644 --- a/entc/integration/edgefield/ent/metadata_create.go +++ b/entc/integration/edgefield/ent/metadata_create.go @@ -105,7 +105,7 @@ func (mc *MetadataCreate) Mutation() *MetadataMutation { // Save creates the Metadata in the database. func (mc *MetadataCreate) Save(ctx context.Context) (*Metadata, error) { mc.defaults() - return withHooks[*Metadata, MetadataMutation](ctx, mc.sqlSave, mc.mutation, mc.hooks) + return withHooks(ctx, mc.sqlSave, mc.mutation, mc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/edgefield/ent/metadata_delete.go b/entc/integration/edgefield/ent/metadata_delete.go index 5cd556b30..872f7fad1 100644 --- a/entc/integration/edgefield/ent/metadata_delete.go +++ b/entc/integration/edgefield/ent/metadata_delete.go @@ -31,7 +31,7 @@ func (md *MetadataDelete) Where(ps ...predicate.Metadata) *MetadataDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (md *MetadataDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, MetadataMutation](ctx, md.sqlExec, md.mutation, md.hooks) + return withHooks(ctx, md.sqlExec, md.mutation, md.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/edgefield/ent/metadata_update.go b/entc/integration/edgefield/ent/metadata_update.go index 8eef2292b..d469251aa 100644 --- a/entc/integration/edgefield/ent/metadata_update.go +++ b/entc/integration/edgefield/ent/metadata_update.go @@ -152,7 +152,7 @@ func (mu *MetadataUpdate) ClearParent() *MetadataUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (mu *MetadataUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, MetadataMutation](ctx, mu.sqlSave, mu.mutation, mu.hooks) + return withHooks(ctx, mu.sqlSave, mu.mutation, mu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -448,7 +448,7 @@ func (muo *MetadataUpdateOne) Select(field string, fields ...string) *MetadataUp // Save executes the query and returns the updated Metadata entity. func (muo *MetadataUpdateOne) Save(ctx context.Context) (*Metadata, error) { - return withHooks[*Metadata, MetadataMutation](ctx, muo.sqlSave, muo.mutation, muo.hooks) + return withHooks(ctx, muo.sqlSave, muo.mutation, muo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/edgefield/ent/node_create.go b/entc/integration/edgefield/ent/node_create.go index a7e2ba6c9..30c859ec8 100644 --- a/entc/integration/edgefield/ent/node_create.go +++ b/entc/integration/edgefield/ent/node_create.go @@ -83,7 +83,7 @@ func (nc *NodeCreate) Mutation() *NodeMutation { // Save creates the Node in the database. func (nc *NodeCreate) Save(ctx context.Context) (*Node, error) { nc.defaults() - 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. diff --git a/entc/integration/edgefield/ent/node_delete.go b/entc/integration/edgefield/ent/node_delete.go index e8e8d087f..bdb8c8095 100644 --- a/entc/integration/edgefield/ent/node_delete.go +++ b/entc/integration/edgefield/ent/node_delete.go @@ -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. diff --git a/entc/integration/edgefield/ent/node_update.go b/entc/integration/edgefield/ent/node_update.go index 7a2f1fe54..7c7d8f691 100644 --- a/entc/integration/edgefield/ent/node_update.go +++ b/entc/integration/edgefield/ent/node_update.go @@ -115,7 +115,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. @@ -330,7 +330,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. diff --git a/entc/integration/edgefield/ent/pet_create.go b/entc/integration/edgefield/ent/pet_create.go index 51665a23a..6d4969df9 100644 --- a/entc/integration/edgefield/ent/pet_create.go +++ b/entc/integration/edgefield/ent/pet_create.go @@ -49,7 +49,7 @@ func (pc *PetCreate) Mutation() *PetMutation { // Save creates the Pet in the database. func (pc *PetCreate) Save(ctx context.Context) (*Pet, error) { - return withHooks[*Pet, PetMutation](ctx, pc.sqlSave, pc.mutation, pc.hooks) + return withHooks(ctx, pc.sqlSave, pc.mutation, pc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/edgefield/ent/pet_delete.go b/entc/integration/edgefield/ent/pet_delete.go index b3677073c..dfcb0ff7f 100644 --- a/entc/integration/edgefield/ent/pet_delete.go +++ b/entc/integration/edgefield/ent/pet_delete.go @@ -31,7 +31,7 @@ func (pd *PetDelete) Where(ps ...predicate.Pet) *PetDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (pd *PetDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pd.sqlExec, pd.mutation, pd.hooks) + return withHooks(ctx, pd.sqlExec, pd.mutation, pd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/edgefield/ent/pet_update.go b/entc/integration/edgefield/ent/pet_update.go index a29de0f53..4d5c738d4 100644 --- a/entc/integration/edgefield/ent/pet_update.go +++ b/entc/integration/edgefield/ent/pet_update.go @@ -70,7 +70,7 @@ func (pu *PetUpdate) ClearOwner() *PetUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (pu *PetUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pu.sqlSave, pu.mutation, pu.hooks) + return withHooks(ctx, pu.sqlSave, pu.mutation, pu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -204,7 +204,7 @@ func (puo *PetUpdateOne) Select(field string, fields ...string) *PetUpdateOne { // Save executes the query and returns the updated Pet entity. func (puo *PetUpdateOne) Save(ctx context.Context) (*Pet, error) { - return withHooks[*Pet, PetMutation](ctx, puo.sqlSave, puo.mutation, puo.hooks) + return withHooks(ctx, puo.sqlSave, puo.mutation, puo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/edgefield/ent/post_create.go b/entc/integration/edgefield/ent/post_create.go index de2aa4e7b..51b9be102 100644 --- a/entc/integration/edgefield/ent/post_create.go +++ b/entc/integration/edgefield/ent/post_create.go @@ -56,7 +56,7 @@ func (pc *PostCreate) Mutation() *PostMutation { // Save creates the Post in the database. func (pc *PostCreate) Save(ctx context.Context) (*Post, error) { - return withHooks[*Post, PostMutation](ctx, pc.sqlSave, pc.mutation, pc.hooks) + return withHooks(ctx, pc.sqlSave, pc.mutation, pc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/edgefield/ent/post_delete.go b/entc/integration/edgefield/ent/post_delete.go index 888b42650..8092222af 100644 --- a/entc/integration/edgefield/ent/post_delete.go +++ b/entc/integration/edgefield/ent/post_delete.go @@ -31,7 +31,7 @@ func (pd *PostDelete) Where(ps ...predicate.Post) *PostDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (pd *PostDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, PostMutation](ctx, pd.sqlExec, pd.mutation, pd.hooks) + return withHooks(ctx, pd.sqlExec, pd.mutation, pd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/edgefield/ent/post_update.go b/entc/integration/edgefield/ent/post_update.go index 5947b403d..afa3519a9 100644 --- a/entc/integration/edgefield/ent/post_update.go +++ b/entc/integration/edgefield/ent/post_update.go @@ -76,7 +76,7 @@ func (pu *PostUpdate) ClearAuthor() *PostUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (pu *PostUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, PostMutation](ctx, pu.sqlSave, pu.mutation, pu.hooks) + return withHooks(ctx, pu.sqlSave, pu.mutation, pu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -219,7 +219,7 @@ func (puo *PostUpdateOne) Select(field string, fields ...string) *PostUpdateOne // Save executes the query and returns the updated Post entity. func (puo *PostUpdateOne) Save(ctx context.Context) (*Post, error) { - return withHooks[*Post, PostMutation](ctx, puo.sqlSave, puo.mutation, puo.hooks) + return withHooks(ctx, puo.sqlSave, puo.mutation, puo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/edgefield/ent/rental_create.go b/entc/integration/edgefield/ent/rental_create.go index 5c0b8bf9e..54be32322 100644 --- a/entc/integration/edgefield/ent/rental_create.go +++ b/entc/integration/edgefield/ent/rental_create.go @@ -71,7 +71,7 @@ func (rc *RentalCreate) Mutation() *RentalMutation { // Save creates the Rental in the database. func (rc *RentalCreate) Save(ctx context.Context) (*Rental, error) { rc.defaults() - return withHooks[*Rental, RentalMutation](ctx, rc.sqlSave, rc.mutation, rc.hooks) + return withHooks(ctx, rc.sqlSave, rc.mutation, rc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/edgefield/ent/rental_delete.go b/entc/integration/edgefield/ent/rental_delete.go index 6ce6565e2..56d089c9a 100644 --- a/entc/integration/edgefield/ent/rental_delete.go +++ b/entc/integration/edgefield/ent/rental_delete.go @@ -31,7 +31,7 @@ func (rd *RentalDelete) Where(ps ...predicate.Rental) *RentalDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (rd *RentalDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, RentalMutation](ctx, rd.sqlExec, rd.mutation, rd.hooks) + return withHooks(ctx, rd.sqlExec, rd.mutation, rd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/edgefield/ent/rental_update.go b/entc/integration/edgefield/ent/rental_update.go index 386b5e887..3b73d6938 100644 --- a/entc/integration/edgefield/ent/rental_update.go +++ b/entc/integration/edgefield/ent/rental_update.go @@ -53,7 +53,7 @@ func (ru *RentalUpdate) Mutation() *RentalMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (ru *RentalUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, RentalMutation](ctx, ru.sqlSave, ru.mutation, ru.hooks) + return withHooks(ctx, ru.sqlSave, ru.mutation, ru.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -158,7 +158,7 @@ func (ruo *RentalUpdateOne) Select(field string, fields ...string) *RentalUpdate // Save executes the query and returns the updated Rental entity. func (ruo *RentalUpdateOne) Save(ctx context.Context) (*Rental, error) { - return withHooks[*Rental, RentalMutation](ctx, ruo.sqlSave, ruo.mutation, ruo.hooks) + return withHooks(ctx, ruo.sqlSave, ruo.mutation, ruo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/edgefield/ent/user_create.go b/entc/integration/edgefield/ent/user_create.go index 6deb28d7e..fc24afa99 100644 --- a/entc/integration/edgefield/ent/user_create.go +++ b/entc/integration/edgefield/ent/user_create.go @@ -176,7 +176,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. diff --git a/entc/integration/edgefield/ent/user_delete.go b/entc/integration/edgefield/ent/user_delete.go index 6967068a7..fe598239f 100644 --- a/entc/integration/edgefield/ent/user_delete.go +++ b/entc/integration/edgefield/ent/user_delete.go @@ -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. diff --git a/entc/integration/edgefield/ent/user_update.go b/entc/integration/edgefield/ent/user_update.go index 2f8d4b041..b4630d2ca 100644 --- a/entc/integration/edgefield/ent/user_update.go +++ b/entc/integration/edgefield/ent/user_update.go @@ -268,7 +268,7 @@ func (uu *UserUpdate) RemoveRentals(r ...*Rental) *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. @@ -834,7 +834,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. diff --git a/entc/integration/edgeschema/ent/attachedfile_create.go b/entc/integration/edgeschema/ent/attachedfile_create.go index 412a3ce09..d91b8719e 100644 --- a/entc/integration/edgeschema/ent/attachedfile_create.go +++ b/entc/integration/edgeschema/ent/attachedfile_create.go @@ -78,7 +78,7 @@ func (afc *AttachedFileCreate) Mutation() *AttachedFileMutation { // Save creates the AttachedFile in the database. func (afc *AttachedFileCreate) Save(ctx context.Context) (*AttachedFile, error) { afc.defaults() - return withHooks[*AttachedFile, AttachedFileMutation](ctx, afc.sqlSave, afc.mutation, afc.hooks) + return withHooks(ctx, afc.sqlSave, afc.mutation, afc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/edgeschema/ent/attachedfile_delete.go b/entc/integration/edgeschema/ent/attachedfile_delete.go index 3920ed4d3..8460b0901 100644 --- a/entc/integration/edgeschema/ent/attachedfile_delete.go +++ b/entc/integration/edgeschema/ent/attachedfile_delete.go @@ -31,7 +31,7 @@ func (afd *AttachedFileDelete) Where(ps ...predicate.AttachedFile) *AttachedFile // Exec executes the deletion query and returns how many vertices were deleted. func (afd *AttachedFileDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, AttachedFileMutation](ctx, afd.sqlExec, afd.mutation, afd.hooks) + return withHooks(ctx, afd.sqlExec, afd.mutation, afd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/attachedfile_update.go b/entc/integration/edgeschema/ent/attachedfile_update.go index 4c5f74f41..4a1717738 100644 --- a/entc/integration/edgeschema/ent/attachedfile_update.go +++ b/entc/integration/edgeschema/ent/attachedfile_update.go @@ -95,7 +95,7 @@ func (afu *AttachedFileUpdate) ClearProc() *AttachedFileUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (afu *AttachedFileUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, AttachedFileMutation](ctx, afu.sqlSave, afu.mutation, afu.hooks) + return withHooks(ctx, afu.sqlSave, afu.mutation, afu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -298,7 +298,7 @@ func (afuo *AttachedFileUpdateOne) Select(field string, fields ...string) *Attac // Save executes the query and returns the updated AttachedFile entity. func (afuo *AttachedFileUpdateOne) Save(ctx context.Context) (*AttachedFile, error) { - return withHooks[*AttachedFile, AttachedFileMutation](ctx, afuo.sqlSave, afuo.mutation, afuo.hooks) + return withHooks(ctx, afuo.sqlSave, afuo.mutation, afuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/file_create.go b/entc/integration/edgeschema/ent/file_create.go index 74b4cf291..f81dcdffd 100644 --- a/entc/integration/edgeschema/ent/file_create.go +++ b/entc/integration/edgeschema/ent/file_create.go @@ -54,7 +54,7 @@ func (fc *FileCreate) Mutation() *FileMutation { // Save creates the File in the database. func (fc *FileCreate) Save(ctx context.Context) (*File, error) { - return withHooks[*File, FileMutation](ctx, fc.sqlSave, fc.mutation, fc.hooks) + return withHooks(ctx, fc.sqlSave, fc.mutation, fc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/edgeschema/ent/file_delete.go b/entc/integration/edgeschema/ent/file_delete.go index a8e550e6f..74f83f5fd 100644 --- a/entc/integration/edgeschema/ent/file_delete.go +++ b/entc/integration/edgeschema/ent/file_delete.go @@ -31,7 +31,7 @@ func (fd *FileDelete) Where(ps ...predicate.File) *FileDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (fd *FileDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, FileMutation](ctx, fd.sqlExec, fd.mutation, fd.hooks) + return withHooks(ctx, fd.sqlExec, fd.mutation, fd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/file_update.go b/entc/integration/edgeschema/ent/file_update.go index b6953f03c..14eef1c02 100644 --- a/entc/integration/edgeschema/ent/file_update.go +++ b/entc/integration/edgeschema/ent/file_update.go @@ -81,7 +81,7 @@ func (fu *FileUpdate) RemoveProcesses(p ...*Process) *FileUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (fu *FileUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, FileMutation](ctx, fu.sqlSave, fu.mutation, fu.hooks) + return withHooks(ctx, fu.sqlSave, fu.mutation, fu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -245,7 +245,7 @@ func (fuo *FileUpdateOne) Select(field string, fields ...string) *FileUpdateOne // Save executes the query and returns the updated File entity. func (fuo *FileUpdateOne) Save(ctx context.Context) (*File, error) { - return withHooks[*File, FileMutation](ctx, fuo.sqlSave, fuo.mutation, fuo.hooks) + return withHooks(ctx, fuo.sqlSave, fuo.mutation, fuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/friendship_create.go b/entc/integration/edgeschema/ent/friendship_create.go index c03938333..b24e9872e 100644 --- a/entc/integration/edgeschema/ent/friendship_create.go +++ b/entc/integration/edgeschema/ent/friendship_create.go @@ -85,7 +85,7 @@ func (fc *FriendshipCreate) Mutation() *FriendshipMutation { // Save creates the Friendship in the database. func (fc *FriendshipCreate) Save(ctx context.Context) (*Friendship, error) { fc.defaults() - return withHooks[*Friendship, FriendshipMutation](ctx, fc.sqlSave, fc.mutation, fc.hooks) + return withHooks(ctx, fc.sqlSave, fc.mutation, fc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/edgeschema/ent/friendship_delete.go b/entc/integration/edgeschema/ent/friendship_delete.go index 9cf58c8de..781bca513 100644 --- a/entc/integration/edgeschema/ent/friendship_delete.go +++ b/entc/integration/edgeschema/ent/friendship_delete.go @@ -31,7 +31,7 @@ func (fd *FriendshipDelete) Where(ps ...predicate.Friendship) *FriendshipDelete // Exec executes the deletion query and returns how many vertices were deleted. func (fd *FriendshipDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, FriendshipMutation](ctx, fd.sqlExec, fd.mutation, fd.hooks) + return withHooks(ctx, fd.sqlExec, fd.mutation, fd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/friendship_update.go b/entc/integration/edgeschema/ent/friendship_update.go index 779e2f41e..5fae6b910 100644 --- a/entc/integration/edgeschema/ent/friendship_update.go +++ b/entc/integration/edgeschema/ent/friendship_update.go @@ -74,7 +74,7 @@ func (fu *FriendshipUpdate) Mutation() *FriendshipMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (fu *FriendshipUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, FriendshipMutation](ctx, fu.sqlSave, fu.mutation, fu.hooks) + return withHooks(ctx, fu.sqlSave, fu.mutation, fu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -206,7 +206,7 @@ func (fuo *FriendshipUpdateOne) Select(field string, fields ...string) *Friendsh // Save executes the query and returns the updated Friendship entity. func (fuo *FriendshipUpdateOne) Save(ctx context.Context) (*Friendship, error) { - return withHooks[*Friendship, FriendshipMutation](ctx, fuo.sqlSave, fuo.mutation, fuo.hooks) + return withHooks(ctx, fuo.sqlSave, fuo.mutation, fuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/group_create.go b/entc/integration/edgeschema/ent/group_create.go index fe575b88b..5dee031bb 100644 --- a/entc/integration/edgeschema/ent/group_create.go +++ b/entc/integration/edgeschema/ent/group_create.go @@ -111,7 +111,7 @@ func (gc *GroupCreate) Mutation() *GroupMutation { // Save creates the Group in the database. func (gc *GroupCreate) Save(ctx context.Context) (*Group, error) { gc.defaults() - 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. diff --git a/entc/integration/edgeschema/ent/group_delete.go b/entc/integration/edgeschema/ent/group_delete.go index 83e27307d..1342dbbff 100644 --- a/entc/integration/edgeschema/ent/group_delete.go +++ b/entc/integration/edgeschema/ent/group_delete.go @@ -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. diff --git a/entc/integration/edgeschema/ent/group_update.go b/entc/integration/edgeschema/ent/group_update.go index 05272b4c0..a92640307 100644 --- a/entc/integration/edgeschema/ent/group_update.go +++ b/entc/integration/edgeschema/ent/group_update.go @@ -200,7 +200,7 @@ func (gu *GroupUpdate) RemoveGroupTags(g ...*GroupTag) *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. @@ -627,7 +627,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. diff --git a/entc/integration/edgeschema/ent/grouptag_create.go b/entc/integration/edgeschema/ent/grouptag_create.go index 652e938e9..34cdf8c66 100644 --- a/entc/integration/edgeschema/ent/grouptag_create.go +++ b/entc/integration/edgeschema/ent/grouptag_create.go @@ -56,7 +56,7 @@ func (gtc *GroupTagCreate) Mutation() *GroupTagMutation { // Save creates the GroupTag in the database. func (gtc *GroupTagCreate) Save(ctx context.Context) (*GroupTag, error) { - return withHooks[*GroupTag, GroupTagMutation](ctx, gtc.sqlSave, gtc.mutation, gtc.hooks) + return withHooks(ctx, gtc.sqlSave, gtc.mutation, gtc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/edgeschema/ent/grouptag_delete.go b/entc/integration/edgeschema/ent/grouptag_delete.go index 5fd132337..614fb2aa5 100644 --- a/entc/integration/edgeschema/ent/grouptag_delete.go +++ b/entc/integration/edgeschema/ent/grouptag_delete.go @@ -31,7 +31,7 @@ func (gtd *GroupTagDelete) Where(ps ...predicate.GroupTag) *GroupTagDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (gtd *GroupTagDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, GroupTagMutation](ctx, gtd.sqlExec, gtd.mutation, gtd.hooks) + return withHooks(ctx, gtd.sqlExec, gtd.mutation, gtd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/grouptag_update.go b/entc/integration/edgeschema/ent/grouptag_update.go index 69be09170..a254f9c2e 100644 --- a/entc/integration/edgeschema/ent/grouptag_update.go +++ b/entc/integration/edgeschema/ent/grouptag_update.go @@ -74,7 +74,7 @@ func (gtu *GroupTagUpdate) ClearGroup() *GroupTagUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (gtu *GroupTagUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, GroupTagMutation](ctx, gtu.sqlSave, gtu.mutation, gtu.hooks) + return withHooks(ctx, gtu.sqlSave, gtu.mutation, gtu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -254,7 +254,7 @@ func (gtuo *GroupTagUpdateOne) Select(field string, fields ...string) *GroupTagU // Save executes the query and returns the updated GroupTag entity. func (gtuo *GroupTagUpdateOne) Save(ctx context.Context) (*GroupTag, error) { - return withHooks[*GroupTag, GroupTagMutation](ctx, gtuo.sqlSave, gtuo.mutation, gtuo.hooks) + return withHooks(ctx, gtuo.sqlSave, gtuo.mutation, gtuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/process_create.go b/entc/integration/edgeschema/ent/process_create.go index d308425b3..7a9dd5b07 100644 --- a/entc/integration/edgeschema/ent/process_create.go +++ b/entc/integration/edgeschema/ent/process_create.go @@ -64,7 +64,7 @@ func (pc *ProcessCreate) Mutation() *ProcessMutation { // Save creates the Process in the database. func (pc *ProcessCreate) Save(ctx context.Context) (*Process, error) { - return withHooks[*Process, ProcessMutation](ctx, pc.sqlSave, pc.mutation, pc.hooks) + return withHooks(ctx, pc.sqlSave, pc.mutation, pc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/edgeschema/ent/process_delete.go b/entc/integration/edgeschema/ent/process_delete.go index 9221f8a88..a07996266 100644 --- a/entc/integration/edgeschema/ent/process_delete.go +++ b/entc/integration/edgeschema/ent/process_delete.go @@ -31,7 +31,7 @@ func (pd *ProcessDelete) Where(ps ...predicate.Process) *ProcessDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (pd *ProcessDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, ProcessMutation](ctx, pd.sqlExec, pd.mutation, pd.hooks) + return withHooks(ctx, pd.sqlExec, pd.mutation, pd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/process_update.go b/entc/integration/edgeschema/ent/process_update.go index 4f6a6eb0a..0aebd4de0 100644 --- a/entc/integration/edgeschema/ent/process_update.go +++ b/entc/integration/edgeschema/ent/process_update.go @@ -112,7 +112,7 @@ func (pu *ProcessUpdate) RemoveAttachedFiles(a ...*AttachedFile) *ProcessUpdate // Save executes the query and returns the number of nodes affected by the update operation. func (pu *ProcessUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, ProcessMutation](ctx, pu.sqlSave, pu.mutation, pu.hooks) + return withHooks(ctx, pu.sqlSave, pu.mutation, pu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -360,7 +360,7 @@ func (puo *ProcessUpdateOne) Select(field string, fields ...string) *ProcessUpda // Save executes the query and returns the updated Process entity. func (puo *ProcessUpdateOne) Save(ctx context.Context) (*Process, error) { - return withHooks[*Process, ProcessMutation](ctx, puo.sqlSave, puo.mutation, puo.hooks) + return withHooks(ctx, puo.sqlSave, puo.mutation, puo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/relationship_create.go b/entc/integration/edgeschema/ent/relationship_create.go index 39a8e0ecc..39c4f762f 100644 --- a/entc/integration/edgeschema/ent/relationship_create.go +++ b/entc/integration/edgeschema/ent/relationship_create.go @@ -92,7 +92,7 @@ func (rc *RelationshipCreate) Save(ctx context.Context) (*Relationship, error) { if err := rc.defaults(); err != nil { return nil, err } - return withHooks[*Relationship, RelationshipMutation](ctx, rc.sqlSave, rc.mutation, rc.hooks) + return withHooks(ctx, rc.sqlSave, rc.mutation, rc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/edgeschema/ent/relationship_delete.go b/entc/integration/edgeschema/ent/relationship_delete.go index 02eafc9e2..ac09090ca 100644 --- a/entc/integration/edgeschema/ent/relationship_delete.go +++ b/entc/integration/edgeschema/ent/relationship_delete.go @@ -30,7 +30,7 @@ func (rd *RelationshipDelete) Where(ps ...predicate.Relationship) *RelationshipD // Exec executes the deletion query and returns how many vertices were deleted. func (rd *RelationshipDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, RelationshipMutation](ctx, rd.sqlExec, rd.mutation, rd.hooks) + return withHooks(ctx, rd.sqlExec, rd.mutation, rd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/relationship_update.go b/entc/integration/edgeschema/ent/relationship_update.go index 22a957bd4..7c7645131 100644 --- a/entc/integration/edgeschema/ent/relationship_update.go +++ b/entc/integration/edgeschema/ent/relationship_update.go @@ -126,7 +126,7 @@ func (ru *RelationshipUpdate) ClearInfo() *RelationshipUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (ru *RelationshipUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, RelationshipMutation](ctx, ru.sqlSave, ru.mutation, ru.hooks) + return withHooks(ctx, ru.sqlSave, ru.mutation, ru.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -393,7 +393,7 @@ func (ruo *RelationshipUpdateOne) Select(field string, fields ...string) *Relati // Save executes the query and returns the updated Relationship entity. func (ruo *RelationshipUpdateOne) Save(ctx context.Context) (*Relationship, error) { - return withHooks[*Relationship, RelationshipMutation](ctx, ruo.sqlSave, ruo.mutation, ruo.hooks) + return withHooks(ctx, ruo.sqlSave, ruo.mutation, ruo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/relationshipinfo_create.go b/entc/integration/edgeschema/ent/relationshipinfo_create.go index f1752c595..dbd4681f3 100644 --- a/entc/integration/edgeschema/ent/relationshipinfo_create.go +++ b/entc/integration/edgeschema/ent/relationshipinfo_create.go @@ -38,7 +38,7 @@ func (ric *RelationshipInfoCreate) Mutation() *RelationshipInfoMutation { // Save creates the RelationshipInfo in the database. func (ric *RelationshipInfoCreate) Save(ctx context.Context) (*RelationshipInfo, error) { - return withHooks[*RelationshipInfo, RelationshipInfoMutation](ctx, ric.sqlSave, ric.mutation, ric.hooks) + return withHooks(ctx, ric.sqlSave, ric.mutation, ric.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/edgeschema/ent/relationshipinfo_delete.go b/entc/integration/edgeschema/ent/relationshipinfo_delete.go index 2134af1c7..d45e60abb 100644 --- a/entc/integration/edgeschema/ent/relationshipinfo_delete.go +++ b/entc/integration/edgeschema/ent/relationshipinfo_delete.go @@ -31,7 +31,7 @@ func (rid *RelationshipInfoDelete) Where(ps ...predicate.RelationshipInfo) *Rela // Exec executes the deletion query and returns how many vertices were deleted. func (rid *RelationshipInfoDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, RelationshipInfoMutation](ctx, rid.sqlExec, rid.mutation, rid.hooks) + return withHooks(ctx, rid.sqlExec, rid.mutation, rid.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/relationshipinfo_update.go b/entc/integration/edgeschema/ent/relationshipinfo_update.go index 3e0c0a6c2..35ddeb640 100644 --- a/entc/integration/edgeschema/ent/relationshipinfo_update.go +++ b/entc/integration/edgeschema/ent/relationshipinfo_update.go @@ -44,7 +44,7 @@ func (riu *RelationshipInfoUpdate) Mutation() *RelationshipInfoMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (riu *RelationshipInfoUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, RelationshipInfoMutation](ctx, riu.sqlSave, riu.mutation, riu.hooks) + return withHooks(ctx, riu.sqlSave, riu.mutation, riu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -127,7 +127,7 @@ func (riuo *RelationshipInfoUpdateOne) Select(field string, fields ...string) *R // Save executes the query and returns the updated RelationshipInfo entity. func (riuo *RelationshipInfoUpdateOne) Save(ctx context.Context) (*RelationshipInfo, error) { - return withHooks[*RelationshipInfo, RelationshipInfoMutation](ctx, riuo.sqlSave, riuo.mutation, riuo.hooks) + return withHooks(ctx, riuo.sqlSave, riuo.mutation, riuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/role_create.go b/entc/integration/edgeschema/ent/role_create.go index 861adc6e9..4edcc4115 100644 --- a/entc/integration/edgeschema/ent/role_create.go +++ b/entc/integration/edgeschema/ent/role_create.go @@ -70,7 +70,7 @@ func (rc *RoleCreate) Mutation() *RoleMutation { // Save creates the Role in the database. func (rc *RoleCreate) Save(ctx context.Context) (*Role, error) { rc.defaults() - return withHooks[*Role, RoleMutation](ctx, rc.sqlSave, rc.mutation, rc.hooks) + return withHooks(ctx, rc.sqlSave, rc.mutation, rc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/edgeschema/ent/role_delete.go b/entc/integration/edgeschema/ent/role_delete.go index 163743ae4..0ecb19bba 100644 --- a/entc/integration/edgeschema/ent/role_delete.go +++ b/entc/integration/edgeschema/ent/role_delete.go @@ -31,7 +31,7 @@ func (rd *RoleDelete) Where(ps ...predicate.Role) *RoleDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (rd *RoleDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, RoleMutation](ctx, rd.sqlExec, rd.mutation, rd.hooks) + return withHooks(ctx, rd.sqlExec, rd.mutation, rd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/role_update.go b/entc/integration/edgeschema/ent/role_update.go index cd27c4463..8244a8264 100644 --- a/entc/integration/edgeschema/ent/role_update.go +++ b/entc/integration/edgeschema/ent/role_update.go @@ -96,7 +96,7 @@ func (ru *RoleUpdate) RemoveUser(u ...*User) *RoleUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (ru *RoleUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, RoleMutation](ctx, ru.sqlSave, ru.mutation, ru.hooks) + return withHooks(ctx, ru.sqlSave, ru.mutation, ru.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -289,7 +289,7 @@ func (ruo *RoleUpdateOne) Select(field string, fields ...string) *RoleUpdateOne // Save executes the query and returns the updated Role entity. func (ruo *RoleUpdateOne) Save(ctx context.Context) (*Role, error) { - return withHooks[*Role, RoleMutation](ctx, ruo.sqlSave, ruo.mutation, ruo.hooks) + return withHooks(ctx, ruo.sqlSave, ruo.mutation, ruo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/roleuser_create.go b/entc/integration/edgeschema/ent/roleuser_create.go index c2c37dd6e..5451835d6 100644 --- a/entc/integration/edgeschema/ent/roleuser_create.go +++ b/entc/integration/edgeschema/ent/roleuser_create.go @@ -72,7 +72,7 @@ func (ruc *RoleUserCreate) Mutation() *RoleUserMutation { // Save creates the RoleUser in the database. func (ruc *RoleUserCreate) Save(ctx context.Context) (*RoleUser, error) { ruc.defaults() - return withHooks[*RoleUser, RoleUserMutation](ctx, ruc.sqlSave, ruc.mutation, ruc.hooks) + return withHooks(ctx, ruc.sqlSave, ruc.mutation, ruc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/edgeschema/ent/roleuser_delete.go b/entc/integration/edgeschema/ent/roleuser_delete.go index d9abf3b67..b745e0943 100644 --- a/entc/integration/edgeschema/ent/roleuser_delete.go +++ b/entc/integration/edgeschema/ent/roleuser_delete.go @@ -30,7 +30,7 @@ func (rud *RoleUserDelete) Where(ps ...predicate.RoleUser) *RoleUserDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (rud *RoleUserDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, RoleUserMutation](ctx, rud.sqlExec, rud.mutation, rud.hooks) + return withHooks(ctx, rud.sqlExec, rud.mutation, rud.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/roleuser_update.go b/entc/integration/edgeschema/ent/roleuser_update.go index 696ff0963..9a9f7434f 100644 --- a/entc/integration/edgeschema/ent/roleuser_update.go +++ b/entc/integration/edgeschema/ent/roleuser_update.go @@ -89,7 +89,7 @@ func (ruu *RoleUserUpdate) ClearUser() *RoleUserUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (ruu *RoleUserUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, RoleUserMutation](ctx, ruu.sqlSave, ruu.mutation, ruu.hooks) + return withHooks(ctx, ruu.sqlSave, ruu.mutation, ruu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -286,7 +286,7 @@ func (ruuo *RoleUserUpdateOne) Select(field string, fields ...string) *RoleUserU // Save executes the query and returns the updated RoleUser entity. func (ruuo *RoleUserUpdateOne) Save(ctx context.Context) (*RoleUser, error) { - return withHooks[*RoleUser, RoleUserMutation](ctx, ruuo.sqlSave, ruuo.mutation, ruuo.hooks) + return withHooks(ctx, ruuo.sqlSave, ruuo.mutation, ruuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/tag_create.go b/entc/integration/edgeschema/ent/tag_create.go index 879594443..9decc9906 100644 --- a/entc/integration/edgeschema/ent/tag_create.go +++ b/entc/integration/edgeschema/ent/tag_create.go @@ -103,7 +103,7 @@ func (tc *TagCreate) Mutation() *TagMutation { // Save creates the Tag in the database. func (tc *TagCreate) Save(ctx context.Context) (*Tag, error) { - return withHooks[*Tag, TagMutation](ctx, tc.sqlSave, tc.mutation, tc.hooks) + return withHooks(ctx, tc.sqlSave, tc.mutation, tc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/edgeschema/ent/tag_delete.go b/entc/integration/edgeschema/ent/tag_delete.go index 016d647cf..a79118e24 100644 --- a/entc/integration/edgeschema/ent/tag_delete.go +++ b/entc/integration/edgeschema/ent/tag_delete.go @@ -31,7 +31,7 @@ func (td *TagDelete) Where(ps ...predicate.Tag) *TagDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (td *TagDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, TagMutation](ctx, td.sqlExec, td.mutation, td.hooks) + return withHooks(ctx, td.sqlExec, td.mutation, td.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/tag_update.go b/entc/integration/edgeschema/ent/tag_update.go index 5e9b49d8d..eb1db4292 100644 --- a/entc/integration/edgeschema/ent/tag_update.go +++ b/entc/integration/edgeschema/ent/tag_update.go @@ -193,7 +193,7 @@ func (tu *TagUpdate) RemoveGroupTags(g ...*GroupTag) *TagUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (tu *TagUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, TagMutation](ctx, tu.sqlSave, tu.mutation, tu.hooks) + return withHooks(ctx, tu.sqlSave, tu.mutation, tu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -621,7 +621,7 @@ func (tuo *TagUpdateOne) Select(field string, fields ...string) *TagUpdateOne { // Save executes the query and returns the updated Tag entity. func (tuo *TagUpdateOne) Save(ctx context.Context) (*Tag, error) { - return withHooks[*Tag, TagMutation](ctx, tuo.sqlSave, tuo.mutation, tuo.hooks) + return withHooks(ctx, tuo.sqlSave, tuo.mutation, tuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/tweet_create.go b/entc/integration/edgeschema/ent/tweet_create.go index 523c1ca29..1ea8e3326 100644 --- a/entc/integration/edgeschema/ent/tweet_create.go +++ b/entc/integration/edgeschema/ent/tweet_create.go @@ -118,7 +118,7 @@ func (tc *TweetCreate) Mutation() *TweetMutation { // Save creates the Tweet in the database. func (tc *TweetCreate) Save(ctx context.Context) (*Tweet, error) { - return withHooks[*Tweet, TweetMutation](ctx, tc.sqlSave, tc.mutation, tc.hooks) + return withHooks(ctx, tc.sqlSave, tc.mutation, tc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/edgeschema/ent/tweet_delete.go b/entc/integration/edgeschema/ent/tweet_delete.go index 5f4c844e3..c081fc661 100644 --- a/entc/integration/edgeschema/ent/tweet_delete.go +++ b/entc/integration/edgeschema/ent/tweet_delete.go @@ -31,7 +31,7 @@ func (td *TweetDelete) Where(ps ...predicate.Tweet) *TweetDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (td *TweetDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, TweetMutation](ctx, td.sqlExec, td.mutation, td.hooks) + return withHooks(ctx, td.sqlExec, td.mutation, td.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/tweet_update.go b/entc/integration/edgeschema/ent/tweet_update.go index a166bea7f..3015729e3 100644 --- a/entc/integration/edgeschema/ent/tweet_update.go +++ b/entc/integration/edgeschema/ent/tweet_update.go @@ -229,7 +229,7 @@ func (tu *TweetUpdate) RemoveTweetTags(t ...*TweetTag) *TweetUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (tu *TweetUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, TweetMutation](ctx, tu.sqlSave, tu.mutation, tu.hooks) + return withHooks(ctx, tu.sqlSave, tu.mutation, tu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -762,7 +762,7 @@ func (tuo *TweetUpdateOne) Select(field string, fields ...string) *TweetUpdateOn // Save executes the query and returns the updated Tweet entity. func (tuo *TweetUpdateOne) Save(ctx context.Context) (*Tweet, error) { - return withHooks[*Tweet, TweetMutation](ctx, tuo.sqlSave, tuo.mutation, tuo.hooks) + return withHooks(ctx, tuo.sqlSave, tuo.mutation, tuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/tweetlike_create.go b/entc/integration/edgeschema/ent/tweetlike_create.go index be6e7cacf..92e1e3750 100644 --- a/entc/integration/edgeschema/ent/tweetlike_create.go +++ b/entc/integration/edgeschema/ent/tweetlike_create.go @@ -74,7 +74,7 @@ func (tlc *TweetLikeCreate) Save(ctx context.Context) (*TweetLike, error) { if err := tlc.defaults(); err != nil { return nil, err } - return withHooks[*TweetLike, TweetLikeMutation](ctx, tlc.sqlSave, tlc.mutation, tlc.hooks) + return withHooks(ctx, tlc.sqlSave, tlc.mutation, tlc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/edgeschema/ent/tweetlike_delete.go b/entc/integration/edgeschema/ent/tweetlike_delete.go index b9cd2423e..658621e9a 100644 --- a/entc/integration/edgeschema/ent/tweetlike_delete.go +++ b/entc/integration/edgeschema/ent/tweetlike_delete.go @@ -30,7 +30,7 @@ func (tld *TweetLikeDelete) Where(ps ...predicate.TweetLike) *TweetLikeDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (tld *TweetLikeDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, TweetLikeMutation](ctx, tld.sqlExec, tld.mutation, tld.hooks) + return withHooks(ctx, tld.sqlExec, tld.mutation, tld.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/tweetlike_update.go b/entc/integration/edgeschema/ent/tweetlike_update.go index 8a1f480d3..6b72239ac 100644 --- a/entc/integration/edgeschema/ent/tweetlike_update.go +++ b/entc/integration/edgeschema/ent/tweetlike_update.go @@ -89,7 +89,7 @@ func (tlu *TweetLikeUpdate) ClearUser() *TweetLikeUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (tlu *TweetLikeUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, TweetLikeMutation](ctx, tlu.sqlSave, tlu.mutation, tlu.hooks) + return withHooks(ctx, tlu.sqlSave, tlu.mutation, tlu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -286,7 +286,7 @@ func (tluo *TweetLikeUpdateOne) Select(field string, fields ...string) *TweetLik // Save executes the query and returns the updated TweetLike entity. func (tluo *TweetLikeUpdateOne) Save(ctx context.Context) (*TweetLike, error) { - return withHooks[*TweetLike, TweetLikeMutation](ctx, tluo.sqlSave, tluo.mutation, tluo.hooks) + return withHooks(ctx, tluo.sqlSave, tluo.mutation, tluo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/tweettag_create.go b/entc/integration/edgeschema/ent/tweettag_create.go index cfe6e9535..1ab4dd03a 100644 --- a/entc/integration/edgeschema/ent/tweettag_create.go +++ b/entc/integration/edgeschema/ent/tweettag_create.go @@ -88,7 +88,7 @@ func (ttc *TweetTagCreate) Mutation() *TweetTagMutation { // Save creates the TweetTag in the database. func (ttc *TweetTagCreate) Save(ctx context.Context) (*TweetTag, error) { ttc.defaults() - return withHooks[*TweetTag, TweetTagMutation](ctx, ttc.sqlSave, ttc.mutation, ttc.hooks) + return withHooks(ctx, ttc.sqlSave, ttc.mutation, ttc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/edgeschema/ent/tweettag_delete.go b/entc/integration/edgeschema/ent/tweettag_delete.go index 64ad80bfc..ac07af664 100644 --- a/entc/integration/edgeschema/ent/tweettag_delete.go +++ b/entc/integration/edgeschema/ent/tweettag_delete.go @@ -31,7 +31,7 @@ func (ttd *TweetTagDelete) Where(ps ...predicate.TweetTag) *TweetTagDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (ttd *TweetTagDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, TweetTagMutation](ctx, ttd.sqlExec, ttd.mutation, ttd.hooks) + return withHooks(ctx, ttd.sqlExec, ttd.mutation, ttd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/tweettag_update.go b/entc/integration/edgeschema/ent/tweettag_update.go index c51a9ea4f..a1cd63bd3 100644 --- a/entc/integration/edgeschema/ent/tweettag_update.go +++ b/entc/integration/edgeschema/ent/tweettag_update.go @@ -89,7 +89,7 @@ func (ttu *TweetTagUpdate) ClearTweet() *TweetTagUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (ttu *TweetTagUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, TweetTagMutation](ctx, ttu.sqlSave, ttu.mutation, ttu.hooks) + return withHooks(ctx, ttu.sqlSave, ttu.mutation, ttu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -286,7 +286,7 @@ func (ttuo *TweetTagUpdateOne) Select(field string, fields ...string) *TweetTagU // Save executes the query and returns the updated TweetTag entity. func (ttuo *TweetTagUpdateOne) Save(ctx context.Context) (*TweetTag, error) { - return withHooks[*TweetTag, TweetTagMutation](ctx, ttuo.sqlSave, ttuo.mutation, ttuo.hooks) + return withHooks(ctx, ttuo.sqlSave, ttuo.mutation, ttuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/user_create.go b/entc/integration/edgeschema/ent/user_create.go index deab59370..67ac74b2d 100644 --- a/entc/integration/edgeschema/ent/user_create.go +++ b/entc/integration/edgeschema/ent/user_create.go @@ -190,7 +190,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. diff --git a/entc/integration/edgeschema/ent/user_delete.go b/entc/integration/edgeschema/ent/user_delete.go index 256734ebb..8a28f8a0d 100644 --- a/entc/integration/edgeschema/ent/user_delete.go +++ b/entc/integration/edgeschema/ent/user_delete.go @@ -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. diff --git a/entc/integration/edgeschema/ent/user_update.go b/entc/integration/edgeschema/ent/user_update.go index 5bbed0667..d1a108773 100644 --- a/entc/integration/edgeschema/ent/user_update.go +++ b/entc/integration/edgeschema/ent/user_update.go @@ -382,7 +382,7 @@ func (uu *UserUpdate) RemoveUserTweets(u ...*UserTweet) *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. @@ -1274,7 +1274,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. diff --git a/entc/integration/edgeschema/ent/usergroup_create.go b/entc/integration/edgeschema/ent/usergroup_create.go index 6055ccecb..23d59c25d 100644 --- a/entc/integration/edgeschema/ent/usergroup_create.go +++ b/entc/integration/edgeschema/ent/usergroup_create.go @@ -72,7 +72,7 @@ func (ugc *UserGroupCreate) Mutation() *UserGroupMutation { // Save creates the UserGroup in the database. func (ugc *UserGroupCreate) Save(ctx context.Context) (*UserGroup, error) { ugc.defaults() - return withHooks[*UserGroup, UserGroupMutation](ctx, ugc.sqlSave, ugc.mutation, ugc.hooks) + return withHooks(ctx, ugc.sqlSave, ugc.mutation, ugc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/edgeschema/ent/usergroup_delete.go b/entc/integration/edgeschema/ent/usergroup_delete.go index f13fc839d..35116c787 100644 --- a/entc/integration/edgeschema/ent/usergroup_delete.go +++ b/entc/integration/edgeschema/ent/usergroup_delete.go @@ -31,7 +31,7 @@ func (ugd *UserGroupDelete) Where(ps ...predicate.UserGroup) *UserGroupDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (ugd *UserGroupDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, UserGroupMutation](ctx, ugd.sqlExec, ugd.mutation, ugd.hooks) + return withHooks(ctx, ugd.sqlExec, ugd.mutation, ugd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/usergroup_update.go b/entc/integration/edgeschema/ent/usergroup_update.go index 2af33c920..63d128690 100644 --- a/entc/integration/edgeschema/ent/usergroup_update.go +++ b/entc/integration/edgeschema/ent/usergroup_update.go @@ -89,7 +89,7 @@ func (ugu *UserGroupUpdate) ClearGroup() *UserGroupUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (ugu *UserGroupUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, UserGroupMutation](ctx, ugu.sqlSave, ugu.mutation, ugu.hooks) + return withHooks(ctx, ugu.sqlSave, ugu.mutation, ugu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -286,7 +286,7 @@ func (uguo *UserGroupUpdateOne) Select(field string, fields ...string) *UserGrou // Save executes the query and returns the updated UserGroup entity. func (uguo *UserGroupUpdateOne) Save(ctx context.Context) (*UserGroup, error) { - return withHooks[*UserGroup, UserGroupMutation](ctx, uguo.sqlSave, uguo.mutation, uguo.hooks) + return withHooks(ctx, uguo.sqlSave, uguo.mutation, uguo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/usertweet_create.go b/entc/integration/edgeschema/ent/usertweet_create.go index 9f3289938..eb1d7b6ca 100644 --- a/entc/integration/edgeschema/ent/usertweet_create.go +++ b/entc/integration/edgeschema/ent/usertweet_create.go @@ -72,7 +72,7 @@ func (utc *UserTweetCreate) Mutation() *UserTweetMutation { // Save creates the UserTweet in the database. func (utc *UserTweetCreate) Save(ctx context.Context) (*UserTweet, error) { utc.defaults() - return withHooks[*UserTweet, UserTweetMutation](ctx, utc.sqlSave, utc.mutation, utc.hooks) + return withHooks(ctx, utc.sqlSave, utc.mutation, utc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/edgeschema/ent/usertweet_delete.go b/entc/integration/edgeschema/ent/usertweet_delete.go index 4360d1097..dccdd29c4 100644 --- a/entc/integration/edgeschema/ent/usertweet_delete.go +++ b/entc/integration/edgeschema/ent/usertweet_delete.go @@ -31,7 +31,7 @@ func (utd *UserTweetDelete) Where(ps ...predicate.UserTweet) *UserTweetDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (utd *UserTweetDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, UserTweetMutation](ctx, utd.sqlExec, utd.mutation, utd.hooks) + return withHooks(ctx, utd.sqlExec, utd.mutation, utd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/edgeschema/ent/usertweet_update.go b/entc/integration/edgeschema/ent/usertweet_update.go index 570f6ea9b..0051db1e6 100644 --- a/entc/integration/edgeschema/ent/usertweet_update.go +++ b/entc/integration/edgeschema/ent/usertweet_update.go @@ -89,7 +89,7 @@ func (utu *UserTweetUpdate) ClearTweet() *UserTweetUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (utu *UserTweetUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, UserTweetMutation](ctx, utu.sqlSave, utu.mutation, utu.hooks) + return withHooks(ctx, utu.sqlSave, utu.mutation, utu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -286,7 +286,7 @@ func (utuo *UserTweetUpdateOne) Select(field string, fields ...string) *UserTwee // Save executes the query and returns the updated UserTweet entity. func (utuo *UserTweetUpdateOne) Save(ctx context.Context) (*UserTweet, error) { - return withHooks[*UserTweet, UserTweetMutation](ctx, utuo.sqlSave, utuo.mutation, utuo.hooks) + return withHooks(ctx, utuo.sqlSave, utuo.mutation, utuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/ent/api_create.go b/entc/integration/ent/api_create.go index 5f258b86c..323188f13 100644 --- a/entc/integration/ent/api_create.go +++ b/entc/integration/ent/api_create.go @@ -32,7 +32,7 @@ func (ac *APICreate) Mutation() *APIMutation { // Save creates the Api in the database. func (ac *APICreate) Save(ctx context.Context) (*Api, error) { - return withHooks[*Api, APIMutation](ctx, ac.sqlSave, ac.mutation, ac.hooks) + return withHooks(ctx, ac.sqlSave, ac.mutation, ac.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/ent/api_delete.go b/entc/integration/ent/api_delete.go index 9ddaee56e..6aa67e1e6 100644 --- a/entc/integration/ent/api_delete.go +++ b/entc/integration/ent/api_delete.go @@ -31,7 +31,7 @@ func (ad *APIDelete) Where(ps ...predicate.Api) *APIDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (ad *APIDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, APIMutation](ctx, ad.sqlExec, ad.mutation, ad.hooks) + return withHooks(ctx, ad.sqlExec, ad.mutation, ad.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/ent/api_update.go b/entc/integration/ent/api_update.go index 7632d692e..93eb6a579 100644 --- a/entc/integration/ent/api_update.go +++ b/entc/integration/ent/api_update.go @@ -39,7 +39,7 @@ func (au *APIUpdate) Mutation() *APIMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (au *APIUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, APIMutation](ctx, au.sqlSave, au.mutation, au.hooks) + return withHooks(ctx, au.sqlSave, au.mutation, au.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -121,7 +121,7 @@ func (auo *APIUpdateOne) Select(field string, fields ...string) *APIUpdateOne { // Save executes the query and returns the updated Api entity. func (auo *APIUpdateOne) Save(ctx context.Context) (*Api, error) { - return withHooks[*Api, APIMutation](ctx, auo.sqlSave, auo.mutation, auo.hooks) + return withHooks(ctx, auo.sqlSave, auo.mutation, auo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/ent/card_create.go b/entc/integration/ent/card_create.go index 46c2a51cc..6294c0ddd 100644 --- a/entc/integration/ent/card_create.go +++ b/entc/integration/ent/card_create.go @@ -132,7 +132,7 @@ func (cc *CardCreate) Mutation() *CardMutation { // Save creates the Card in the database. func (cc *CardCreate) Save(ctx context.Context) (*Card, error) { cc.defaults() - return withHooks[*Card, CardMutation](ctx, cc.sqlSave, cc.mutation, cc.hooks) + return withHooks(ctx, cc.sqlSave, cc.mutation, cc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/ent/card_delete.go b/entc/integration/ent/card_delete.go index b6c2be9c6..edf43d116 100644 --- a/entc/integration/ent/card_delete.go +++ b/entc/integration/ent/card_delete.go @@ -31,7 +31,7 @@ func (cd *CardDelete) Where(ps ...predicate.Card) *CardDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (cd *CardDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, CardMutation](ctx, cd.sqlExec, cd.mutation, cd.hooks) + return withHooks(ctx, cd.sqlExec, cd.mutation, cd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/ent/card_update.go b/entc/integration/ent/card_update.go index c15cc8a3a..5022ef987 100644 --- a/entc/integration/ent/card_update.go +++ b/entc/integration/ent/card_update.go @@ -151,7 +151,7 @@ func (cu *CardUpdate) RemoveSpec(s ...*Spec) *CardUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (cu *CardUpdate) Save(ctx context.Context) (int, error) { cu.defaults() - return withHooks[int, CardMutation](ctx, cu.sqlSave, cu.mutation, cu.hooks) + return withHooks(ctx, cu.sqlSave, cu.mutation, cu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -452,7 +452,7 @@ func (cuo *CardUpdateOne) Select(field string, fields ...string) *CardUpdateOne // Save executes the query and returns the updated Card entity. func (cuo *CardUpdateOne) Save(ctx context.Context) (*Card, error) { cuo.defaults() - return withHooks[*Card, CardMutation](ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) + return withHooks(ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/ent/comment_create.go b/entc/integration/ent/comment_create.go index d56ea7b6a..dcb2f79b4 100644 --- a/entc/integration/ent/comment_create.go +++ b/entc/integration/ent/comment_create.go @@ -101,7 +101,7 @@ func (cc *CommentCreate) Mutation() *CommentMutation { // Save creates the Comment in the database. func (cc *CommentCreate) Save(ctx context.Context) (*Comment, error) { - return withHooks[*Comment, CommentMutation](ctx, cc.sqlSave, cc.mutation, cc.hooks) + return withHooks(ctx, cc.sqlSave, cc.mutation, cc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/ent/comment_delete.go b/entc/integration/ent/comment_delete.go index 13cbbd18a..ee0b4d1ca 100644 --- a/entc/integration/ent/comment_delete.go +++ b/entc/integration/ent/comment_delete.go @@ -31,7 +31,7 @@ func (cd *CommentDelete) Where(ps ...predicate.Comment) *CommentDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (cd *CommentDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, CommentMutation](ctx, cd.sqlExec, cd.mutation, cd.hooks) + return withHooks(ctx, cd.sqlExec, cd.mutation, cd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/ent/comment_update.go b/entc/integration/ent/comment_update.go index ab5806fba..1a3a0441b 100644 --- a/entc/integration/ent/comment_update.go +++ b/entc/integration/ent/comment_update.go @@ -153,7 +153,7 @@ func (cu *CommentUpdate) Mutation() *CommentMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (cu *CommentUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, CommentMutation](ctx, cu.sqlSave, cu.mutation, cu.hooks) + return withHooks(ctx, cu.sqlSave, cu.mutation, cu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -387,7 +387,7 @@ func (cuo *CommentUpdateOne) Select(field string, fields ...string) *CommentUpda // Save executes the query and returns the updated Comment entity. func (cuo *CommentUpdateOne) Save(ctx context.Context) (*Comment, error) { - return withHooks[*Comment, CommentMutation](ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) + return withHooks(ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/ent/exvaluescan_create.go b/entc/integration/ent/exvaluescan_create.go index 3768dd28b..59e917b7e 100644 --- a/entc/integration/ent/exvaluescan_create.go +++ b/entc/integration/ent/exvaluescan_create.go @@ -84,7 +84,7 @@ func (evsc *ExValueScanCreate) Mutation() *ExValueScanMutation { // Save creates the ExValueScan in the database. func (evsc *ExValueScanCreate) Save(ctx context.Context) (*ExValueScan, error) { - return withHooks[*ExValueScan, ExValueScanMutation](ctx, evsc.sqlSave, evsc.mutation, evsc.hooks) + return withHooks(ctx, evsc.sqlSave, evsc.mutation, evsc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/ent/exvaluescan_delete.go b/entc/integration/ent/exvaluescan_delete.go index d554feace..c1b5c34c3 100644 --- a/entc/integration/ent/exvaluescan_delete.go +++ b/entc/integration/ent/exvaluescan_delete.go @@ -31,7 +31,7 @@ func (evsd *ExValueScanDelete) Where(ps ...predicate.ExValueScan) *ExValueScanDe // Exec executes the deletion query and returns how many vertices were deleted. func (evsd *ExValueScanDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, ExValueScanMutation](ctx, evsd.sqlExec, evsd.mutation, evsd.hooks) + return withHooks(ctx, evsd.sqlExec, evsd.mutation, evsd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/ent/exvaluescan_update.go b/entc/integration/ent/exvaluescan_update.go index f38342a8b..420f71c8f 100644 --- a/entc/integration/ent/exvaluescan_update.go +++ b/entc/integration/ent/exvaluescan_update.go @@ -109,7 +109,7 @@ func (evsu *ExValueScanUpdate) Mutation() *ExValueScanMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (evsu *ExValueScanUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, ExValueScanMutation](ctx, evsu.sqlSave, evsu.mutation, evsu.hooks) + return withHooks(ctx, evsu.sqlSave, evsu.mutation, evsu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -317,7 +317,7 @@ func (evsuo *ExValueScanUpdateOne) Select(field string, fields ...string) *ExVal // Save executes the query and returns the updated ExValueScan entity. func (evsuo *ExValueScanUpdateOne) Save(ctx context.Context) (*ExValueScan, error) { - return withHooks[*ExValueScan, ExValueScanMutation](ctx, evsuo.sqlSave, evsuo.mutation, evsuo.hooks) + return withHooks(ctx, evsuo.sqlSave, evsuo.mutation, evsuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/ent/fieldtype_create.go b/entc/integration/ent/fieldtype_create.go index a96059476..8e9477459 100644 --- a/entc/integration/ent/fieldtype_create.go +++ b/entc/integration/ent/fieldtype_create.go @@ -797,7 +797,7 @@ func (ftc *FieldTypeCreate) Mutation() *FieldTypeMutation { // Save creates the FieldType in the database. func (ftc *FieldTypeCreate) Save(ctx context.Context) (*FieldType, error) { ftc.defaults() - return withHooks[*FieldType, FieldTypeMutation](ctx, ftc.sqlSave, ftc.mutation, ftc.hooks) + return withHooks(ctx, ftc.sqlSave, ftc.mutation, ftc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/ent/fieldtype_delete.go b/entc/integration/ent/fieldtype_delete.go index fa7f5704a..322bc90a4 100644 --- a/entc/integration/ent/fieldtype_delete.go +++ b/entc/integration/ent/fieldtype_delete.go @@ -31,7 +31,7 @@ func (ftd *FieldTypeDelete) Where(ps ...predicate.FieldType) *FieldTypeDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (ftd *FieldTypeDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, FieldTypeMutation](ctx, ftd.sqlExec, ftd.mutation, ftd.hooks) + return withHooks(ctx, ftd.sqlExec, ftd.mutation, ftd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/ent/fieldtype_update.go b/entc/integration/ent/fieldtype_update.go index bc8bcda4a..d6ac278a0 100644 --- a/entc/integration/ent/fieldtype_update.go +++ b/entc/integration/ent/fieldtype_update.go @@ -1350,7 +1350,7 @@ func (ftu *FieldTypeUpdate) Mutation() *FieldTypeMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (ftu *FieldTypeUpdate) Save(ctx context.Context) (int, error) { ftu.defaults() - return withHooks[int, FieldTypeMutation](ctx, ftu.sqlSave, ftu.mutation, ftu.hooks) + return withHooks(ctx, ftu.sqlSave, ftu.mutation, ftu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -3263,7 +3263,7 @@ func (ftuo *FieldTypeUpdateOne) Select(field string, fields ...string) *FieldTyp // Save executes the query and returns the updated FieldType entity. func (ftuo *FieldTypeUpdateOne) Save(ctx context.Context) (*FieldType, error) { ftuo.defaults() - return withHooks[*FieldType, FieldTypeMutation](ctx, ftuo.sqlSave, ftuo.mutation, ftuo.hooks) + return withHooks(ctx, ftuo.sqlSave, ftuo.mutation, ftuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/ent/file_create.go b/entc/integration/ent/file_create.go index f0235e2cb..3edef8376 100644 --- a/entc/integration/ent/file_create.go +++ b/entc/integration/ent/file_create.go @@ -165,7 +165,7 @@ func (fc *FileCreate) Mutation() *FileMutation { // Save creates the File in the database. func (fc *FileCreate) Save(ctx context.Context) (*File, error) { fc.defaults() - return withHooks[*File, FileMutation](ctx, fc.sqlSave, fc.mutation, fc.hooks) + return withHooks(ctx, fc.sqlSave, fc.mutation, fc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/ent/file_delete.go b/entc/integration/ent/file_delete.go index 54f23ac53..fb33fbddb 100644 --- a/entc/integration/ent/file_delete.go +++ b/entc/integration/ent/file_delete.go @@ -31,7 +31,7 @@ func (fd *FileDelete) Where(ps ...predicate.File) *FileDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (fd *FileDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, FileMutation](ctx, fd.sqlExec, fd.mutation, fd.hooks) + return withHooks(ctx, fd.sqlExec, fd.mutation, fd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/ent/file_update.go b/entc/integration/ent/file_update.go index f739e6dce..a7f7eb20f 100644 --- a/entc/integration/ent/file_update.go +++ b/entc/integration/ent/file_update.go @@ -242,7 +242,7 @@ func (fu *FileUpdate) RemoveField(f ...*FieldType) *FileUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (fu *FileUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, FileMutation](ctx, fu.sqlSave, fu.mutation, fu.hooks) + return withHooks(ctx, fu.sqlSave, fu.mutation, fu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -676,7 +676,7 @@ func (fuo *FileUpdateOne) Select(field string, fields ...string) *FileUpdateOne // Save executes the query and returns the updated File entity. func (fuo *FileUpdateOne) Save(ctx context.Context) (*File, error) { - return withHooks[*File, FileMutation](ctx, fuo.sqlSave, fuo.mutation, fuo.hooks) + return withHooks(ctx, fuo.sqlSave, fuo.mutation, fuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/ent/filetype_create.go b/entc/integration/ent/filetype_create.go index 7ff3dd2f7..3ca7f2bba 100644 --- a/entc/integration/ent/filetype_create.go +++ b/entc/integration/ent/filetype_create.go @@ -83,7 +83,7 @@ func (ftc *FileTypeCreate) Mutation() *FileTypeMutation { // Save creates the FileType in the database. func (ftc *FileTypeCreate) Save(ctx context.Context) (*FileType, error) { ftc.defaults() - return withHooks[*FileType, FileTypeMutation](ctx, ftc.sqlSave, ftc.mutation, ftc.hooks) + return withHooks(ctx, ftc.sqlSave, ftc.mutation, ftc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/ent/filetype_delete.go b/entc/integration/ent/filetype_delete.go index 7ea7ef7d2..a8e5a5842 100644 --- a/entc/integration/ent/filetype_delete.go +++ b/entc/integration/ent/filetype_delete.go @@ -31,7 +31,7 @@ func (ftd *FileTypeDelete) Where(ps ...predicate.FileType) *FileTypeDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (ftd *FileTypeDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, FileTypeMutation](ctx, ftd.sqlExec, ftd.mutation, ftd.hooks) + return withHooks(ctx, ftd.sqlExec, ftd.mutation, ftd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/ent/filetype_update.go b/entc/integration/ent/filetype_update.go index dba000242..b68f9824e 100644 --- a/entc/integration/ent/filetype_update.go +++ b/entc/integration/ent/filetype_update.go @@ -110,7 +110,7 @@ func (ftu *FileTypeUpdate) RemoveFiles(f ...*File) *FileTypeUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (ftu *FileTypeUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, FileTypeMutation](ctx, ftu.sqlSave, ftu.mutation, ftu.hooks) + return withHooks(ctx, ftu.sqlSave, ftu.mutation, ftu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -334,7 +334,7 @@ func (ftuo *FileTypeUpdateOne) Select(field string, fields ...string) *FileTypeU // Save executes the query and returns the updated FileType entity. func (ftuo *FileTypeUpdateOne) Save(ctx context.Context) (*FileType, error) { - return withHooks[*FileType, FileTypeMutation](ctx, ftuo.sqlSave, ftuo.mutation, ftuo.hooks) + return withHooks(ctx, ftuo.sqlSave, ftuo.mutation, ftuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/ent/goods_create.go b/entc/integration/ent/goods_create.go index d1131ea20..09fa26c3a 100644 --- a/entc/integration/ent/goods_create.go +++ b/entc/integration/ent/goods_create.go @@ -32,7 +32,7 @@ func (gc *GoodsCreate) Mutation() *GoodsMutation { // Save creates the Goods in the database. func (gc *GoodsCreate) Save(ctx context.Context) (*Goods, error) { - return withHooks[*Goods, GoodsMutation](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. diff --git a/entc/integration/ent/goods_delete.go b/entc/integration/ent/goods_delete.go index b92fea4b7..bdb31501c 100644 --- a/entc/integration/ent/goods_delete.go +++ b/entc/integration/ent/goods_delete.go @@ -31,7 +31,7 @@ func (gd *GoodsDelete) Where(ps ...predicate.Goods) *GoodsDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (gd *GoodsDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, GoodsMutation](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. diff --git a/entc/integration/ent/goods_update.go b/entc/integration/ent/goods_update.go index 988928d36..964aa2722 100644 --- a/entc/integration/ent/goods_update.go +++ b/entc/integration/ent/goods_update.go @@ -39,7 +39,7 @@ func (gu *GoodsUpdate) Mutation() *GoodsMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (gu *GoodsUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, GoodsMutation](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. @@ -121,7 +121,7 @@ func (guo *GoodsUpdateOne) Select(field string, fields ...string) *GoodsUpdateOn // Save executes the query and returns the updated Goods entity. func (guo *GoodsUpdateOne) Save(ctx context.Context) (*Goods, error) { - return withHooks[*Goods, GoodsMutation](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. diff --git a/entc/integration/ent/group_create.go b/entc/integration/ent/group_create.go index a6149386e..b24e091cc 100644 --- a/entc/integration/ent/group_create.go +++ b/entc/integration/ent/group_create.go @@ -147,7 +147,7 @@ func (gc *GroupCreate) Mutation() *GroupMutation { // Save creates the Group in the database. func (gc *GroupCreate) Save(ctx context.Context) (*Group, error) { gc.defaults() - 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. diff --git a/entc/integration/ent/group_delete.go b/entc/integration/ent/group_delete.go index 88a1653d3..6d9eb9e55 100644 --- a/entc/integration/ent/group_delete.go +++ b/entc/integration/ent/group_delete.go @@ -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. diff --git a/entc/integration/ent/group_update.go b/entc/integration/ent/group_update.go index 6ab7b90fa..ca7110608 100644 --- a/entc/integration/ent/group_update.go +++ b/entc/integration/ent/group_update.go @@ -241,7 +241,7 @@ func (gu *GroupUpdate) ClearInfo() *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. @@ -735,7 +735,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. diff --git a/entc/integration/ent/groupinfo_create.go b/entc/integration/ent/groupinfo_create.go index 4bd6380f3..e8831bb50 100644 --- a/entc/integration/ent/groupinfo_create.go +++ b/entc/integration/ent/groupinfo_create.go @@ -69,7 +69,7 @@ func (gic *GroupInfoCreate) Mutation() *GroupInfoMutation { // Save creates the GroupInfo in the database. func (gic *GroupInfoCreate) Save(ctx context.Context) (*GroupInfo, error) { gic.defaults() - return withHooks[*GroupInfo, GroupInfoMutation](ctx, gic.sqlSave, gic.mutation, gic.hooks) + return withHooks(ctx, gic.sqlSave, gic.mutation, gic.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/ent/groupinfo_delete.go b/entc/integration/ent/groupinfo_delete.go index b0accba97..6a76bce2d 100644 --- a/entc/integration/ent/groupinfo_delete.go +++ b/entc/integration/ent/groupinfo_delete.go @@ -31,7 +31,7 @@ func (gid *GroupInfoDelete) Where(ps ...predicate.GroupInfo) *GroupInfoDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (gid *GroupInfoDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, GroupInfoMutation](ctx, gid.sqlExec, gid.mutation, gid.hooks) + return withHooks(ctx, gid.sqlExec, gid.mutation, gid.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/ent/groupinfo_update.go b/entc/integration/ent/groupinfo_update.go index bf8c2ba9e..f8dc292dd 100644 --- a/entc/integration/ent/groupinfo_update.go +++ b/entc/integration/ent/groupinfo_update.go @@ -103,7 +103,7 @@ func (giu *GroupInfoUpdate) RemoveGroups(g ...*Group) *GroupInfoUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (giu *GroupInfoUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, GroupInfoMutation](ctx, giu.sqlSave, giu.mutation, giu.hooks) + return withHooks(ctx, giu.sqlSave, giu.mutation, giu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -302,7 +302,7 @@ func (giuo *GroupInfoUpdateOne) Select(field string, fields ...string) *GroupInf // Save executes the query and returns the updated GroupInfo entity. func (giuo *GroupInfoUpdateOne) Save(ctx context.Context) (*GroupInfo, error) { - return withHooks[*GroupInfo, GroupInfoMutation](ctx, giuo.sqlSave, giuo.mutation, giuo.hooks) + return withHooks(ctx, giuo.sqlSave, giuo.mutation, giuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/ent/item_create.go b/entc/integration/ent/item_create.go index 1a637cb8f..7c123aef9 100644 --- a/entc/integration/ent/item_create.go +++ b/entc/integration/ent/item_create.go @@ -62,7 +62,7 @@ func (ic *ItemCreate) Mutation() *ItemMutation { // Save creates the Item in the database. func (ic *ItemCreate) Save(ctx context.Context) (*Item, error) { ic.defaults() - return withHooks[*Item, ItemMutation](ctx, ic.sqlSave, ic.mutation, ic.hooks) + return withHooks(ctx, ic.sqlSave, ic.mutation, ic.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/ent/item_delete.go b/entc/integration/ent/item_delete.go index 1760ce248..40347a7d1 100644 --- a/entc/integration/ent/item_delete.go +++ b/entc/integration/ent/item_delete.go @@ -31,7 +31,7 @@ func (id *ItemDelete) Where(ps ...predicate.Item) *ItemDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (id *ItemDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, ItemMutation](ctx, id.sqlExec, id.mutation, id.hooks) + return withHooks(ctx, id.sqlExec, id.mutation, id.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/ent/item_update.go b/entc/integration/ent/item_update.go index e116e6bc2..0b366fc87 100644 --- a/entc/integration/ent/item_update.go +++ b/entc/integration/ent/item_update.go @@ -59,7 +59,7 @@ func (iu *ItemUpdate) Mutation() *ItemMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (iu *ItemUpdate) Save(ctx context.Context) (int, error) { - 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. @@ -180,7 +180,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) { - 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. diff --git a/entc/integration/ent/license_create.go b/entc/integration/ent/license_create.go index e18c977d0..12e879431 100644 --- a/entc/integration/ent/license_create.go +++ b/entc/integration/ent/license_create.go @@ -68,7 +68,7 @@ func (lc *LicenseCreate) Mutation() *LicenseMutation { // Save creates the License in the database. func (lc *LicenseCreate) Save(ctx context.Context) (*License, error) { lc.defaults() - return withHooks[*License, LicenseMutation](ctx, lc.sqlSave, lc.mutation, lc.hooks) + return withHooks(ctx, lc.sqlSave, lc.mutation, lc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/ent/license_delete.go b/entc/integration/ent/license_delete.go index b42dc308a..918c0063c 100644 --- a/entc/integration/ent/license_delete.go +++ b/entc/integration/ent/license_delete.go @@ -31,7 +31,7 @@ func (ld *LicenseDelete) Where(ps ...predicate.License) *LicenseDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (ld *LicenseDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, LicenseMutation](ctx, ld.sqlExec, ld.mutation, ld.hooks) + return withHooks(ctx, ld.sqlExec, ld.mutation, ld.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/ent/license_update.go b/entc/integration/ent/license_update.go index c322f5457..8937345a0 100644 --- a/entc/integration/ent/license_update.go +++ b/entc/integration/ent/license_update.go @@ -47,7 +47,7 @@ func (lu *LicenseUpdate) Mutation() *LicenseMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (lu *LicenseUpdate) Save(ctx context.Context) (int, error) { lu.defaults() - return withHooks[int, LicenseMutation](ctx, lu.sqlSave, lu.mutation, lu.hooks) + return withHooks(ctx, lu.sqlSave, lu.mutation, lu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -147,7 +147,7 @@ func (luo *LicenseUpdateOne) Select(field string, fields ...string) *LicenseUpda // Save executes the query and returns the updated License entity. func (luo *LicenseUpdateOne) Save(ctx context.Context) (*License, error) { luo.defaults() - return withHooks[*License, LicenseMutation](ctx, luo.sqlSave, luo.mutation, luo.hooks) + return withHooks(ctx, luo.sqlSave, luo.mutation, luo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/ent/node_create.go b/entc/integration/ent/node_create.go index d9a1fe198..922a4e109 100644 --- a/entc/integration/ent/node_create.go +++ b/entc/integration/ent/node_create.go @@ -99,7 +99,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. diff --git a/entc/integration/ent/node_delete.go b/entc/integration/ent/node_delete.go index afecbc3ee..1b53e4689 100644 --- a/entc/integration/ent/node_delete.go +++ b/entc/integration/ent/node_delete.go @@ -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. diff --git a/entc/integration/ent/node_update.go b/entc/integration/ent/node_update.go index 4db75c37e..26e3662ad 100644 --- a/entc/integration/ent/node_update.go +++ b/entc/integration/ent/node_update.go @@ -130,7 +130,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) { nu.defaults() - 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. @@ -383,7 +383,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) { nuo.defaults() - 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. diff --git a/entc/integration/ent/pet_create.go b/entc/integration/ent/pet_create.go index 3d59684b0..663769e2b 100644 --- a/entc/integration/ent/pet_create.go +++ b/entc/integration/ent/pet_create.go @@ -135,7 +135,7 @@ func (pc *PetCreate) Mutation() *PetMutation { // Save creates the Pet in the database. func (pc *PetCreate) Save(ctx context.Context) (*Pet, error) { pc.defaults() - return withHooks[*Pet, PetMutation](ctx, pc.sqlSave, pc.mutation, pc.hooks) + return withHooks(ctx, pc.sqlSave, pc.mutation, pc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/ent/pet_delete.go b/entc/integration/ent/pet_delete.go index 484de683d..5a359e601 100644 --- a/entc/integration/ent/pet_delete.go +++ b/entc/integration/ent/pet_delete.go @@ -31,7 +31,7 @@ func (pd *PetDelete) Where(ps ...predicate.Pet) *PetDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (pd *PetDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pd.sqlExec, pd.mutation, pd.hooks) + return withHooks(ctx, pd.sqlExec, pd.mutation, pd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/ent/pet_update.go b/entc/integration/ent/pet_update.go index a73ade6db..2145fb5af 100644 --- a/entc/integration/ent/pet_update.go +++ b/entc/integration/ent/pet_update.go @@ -172,7 +172,7 @@ func (pu *PetUpdate) ClearOwner() *PetUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (pu *PetUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pu.sqlSave, pu.mutation, pu.hooks) + return withHooks(ctx, pu.sqlSave, pu.mutation, pu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -467,7 +467,7 @@ func (puo *PetUpdateOne) Select(field string, fields ...string) *PetUpdateOne { // Save executes the query and returns the updated Pet entity. func (puo *PetUpdateOne) Save(ctx context.Context) (*Pet, error) { - return withHooks[*Pet, PetMutation](ctx, puo.sqlSave, puo.mutation, puo.hooks) + return withHooks(ctx, puo.sqlSave, puo.mutation, puo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/ent/spec_create.go b/entc/integration/ent/spec_create.go index 86d1b3fcc..42d411b70 100644 --- a/entc/integration/ent/spec_create.go +++ b/entc/integration/ent/spec_create.go @@ -48,7 +48,7 @@ func (sc *SpecCreate) Mutation() *SpecMutation { // Save creates the Spec in the database. func (sc *SpecCreate) Save(ctx context.Context) (*Spec, error) { - return withHooks[*Spec, SpecMutation](ctx, sc.sqlSave, sc.mutation, sc.hooks) + return withHooks(ctx, sc.sqlSave, sc.mutation, sc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/ent/spec_delete.go b/entc/integration/ent/spec_delete.go index 939703816..d05ff6a29 100644 --- a/entc/integration/ent/spec_delete.go +++ b/entc/integration/ent/spec_delete.go @@ -31,7 +31,7 @@ func (sd *SpecDelete) Where(ps ...predicate.Spec) *SpecDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (sd *SpecDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, SpecMutation](ctx, sd.sqlExec, sd.mutation, sd.hooks) + return withHooks(ctx, sd.sqlExec, sd.mutation, sd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/ent/spec_update.go b/entc/integration/ent/spec_update.go index 09635b4f9..100ecd30d 100644 --- a/entc/integration/ent/spec_update.go +++ b/entc/integration/ent/spec_update.go @@ -76,7 +76,7 @@ func (su *SpecUpdate) RemoveCard(c ...*Card) *SpecUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (su *SpecUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, SpecMutation](ctx, su.sqlSave, su.mutation, su.hooks) + return withHooks(ctx, su.sqlSave, su.mutation, su.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -239,7 +239,7 @@ func (suo *SpecUpdateOne) Select(field string, fields ...string) *SpecUpdateOne // Save executes the query and returns the updated Spec entity. func (suo *SpecUpdateOne) Save(ctx context.Context) (*Spec, error) { - return withHooks[*Spec, SpecMutation](ctx, suo.sqlSave, suo.mutation, suo.hooks) + return withHooks(ctx, suo.sqlSave, suo.mutation, suo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/ent/task_create.go b/entc/integration/ent/task_create.go index 33549c53a..83a2f98f4 100644 --- a/entc/integration/ent/task_create.go +++ b/entc/integration/ent/task_create.go @@ -125,7 +125,7 @@ func (tc *TaskCreate) Mutation() *TaskMutation { // Save creates the Task in the database. func (tc *TaskCreate) Save(ctx context.Context) (*Task, error) { tc.defaults() - return withHooks[*Task, TaskMutation](ctx, tc.sqlSave, tc.mutation, tc.hooks) + return withHooks(ctx, tc.sqlSave, tc.mutation, tc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/ent/task_delete.go b/entc/integration/ent/task_delete.go index d187c66a6..ea2a75ab9 100644 --- a/entc/integration/ent/task_delete.go +++ b/entc/integration/ent/task_delete.go @@ -32,7 +32,7 @@ func (td *TaskDelete) Where(ps ...predicate.Task) *TaskDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (td *TaskDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, TaskMutation](ctx, td.sqlExec, td.mutation, td.hooks) + return withHooks(ctx, td.sqlExec, td.mutation, td.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/ent/task_update.go b/entc/integration/ent/task_update.go index 319176dc5..992ade769 100644 --- a/entc/integration/ent/task_update.go +++ b/entc/integration/ent/task_update.go @@ -167,7 +167,7 @@ func (tu *TaskUpdate) Mutation() *TaskMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (tu *TaskUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, TaskMutation](ctx, tu.sqlSave, tu.mutation, tu.hooks) + return withHooks(ctx, tu.sqlSave, tu.mutation, tu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -418,7 +418,7 @@ func (tuo *TaskUpdateOne) Select(field string, fields ...string) *TaskUpdateOne // Save executes the query and returns the updated Task entity. func (tuo *TaskUpdateOne) Save(ctx context.Context) (*Task, error) { - return withHooks[*Task, TaskMutation](ctx, tuo.sqlSave, tuo.mutation, tuo.hooks) + return withHooks(ctx, tuo.sqlSave, tuo.mutation, tuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/ent/user_create.go b/entc/integration/ent/user_create.go index c185fbe56..e5db8c62a 100644 --- a/entc/integration/ent/user_create.go +++ b/entc/integration/ent/user_create.go @@ -356,7 +356,7 @@ func (uc *UserCreate) Mutation() *UserMutation { // Save creates the User in the database. func (uc *UserCreate) Save(ctx context.Context) (*User, error) { uc.defaults() - 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. diff --git a/entc/integration/ent/user_delete.go b/entc/integration/ent/user_delete.go index d929f0393..c1a40f325 100644 --- a/entc/integration/ent/user_delete.go +++ b/entc/integration/ent/user_delete.go @@ -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. diff --git a/entc/integration/ent/user_update.go b/entc/integration/ent/user_update.go index a967ef495..a6c7cb050 100644 --- a/entc/integration/ent/user_update.go +++ b/entc/integration/ent/user_update.go @@ -583,7 +583,7 @@ func (uu *UserUpdate) ClearParent() *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. @@ -1716,7 +1716,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. diff --git a/entc/integration/gremlin/ent/api_create.go b/entc/integration/gremlin/ent/api_create.go index cf2696ccc..477f773f5 100644 --- a/entc/integration/gremlin/ent/api_create.go +++ b/entc/integration/gremlin/ent/api_create.go @@ -29,7 +29,7 @@ func (ac *APICreate) Mutation() *APIMutation { // Save creates the Api in the database. func (ac *APICreate) Save(ctx context.Context) (*Api, error) { - return withHooks[*Api, APIMutation](ctx, ac.gremlinSave, ac.mutation, ac.hooks) + return withHooks(ctx, ac.gremlinSave, ac.mutation, ac.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/gremlin/ent/api_delete.go b/entc/integration/gremlin/ent/api_delete.go index 539ae0515..3fe7ff876 100644 --- a/entc/integration/gremlin/ent/api_delete.go +++ b/entc/integration/gremlin/ent/api_delete.go @@ -32,7 +32,7 @@ func (ad *APIDelete) Where(ps ...predicate.Api) *APIDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (ad *APIDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, APIMutation](ctx, ad.gremlinExec, ad.mutation, ad.hooks) + return withHooks(ctx, ad.gremlinExec, ad.mutation, ad.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/api_update.go b/entc/integration/gremlin/ent/api_update.go index 572fd1468..78bb9b8f5 100644 --- a/entc/integration/gremlin/ent/api_update.go +++ b/entc/integration/gremlin/ent/api_update.go @@ -37,7 +37,7 @@ func (au *APIUpdate) Mutation() *APIMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (au *APIUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, APIMutation](ctx, au.gremlinSave, au.mutation, au.hooks) + return withHooks(ctx, au.gremlinSave, au.mutation, au.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -116,7 +116,7 @@ func (auo *APIUpdateOne) Select(field string, fields ...string) *APIUpdateOne { // Save executes the query and returns the updated Api entity. func (auo *APIUpdateOne) Save(ctx context.Context) (*Api, error) { - return withHooks[*Api, APIMutation](ctx, auo.gremlinSave, auo.mutation, auo.hooks) + return withHooks(ctx, auo.gremlinSave, auo.mutation, auo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/card_create.go b/entc/integration/gremlin/ent/card_create.go index 31b7098ec..a919cdb0c 100644 --- a/entc/integration/gremlin/ent/card_create.go +++ b/entc/integration/gremlin/ent/card_create.go @@ -133,7 +133,7 @@ func (cc *CardCreate) Mutation() *CardMutation { // Save creates the Card in the database. func (cc *CardCreate) Save(ctx context.Context) (*Card, error) { cc.defaults() - return withHooks[*Card, CardMutation](ctx, cc.gremlinSave, cc.mutation, cc.hooks) + return withHooks(ctx, cc.gremlinSave, cc.mutation, cc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/gremlin/ent/card_delete.go b/entc/integration/gremlin/ent/card_delete.go index 2be69d2b4..9f286b426 100644 --- a/entc/integration/gremlin/ent/card_delete.go +++ b/entc/integration/gremlin/ent/card_delete.go @@ -32,7 +32,7 @@ func (cd *CardDelete) Where(ps ...predicate.Card) *CardDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (cd *CardDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, CardMutation](ctx, cd.gremlinExec, cd.mutation, cd.hooks) + return withHooks(ctx, cd.gremlinExec, cd.mutation, cd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/card_update.go b/entc/integration/gremlin/ent/card_update.go index 3119ac49d..06e36f574 100644 --- a/entc/integration/gremlin/ent/card_update.go +++ b/entc/integration/gremlin/ent/card_update.go @@ -152,7 +152,7 @@ func (cu *CardUpdate) RemoveSpec(s ...*Spec) *CardUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (cu *CardUpdate) Save(ctx context.Context) (int, error) { cu.defaults() - return withHooks[int, CardMutation](ctx, cu.gremlinSave, cu.mutation, cu.hooks) + return withHooks(ctx, cu.gremlinSave, cu.mutation, cu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -416,7 +416,7 @@ func (cuo *CardUpdateOne) Select(field string, fields ...string) *CardUpdateOne // Save executes the query and returns the updated Card entity. func (cuo *CardUpdateOne) Save(ctx context.Context) (*Card, error) { cuo.defaults() - return withHooks[*Card, CardMutation](ctx, cuo.gremlinSave, cuo.mutation, cuo.hooks) + return withHooks(ctx, cuo.gremlinSave, cuo.mutation, cuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/comment_create.go b/entc/integration/gremlin/ent/comment_create.go index 812036346..a8e7131b3 100644 --- a/entc/integration/gremlin/ent/comment_create.go +++ b/entc/integration/gremlin/ent/comment_create.go @@ -101,7 +101,7 @@ func (cc *CommentCreate) Mutation() *CommentMutation { // Save creates the Comment in the database. func (cc *CommentCreate) Save(ctx context.Context) (*Comment, error) { - return withHooks[*Comment, CommentMutation](ctx, cc.gremlinSave, cc.mutation, cc.hooks) + return withHooks(ctx, cc.gremlinSave, cc.mutation, cc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/gremlin/ent/comment_delete.go b/entc/integration/gremlin/ent/comment_delete.go index cafa3f94e..72e7364af 100644 --- a/entc/integration/gremlin/ent/comment_delete.go +++ b/entc/integration/gremlin/ent/comment_delete.go @@ -32,7 +32,7 @@ func (cd *CommentDelete) Where(ps ...predicate.Comment) *CommentDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (cd *CommentDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, CommentMutation](ctx, cd.gremlinExec, cd.mutation, cd.hooks) + return withHooks(ctx, cd.gremlinExec, cd.mutation, cd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/comment_update.go b/entc/integration/gremlin/ent/comment_update.go index 8cdf817c4..7557a9131 100644 --- a/entc/integration/gremlin/ent/comment_update.go +++ b/entc/integration/gremlin/ent/comment_update.go @@ -154,7 +154,7 @@ func (cu *CommentUpdate) Mutation() *CommentMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (cu *CommentUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, CommentMutation](ctx, cu.gremlinSave, cu.mutation, cu.hooks) + return withHooks(ctx, cu.gremlinSave, cu.mutation, cu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -425,7 +425,7 @@ func (cuo *CommentUpdateOne) Select(field string, fields ...string) *CommentUpda // Save executes the query and returns the updated Comment entity. func (cuo *CommentUpdateOne) Save(ctx context.Context) (*Comment, error) { - return withHooks[*Comment, CommentMutation](ctx, cuo.gremlinSave, cuo.mutation, cuo.hooks) + return withHooks(ctx, cuo.gremlinSave, cuo.mutation, cuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/exvaluescan_create.go b/entc/integration/gremlin/ent/exvaluescan_create.go index 61b419b5a..89a482893 100644 --- a/entc/integration/gremlin/ent/exvaluescan_create.go +++ b/entc/integration/gremlin/ent/exvaluescan_create.go @@ -82,7 +82,7 @@ func (evsc *ExValueScanCreate) Mutation() *ExValueScanMutation { // Save creates the ExValueScan in the database. func (evsc *ExValueScanCreate) Save(ctx context.Context) (*ExValueScan, error) { - return withHooks[*ExValueScan, ExValueScanMutation](ctx, evsc.gremlinSave, evsc.mutation, evsc.hooks) + return withHooks(ctx, evsc.gremlinSave, evsc.mutation, evsc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/gremlin/ent/exvaluescan_delete.go b/entc/integration/gremlin/ent/exvaluescan_delete.go index 6764b3d96..62f8e2627 100644 --- a/entc/integration/gremlin/ent/exvaluescan_delete.go +++ b/entc/integration/gremlin/ent/exvaluescan_delete.go @@ -32,7 +32,7 @@ func (evsd *ExValueScanDelete) Where(ps ...predicate.ExValueScan) *ExValueScanDe // Exec executes the deletion query and returns how many vertices were deleted. func (evsd *ExValueScanDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, ExValueScanMutation](ctx, evsd.gremlinExec, evsd.mutation, evsd.hooks) + return withHooks(ctx, evsd.gremlinExec, evsd.mutation, evsd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/exvaluescan_update.go b/entc/integration/gremlin/ent/exvaluescan_update.go index 423739072..5b51647f0 100644 --- a/entc/integration/gremlin/ent/exvaluescan_update.go +++ b/entc/integration/gremlin/ent/exvaluescan_update.go @@ -108,7 +108,7 @@ func (evsu *ExValueScanUpdate) Mutation() *ExValueScanMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (evsu *ExValueScanUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, ExValueScanMutation](ctx, evsu.gremlinSave, evsu.mutation, evsu.hooks) + return withHooks(ctx, evsu.gremlinSave, evsu.mutation, evsu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -289,7 +289,7 @@ func (evsuo *ExValueScanUpdateOne) Select(field string, fields ...string) *ExVal // Save executes the query and returns the updated ExValueScan entity. func (evsuo *ExValueScanUpdateOne) Save(ctx context.Context) (*ExValueScan, error) { - return withHooks[*ExValueScan, ExValueScanMutation](ctx, evsuo.gremlinSave, evsuo.mutation, evsuo.hooks) + return withHooks(ctx, evsuo.gremlinSave, evsuo.mutation, evsuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/fieldtype_create.go b/entc/integration/gremlin/ent/fieldtype_create.go index da5989246..43ba5d7bf 100644 --- a/entc/integration/gremlin/ent/fieldtype_create.go +++ b/entc/integration/gremlin/ent/fieldtype_create.go @@ -797,7 +797,7 @@ func (ftc *FieldTypeCreate) Mutation() *FieldTypeMutation { // Save creates the FieldType in the database. func (ftc *FieldTypeCreate) Save(ctx context.Context) (*FieldType, error) { ftc.defaults() - return withHooks[*FieldType, FieldTypeMutation](ctx, ftc.gremlinSave, ftc.mutation, ftc.hooks) + return withHooks(ctx, ftc.gremlinSave, ftc.mutation, ftc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/gremlin/ent/fieldtype_delete.go b/entc/integration/gremlin/ent/fieldtype_delete.go index 1471b45ec..21469e1b9 100644 --- a/entc/integration/gremlin/ent/fieldtype_delete.go +++ b/entc/integration/gremlin/ent/fieldtype_delete.go @@ -32,7 +32,7 @@ func (ftd *FieldTypeDelete) Where(ps ...predicate.FieldType) *FieldTypeDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (ftd *FieldTypeDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, FieldTypeMutation](ctx, ftd.gremlinExec, ftd.mutation, ftd.hooks) + return withHooks(ctx, ftd.gremlinExec, ftd.mutation, ftd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/fieldtype_update.go b/entc/integration/gremlin/ent/fieldtype_update.go index 2c7e4850e..9ac258267 100644 --- a/entc/integration/gremlin/ent/fieldtype_update.go +++ b/entc/integration/gremlin/ent/fieldtype_update.go @@ -1350,7 +1350,7 @@ func (ftu *FieldTypeUpdate) Mutation() *FieldTypeMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (ftu *FieldTypeUpdate) Save(ctx context.Context) (int, error) { ftu.defaults() - return withHooks[int, FieldTypeMutation](ctx, ftu.gremlinSave, ftu.mutation, ftu.hooks) + return withHooks(ctx, ftu.gremlinSave, ftu.mutation, ftu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -3259,7 +3259,7 @@ func (ftuo *FieldTypeUpdateOne) Select(field string, fields ...string) *FieldTyp // Save executes the query and returns the updated FieldType entity. func (ftuo *FieldTypeUpdateOne) Save(ctx context.Context) (*FieldType, error) { ftuo.defaults() - return withHooks[*FieldType, FieldTypeMutation](ctx, ftuo.gremlinSave, ftuo.mutation, ftuo.hooks) + return withHooks(ctx, ftuo.gremlinSave, ftuo.mutation, ftuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/file_create.go b/entc/integration/gremlin/ent/file_create.go index ba5190b88..c5b1347ef 100644 --- a/entc/integration/gremlin/ent/file_create.go +++ b/entc/integration/gremlin/ent/file_create.go @@ -165,7 +165,7 @@ func (fc *FileCreate) Mutation() *FileMutation { // Save creates the File in the database. func (fc *FileCreate) Save(ctx context.Context) (*File, error) { fc.defaults() - return withHooks[*File, FileMutation](ctx, fc.gremlinSave, fc.mutation, fc.hooks) + return withHooks(ctx, fc.gremlinSave, fc.mutation, fc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/gremlin/ent/file_delete.go b/entc/integration/gremlin/ent/file_delete.go index 8f5580a83..677216796 100644 --- a/entc/integration/gremlin/ent/file_delete.go +++ b/entc/integration/gremlin/ent/file_delete.go @@ -32,7 +32,7 @@ func (fd *FileDelete) Where(ps ...predicate.File) *FileDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (fd *FileDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, FileMutation](ctx, fd.gremlinExec, fd.mutation, fd.hooks) + return withHooks(ctx, fd.gremlinExec, fd.mutation, fd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/file_update.go b/entc/integration/gremlin/ent/file_update.go index 6e20d1e30..dac7fbb50 100644 --- a/entc/integration/gremlin/ent/file_update.go +++ b/entc/integration/gremlin/ent/file_update.go @@ -242,7 +242,7 @@ func (fu *FileUpdate) RemoveField(f ...*FieldType) *FileUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (fu *FileUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, FileMutation](ctx, fu.gremlinSave, fu.mutation, fu.hooks) + return withHooks(ctx, fu.gremlinSave, fu.mutation, fu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -617,7 +617,7 @@ func (fuo *FileUpdateOne) Select(field string, fields ...string) *FileUpdateOne // Save executes the query and returns the updated File entity. func (fuo *FileUpdateOne) Save(ctx context.Context) (*File, error) { - return withHooks[*File, FileMutation](ctx, fuo.gremlinSave, fuo.mutation, fuo.hooks) + return withHooks(ctx, fuo.gremlinSave, fuo.mutation, fuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/filetype_create.go b/entc/integration/gremlin/ent/filetype_create.go index 57720803c..1b4555fea 100644 --- a/entc/integration/gremlin/ent/filetype_create.go +++ b/entc/integration/gremlin/ent/filetype_create.go @@ -83,7 +83,7 @@ func (ftc *FileTypeCreate) Mutation() *FileTypeMutation { // Save creates the FileType in the database. func (ftc *FileTypeCreate) Save(ctx context.Context) (*FileType, error) { ftc.defaults() - return withHooks[*FileType, FileTypeMutation](ctx, ftc.gremlinSave, ftc.mutation, ftc.hooks) + return withHooks(ctx, ftc.gremlinSave, ftc.mutation, ftc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/gremlin/ent/filetype_delete.go b/entc/integration/gremlin/ent/filetype_delete.go index 6a607865b..12287c114 100644 --- a/entc/integration/gremlin/ent/filetype_delete.go +++ b/entc/integration/gremlin/ent/filetype_delete.go @@ -32,7 +32,7 @@ func (ftd *FileTypeDelete) Where(ps ...predicate.FileType) *FileTypeDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (ftd *FileTypeDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, FileTypeMutation](ctx, ftd.gremlinExec, ftd.mutation, ftd.hooks) + return withHooks(ctx, ftd.gremlinExec, ftd.mutation, ftd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/filetype_update.go b/entc/integration/gremlin/ent/filetype_update.go index ccee97c1b..f32f84048 100644 --- a/entc/integration/gremlin/ent/filetype_update.go +++ b/entc/integration/gremlin/ent/filetype_update.go @@ -110,7 +110,7 @@ func (ftu *FileTypeUpdate) RemoveFiles(f ...*File) *FileTypeUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (ftu *FileTypeUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, FileTypeMutation](ctx, ftu.gremlinSave, ftu.mutation, ftu.hooks) + return withHooks(ctx, ftu.gremlinSave, ftu.mutation, ftu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -319,7 +319,7 @@ func (ftuo *FileTypeUpdateOne) Select(field string, fields ...string) *FileTypeU // Save executes the query and returns the updated FileType entity. func (ftuo *FileTypeUpdateOne) Save(ctx context.Context) (*FileType, error) { - return withHooks[*FileType, FileTypeMutation](ctx, ftuo.gremlinSave, ftuo.mutation, ftuo.hooks) + return withHooks(ctx, ftuo.gremlinSave, ftuo.mutation, ftuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/goods_create.go b/entc/integration/gremlin/ent/goods_create.go index a75753cac..db49b11a2 100644 --- a/entc/integration/gremlin/ent/goods_create.go +++ b/entc/integration/gremlin/ent/goods_create.go @@ -29,7 +29,7 @@ func (gc *GoodsCreate) Mutation() *GoodsMutation { // Save creates the Goods in the database. func (gc *GoodsCreate) Save(ctx context.Context) (*Goods, error) { - return withHooks[*Goods, GoodsMutation](ctx, gc.gremlinSave, gc.mutation, gc.hooks) + return withHooks(ctx, gc.gremlinSave, gc.mutation, gc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/gremlin/ent/goods_delete.go b/entc/integration/gremlin/ent/goods_delete.go index 76043031e..8005c62ff 100644 --- a/entc/integration/gremlin/ent/goods_delete.go +++ b/entc/integration/gremlin/ent/goods_delete.go @@ -32,7 +32,7 @@ func (gd *GoodsDelete) Where(ps ...predicate.Goods) *GoodsDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (gd *GoodsDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, GoodsMutation](ctx, gd.gremlinExec, gd.mutation, gd.hooks) + return withHooks(ctx, gd.gremlinExec, gd.mutation, gd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/goods_update.go b/entc/integration/gremlin/ent/goods_update.go index 08f920c09..abf8c4a93 100644 --- a/entc/integration/gremlin/ent/goods_update.go +++ b/entc/integration/gremlin/ent/goods_update.go @@ -37,7 +37,7 @@ func (gu *GoodsUpdate) Mutation() *GoodsMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (gu *GoodsUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, GoodsMutation](ctx, gu.gremlinSave, gu.mutation, gu.hooks) + return withHooks(ctx, gu.gremlinSave, gu.mutation, gu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -116,7 +116,7 @@ func (guo *GoodsUpdateOne) Select(field string, fields ...string) *GoodsUpdateOn // Save executes the query and returns the updated Goods entity. func (guo *GoodsUpdateOne) Save(ctx context.Context) (*Goods, error) { - return withHooks[*Goods, GoodsMutation](ctx, guo.gremlinSave, guo.mutation, guo.hooks) + return withHooks(ctx, guo.gremlinSave, guo.mutation, guo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/group_create.go b/entc/integration/gremlin/ent/group_create.go index b7583866b..6734c38b9 100644 --- a/entc/integration/gremlin/ent/group_create.go +++ b/entc/integration/gremlin/ent/group_create.go @@ -146,7 +146,7 @@ func (gc *GroupCreate) Mutation() *GroupMutation { // Save creates the Group in the database. func (gc *GroupCreate) Save(ctx context.Context) (*Group, error) { gc.defaults() - return withHooks[*Group, GroupMutation](ctx, gc.gremlinSave, gc.mutation, gc.hooks) + return withHooks(ctx, gc.gremlinSave, gc.mutation, gc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/gremlin/ent/group_delete.go b/entc/integration/gremlin/ent/group_delete.go index 07c96a911..b98f17b18 100644 --- a/entc/integration/gremlin/ent/group_delete.go +++ b/entc/integration/gremlin/ent/group_delete.go @@ -32,7 +32,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.gremlinExec, gd.mutation, gd.hooks) + return withHooks(ctx, gd.gremlinExec, gd.mutation, gd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/group_update.go b/entc/integration/gremlin/ent/group_update.go index 5514031e1..feb046bc6 100644 --- a/entc/integration/gremlin/ent/group_update.go +++ b/entc/integration/gremlin/ent/group_update.go @@ -240,7 +240,7 @@ func (gu *GroupUpdate) ClearInfo() *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.gremlinSave, gu.mutation, gu.hooks) + return withHooks(ctx, gu.gremlinSave, gu.mutation, gu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -625,7 +625,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.gremlinSave, guo.mutation, guo.hooks) + return withHooks(ctx, guo.gremlinSave, guo.mutation, guo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/groupinfo_create.go b/entc/integration/gremlin/ent/groupinfo_create.go index 68ba40316..57c42c5cf 100644 --- a/entc/integration/gremlin/ent/groupinfo_create.go +++ b/entc/integration/gremlin/ent/groupinfo_create.go @@ -69,7 +69,7 @@ func (gic *GroupInfoCreate) Mutation() *GroupInfoMutation { // Save creates the GroupInfo in the database. func (gic *GroupInfoCreate) Save(ctx context.Context) (*GroupInfo, error) { gic.defaults() - return withHooks[*GroupInfo, GroupInfoMutation](ctx, gic.gremlinSave, gic.mutation, gic.hooks) + return withHooks(ctx, gic.gremlinSave, gic.mutation, gic.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/gremlin/ent/groupinfo_delete.go b/entc/integration/gremlin/ent/groupinfo_delete.go index 99cc97117..3d0afd511 100644 --- a/entc/integration/gremlin/ent/groupinfo_delete.go +++ b/entc/integration/gremlin/ent/groupinfo_delete.go @@ -32,7 +32,7 @@ func (gid *GroupInfoDelete) Where(ps ...predicate.GroupInfo) *GroupInfoDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (gid *GroupInfoDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, GroupInfoMutation](ctx, gid.gremlinExec, gid.mutation, gid.hooks) + return withHooks(ctx, gid.gremlinExec, gid.mutation, gid.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/groupinfo_update.go b/entc/integration/gremlin/ent/groupinfo_update.go index 402d9350c..9aef42a97 100644 --- a/entc/integration/gremlin/ent/groupinfo_update.go +++ b/entc/integration/gremlin/ent/groupinfo_update.go @@ -103,7 +103,7 @@ func (giu *GroupInfoUpdate) RemoveGroups(g ...*Group) *GroupInfoUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (giu *GroupInfoUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, GroupInfoMutation](ctx, giu.gremlinSave, giu.mutation, giu.hooks) + return withHooks(ctx, giu.gremlinSave, giu.mutation, giu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -283,7 +283,7 @@ func (giuo *GroupInfoUpdateOne) Select(field string, fields ...string) *GroupInf // Save executes the query and returns the updated GroupInfo entity. func (giuo *GroupInfoUpdateOne) Save(ctx context.Context) (*GroupInfo, error) { - return withHooks[*GroupInfo, GroupInfoMutation](ctx, giuo.gremlinSave, giuo.mutation, giuo.hooks) + return withHooks(ctx, giuo.gremlinSave, giuo.mutation, giuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/item_create.go b/entc/integration/gremlin/ent/item_create.go index 5bf762983..7e941a027 100644 --- a/entc/integration/gremlin/ent/item_create.go +++ b/entc/integration/gremlin/ent/item_create.go @@ -61,7 +61,7 @@ func (ic *ItemCreate) Mutation() *ItemMutation { // Save creates the Item in the database. func (ic *ItemCreate) Save(ctx context.Context) (*Item, error) { ic.defaults() - return withHooks[*Item, ItemMutation](ctx, ic.gremlinSave, ic.mutation, ic.hooks) + return withHooks(ctx, ic.gremlinSave, ic.mutation, ic.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/gremlin/ent/item_delete.go b/entc/integration/gremlin/ent/item_delete.go index adc8ccc4e..d85fcbe3d 100644 --- a/entc/integration/gremlin/ent/item_delete.go +++ b/entc/integration/gremlin/ent/item_delete.go @@ -32,7 +32,7 @@ func (id *ItemDelete) Where(ps ...predicate.Item) *ItemDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (id *ItemDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, ItemMutation](ctx, id.gremlinExec, id.mutation, id.hooks) + return withHooks(ctx, id.gremlinExec, id.mutation, id.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/item_update.go b/entc/integration/gremlin/ent/item_update.go index 16d1fdd6f..ab7c80016 100644 --- a/entc/integration/gremlin/ent/item_update.go +++ b/entc/integration/gremlin/ent/item_update.go @@ -60,7 +60,7 @@ func (iu *ItemUpdate) Mutation() *ItemMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (iu *ItemUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, ItemMutation](ctx, iu.gremlinSave, iu.mutation, iu.hooks) + return withHooks(ctx, iu.gremlinSave, iu.mutation, iu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -204,7 +204,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) { - return withHooks[*Item, ItemMutation](ctx, iuo.gremlinSave, iuo.mutation, iuo.hooks) + return withHooks(ctx, iuo.gremlinSave, iuo.mutation, iuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/license_create.go b/entc/integration/gremlin/ent/license_create.go index 0795155b9..4b973d39a 100644 --- a/entc/integration/gremlin/ent/license_create.go +++ b/entc/integration/gremlin/ent/license_create.go @@ -66,7 +66,7 @@ func (lc *LicenseCreate) Mutation() *LicenseMutation { // Save creates the License in the database. func (lc *LicenseCreate) Save(ctx context.Context) (*License, error) { lc.defaults() - return withHooks[*License, LicenseMutation](ctx, lc.gremlinSave, lc.mutation, lc.hooks) + return withHooks(ctx, lc.gremlinSave, lc.mutation, lc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/gremlin/ent/license_delete.go b/entc/integration/gremlin/ent/license_delete.go index 2cd998a4e..cbacc10bf 100644 --- a/entc/integration/gremlin/ent/license_delete.go +++ b/entc/integration/gremlin/ent/license_delete.go @@ -32,7 +32,7 @@ func (ld *LicenseDelete) Where(ps ...predicate.License) *LicenseDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (ld *LicenseDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, LicenseMutation](ctx, ld.gremlinExec, ld.mutation, ld.hooks) + return withHooks(ctx, ld.gremlinExec, ld.mutation, ld.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/license_update.go b/entc/integration/gremlin/ent/license_update.go index 3e42e2ca2..21494f8d2 100644 --- a/entc/integration/gremlin/ent/license_update.go +++ b/entc/integration/gremlin/ent/license_update.go @@ -45,7 +45,7 @@ func (lu *LicenseUpdate) Mutation() *LicenseMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (lu *LicenseUpdate) Save(ctx context.Context) (int, error) { lu.defaults() - return withHooks[int, LicenseMutation](ctx, lu.gremlinSave, lu.mutation, lu.hooks) + return withHooks(ctx, lu.gremlinSave, lu.mutation, lu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -142,7 +142,7 @@ func (luo *LicenseUpdateOne) Select(field string, fields ...string) *LicenseUpda // Save executes the query and returns the updated License entity. func (luo *LicenseUpdateOne) Save(ctx context.Context) (*License, error) { luo.defaults() - return withHooks[*License, LicenseMutation](ctx, luo.gremlinSave, luo.mutation, luo.hooks) + return withHooks(ctx, luo.gremlinSave, luo.mutation, luo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/node_create.go b/entc/integration/gremlin/ent/node_create.go index e092c4e25..0dd955029 100644 --- a/entc/integration/gremlin/ent/node_create.go +++ b/entc/integration/gremlin/ent/node_create.go @@ -98,7 +98,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.gremlinSave, nc.mutation, nc.hooks) + return withHooks(ctx, nc.gremlinSave, nc.mutation, nc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/gremlin/ent/node_delete.go b/entc/integration/gremlin/ent/node_delete.go index 24dccd875..b751e5ef7 100644 --- a/entc/integration/gremlin/ent/node_delete.go +++ b/entc/integration/gremlin/ent/node_delete.go @@ -32,7 +32,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.gremlinExec, nd.mutation, nd.hooks) + return withHooks(ctx, nd.gremlinExec, nd.mutation, nd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/node_update.go b/entc/integration/gremlin/ent/node_update.go index 5ac60afb5..938f054f4 100644 --- a/entc/integration/gremlin/ent/node_update.go +++ b/entc/integration/gremlin/ent/node_update.go @@ -130,7 +130,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) { nu.defaults() - return withHooks[int, NodeMutation](ctx, nu.gremlinSave, nu.mutation, nu.hooks) + return withHooks(ctx, nu.gremlinSave, nu.mutation, nu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -366,7 +366,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) { nuo.defaults() - return withHooks[*Node, NodeMutation](ctx, nuo.gremlinSave, nuo.mutation, nuo.hooks) + return withHooks(ctx, nuo.gremlinSave, nuo.mutation, nuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/pet_create.go b/entc/integration/gremlin/ent/pet_create.go index 768a0fd02..141ae1437 100644 --- a/entc/integration/gremlin/ent/pet_create.go +++ b/entc/integration/gremlin/ent/pet_create.go @@ -135,7 +135,7 @@ func (pc *PetCreate) Mutation() *PetMutation { // Save creates the Pet in the database. func (pc *PetCreate) Save(ctx context.Context) (*Pet, error) { pc.defaults() - return withHooks[*Pet, PetMutation](ctx, pc.gremlinSave, pc.mutation, pc.hooks) + return withHooks(ctx, pc.gremlinSave, pc.mutation, pc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/gremlin/ent/pet_delete.go b/entc/integration/gremlin/ent/pet_delete.go index f3258aafa..2849c5168 100644 --- a/entc/integration/gremlin/ent/pet_delete.go +++ b/entc/integration/gremlin/ent/pet_delete.go @@ -32,7 +32,7 @@ func (pd *PetDelete) Where(ps ...predicate.Pet) *PetDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (pd *PetDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pd.gremlinExec, pd.mutation, pd.hooks) + return withHooks(ctx, pd.gremlinExec, pd.mutation, pd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/pet_update.go b/entc/integration/gremlin/ent/pet_update.go index e779d40f9..f5e4bc4d8 100644 --- a/entc/integration/gremlin/ent/pet_update.go +++ b/entc/integration/gremlin/ent/pet_update.go @@ -172,7 +172,7 @@ func (pu *PetUpdate) ClearOwner() *PetUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (pu *PetUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pu.gremlinSave, pu.mutation, pu.hooks) + return withHooks(ctx, pu.gremlinSave, pu.mutation, pu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -446,7 +446,7 @@ func (puo *PetUpdateOne) Select(field string, fields ...string) *PetUpdateOne { // Save executes the query and returns the updated Pet entity. func (puo *PetUpdateOne) Save(ctx context.Context) (*Pet, error) { - return withHooks[*Pet, PetMutation](ctx, puo.gremlinSave, puo.mutation, puo.hooks) + return withHooks(ctx, puo.gremlinSave, puo.mutation, puo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/spec_create.go b/entc/integration/gremlin/ent/spec_create.go index 9e1670f25..d05222b14 100644 --- a/entc/integration/gremlin/ent/spec_create.go +++ b/entc/integration/gremlin/ent/spec_create.go @@ -44,7 +44,7 @@ func (sc *SpecCreate) Mutation() *SpecMutation { // Save creates the Spec in the database. func (sc *SpecCreate) Save(ctx context.Context) (*Spec, error) { - return withHooks[*Spec, SpecMutation](ctx, sc.gremlinSave, sc.mutation, sc.hooks) + return withHooks(ctx, sc.gremlinSave, sc.mutation, sc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/gremlin/ent/spec_delete.go b/entc/integration/gremlin/ent/spec_delete.go index 22700f023..8d1ff0a89 100644 --- a/entc/integration/gremlin/ent/spec_delete.go +++ b/entc/integration/gremlin/ent/spec_delete.go @@ -32,7 +32,7 @@ func (sd *SpecDelete) Where(ps ...predicate.Spec) *SpecDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (sd *SpecDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, SpecMutation](ctx, sd.gremlinExec, sd.mutation, sd.hooks) + return withHooks(ctx, sd.gremlinExec, sd.mutation, sd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/spec_update.go b/entc/integration/gremlin/ent/spec_update.go index af5bb07c1..208c7bce9 100644 --- a/entc/integration/gremlin/ent/spec_update.go +++ b/entc/integration/gremlin/ent/spec_update.go @@ -74,7 +74,7 @@ func (su *SpecUpdate) RemoveCard(c ...*Card) *SpecUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (su *SpecUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, SpecMutation](ctx, su.gremlinSave, su.mutation, su.hooks) + return withHooks(ctx, su.gremlinSave, su.mutation, su.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -199,7 +199,7 @@ func (suo *SpecUpdateOne) Select(field string, fields ...string) *SpecUpdateOne // Save executes the query and returns the updated Spec entity. func (suo *SpecUpdateOne) Save(ctx context.Context) (*Spec, error) { - return withHooks[*Spec, SpecMutation](ctx, suo.gremlinSave, suo.mutation, suo.hooks) + return withHooks(ctx, suo.gremlinSave, suo.mutation, suo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/task_create.go b/entc/integration/gremlin/ent/task_create.go index 1ce3bca7e..ba64ba4c6 100644 --- a/entc/integration/gremlin/ent/task_create.go +++ b/entc/integration/gremlin/ent/task_create.go @@ -124,7 +124,7 @@ func (tc *TaskCreate) Mutation() *TaskMutation { // Save creates the Task in the database. func (tc *TaskCreate) Save(ctx context.Context) (*Task, error) { tc.defaults() - return withHooks[*Task, TaskMutation](ctx, tc.gremlinSave, tc.mutation, tc.hooks) + return withHooks(ctx, tc.gremlinSave, tc.mutation, tc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/gremlin/ent/task_delete.go b/entc/integration/gremlin/ent/task_delete.go index 4cf7fdfce..a7986aa76 100644 --- a/entc/integration/gremlin/ent/task_delete.go +++ b/entc/integration/gremlin/ent/task_delete.go @@ -33,7 +33,7 @@ func (td *TaskDelete) Where(ps ...predicate.Task) *TaskDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (td *TaskDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, TaskMutation](ctx, td.gremlinExec, td.mutation, td.hooks) + return withHooks(ctx, td.gremlinExec, td.mutation, td.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/task_update.go b/entc/integration/gremlin/ent/task_update.go index d0cca651d..8ca0a6460 100644 --- a/entc/integration/gremlin/ent/task_update.go +++ b/entc/integration/gremlin/ent/task_update.go @@ -166,7 +166,7 @@ func (tu *TaskUpdate) Mutation() *TaskMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (tu *TaskUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, TaskMutation](ctx, tu.gremlinSave, tu.mutation, tu.hooks) + return withHooks(ctx, tu.gremlinSave, tu.mutation, tu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -418,7 +418,7 @@ func (tuo *TaskUpdateOne) Select(field string, fields ...string) *TaskUpdateOne // Save executes the query and returns the updated Task entity. func (tuo *TaskUpdateOne) Save(ctx context.Context) (*Task, error) { - return withHooks[*Task, TaskMutation](ctx, tuo.gremlinSave, tuo.mutation, tuo.hooks) + return withHooks(ctx, tuo.gremlinSave, tuo.mutation, tuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/user_create.go b/entc/integration/gremlin/ent/user_create.go index 797d2a78f..e8ee1ea14 100644 --- a/entc/integration/gremlin/ent/user_create.go +++ b/entc/integration/gremlin/ent/user_create.go @@ -353,7 +353,7 @@ func (uc *UserCreate) Mutation() *UserMutation { // Save creates the User in the database. func (uc *UserCreate) Save(ctx context.Context) (*User, error) { uc.defaults() - return withHooks[*User, UserMutation](ctx, uc.gremlinSave, uc.mutation, uc.hooks) + return withHooks(ctx, uc.gremlinSave, uc.mutation, uc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/gremlin/ent/user_delete.go b/entc/integration/gremlin/ent/user_delete.go index d9bd3a6db..bec71af07 100644 --- a/entc/integration/gremlin/ent/user_delete.go +++ b/entc/integration/gremlin/ent/user_delete.go @@ -32,7 +32,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.gremlinExec, ud.mutation, ud.hooks) + return withHooks(ctx, ud.gremlinExec, ud.mutation, ud.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/gremlin/ent/user_update.go b/entc/integration/gremlin/ent/user_update.go index 582cc2e2e..72fafb44f 100644 --- a/entc/integration/gremlin/ent/user_update.go +++ b/entc/integration/gremlin/ent/user_update.go @@ -580,7 +580,7 @@ func (uu *UserUpdate) ClearParent() *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.gremlinSave, uu.mutation, uu.hooks) + return withHooks(ctx, uu.gremlinSave, uu.mutation, uu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -1414,7 +1414,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.gremlinSave, uuo.mutation, uuo.hooks) + return withHooks(ctx, uuo.gremlinSave, uuo.mutation, uuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/hooks/ent/card_create.go b/entc/integration/hooks/ent/card_create.go index e982ef705..47c573b34 100644 --- a/entc/integration/hooks/ent/card_create.go +++ b/entc/integration/hooks/ent/card_create.go @@ -116,7 +116,7 @@ func (cc *CardCreate) Save(ctx context.Context) (*Card, error) { if err := cc.defaults(); err != nil { return nil, err } - return withHooks[*Card, CardMutation](ctx, cc.sqlSave, cc.mutation, cc.hooks) + return withHooks(ctx, cc.sqlSave, cc.mutation, cc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/hooks/ent/card_delete.go b/entc/integration/hooks/ent/card_delete.go index 90dcce178..a3f53ca55 100644 --- a/entc/integration/hooks/ent/card_delete.go +++ b/entc/integration/hooks/ent/card_delete.go @@ -31,7 +31,7 @@ func (cd *CardDelete) Where(ps ...predicate.Card) *CardDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (cd *CardDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, CardMutation](ctx, cd.sqlExec, cd.mutation, cd.hooks) + return withHooks(ctx, cd.sqlExec, cd.mutation, cd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/hooks/ent/card_update.go b/entc/integration/hooks/ent/card_update.go index 0a3735a7e..c44e2dee7 100644 --- a/entc/integration/hooks/ent/card_update.go +++ b/entc/integration/hooks/ent/card_update.go @@ -125,7 +125,7 @@ func (cu *CardUpdate) ClearOwner() *CardUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (cu *CardUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, CardMutation](ctx, cu.sqlSave, cu.mutation, cu.hooks) + return withHooks(ctx, cu.sqlSave, cu.mutation, cu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -331,7 +331,7 @@ func (cuo *CardUpdateOne) Select(field string, fields ...string) *CardUpdateOne // Save executes the query and returns the updated Card entity. func (cuo *CardUpdateOne) Save(ctx context.Context) (*Card, error) { - return withHooks[*Card, CardMutation](ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) + return withHooks(ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/hooks/ent/pet_create.go b/entc/integration/hooks/ent/pet_create.go index 67d8ea24a..7ca843488 100644 --- a/entc/integration/hooks/ent/pet_create.go +++ b/entc/integration/hooks/ent/pet_create.go @@ -78,7 +78,7 @@ func (pc *PetCreate) Mutation() *PetMutation { // Save creates the Pet in the database. func (pc *PetCreate) Save(ctx context.Context) (*Pet, error) { - return withHooks[*Pet, PetMutation](ctx, pc.sqlSave, pc.mutation, pc.hooks) + return withHooks(ctx, pc.sqlSave, pc.mutation, pc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/hooks/ent/pet_delete.go b/entc/integration/hooks/ent/pet_delete.go index f2d1bcdb5..f4ec618f8 100644 --- a/entc/integration/hooks/ent/pet_delete.go +++ b/entc/integration/hooks/ent/pet_delete.go @@ -31,7 +31,7 @@ func (pd *PetDelete) Where(ps ...predicate.Pet) *PetDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (pd *PetDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pd.sqlExec, pd.mutation, pd.hooks) + return withHooks(ctx, pd.sqlExec, pd.mutation, pd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/hooks/ent/pet_update.go b/entc/integration/hooks/ent/pet_update.go index 7e333b847..605d3045d 100644 --- a/entc/integration/hooks/ent/pet_update.go +++ b/entc/integration/hooks/ent/pet_update.go @@ -105,7 +105,7 @@ func (pu *PetUpdate) ClearOwner() *PetUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (pu *PetUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pu.sqlSave, pu.mutation, pu.hooks) + return withHooks(ctx, pu.sqlSave, pu.mutation, pu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -285,7 +285,7 @@ func (puo *PetUpdateOne) Select(field string, fields ...string) *PetUpdateOne { // Save executes the query and returns the updated Pet entity. func (puo *PetUpdateOne) Save(ctx context.Context) (*Pet, error) { - return withHooks[*Pet, PetMutation](ctx, puo.sqlSave, puo.mutation, puo.hooks) + return withHooks(ctx, puo.sqlSave, puo.mutation, puo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/hooks/ent/user_create.go b/entc/integration/hooks/ent/user_create.go index 32654172b..1273e0ddb 100644 --- a/entc/integration/hooks/ent/user_create.go +++ b/entc/integration/hooks/ent/user_create.go @@ -161,7 +161,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. diff --git a/entc/integration/hooks/ent/user_delete.go b/entc/integration/hooks/ent/user_delete.go index ad69183c4..3fad1d9d2 100644 --- a/entc/integration/hooks/ent/user_delete.go +++ b/entc/integration/hooks/ent/user_delete.go @@ -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. diff --git a/entc/integration/hooks/ent/user_update.go b/entc/integration/hooks/ent/user_update.go index a54e01fa9..1fa3a6642 100644 --- a/entc/integration/hooks/ent/user_update.go +++ b/entc/integration/hooks/ent/user_update.go @@ -261,7 +261,7 @@ func (uu *UserUpdate) ClearBestFriend() *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. @@ -747,7 +747,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. diff --git a/entc/integration/idtype/ent/user_create.go b/entc/integration/idtype/ent/user_create.go index c66375ae6..cf91cf03f 100644 --- a/entc/integration/idtype/ent/user_create.go +++ b/entc/integration/idtype/ent/user_create.go @@ -85,7 +85,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. diff --git a/entc/integration/idtype/ent/user_delete.go b/entc/integration/idtype/ent/user_delete.go index cb340a847..3434ffeda 100644 --- a/entc/integration/idtype/ent/user_delete.go +++ b/entc/integration/idtype/ent/user_delete.go @@ -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. diff --git a/entc/integration/idtype/ent/user_update.go b/entc/integration/idtype/ent/user_update.go index 489ca15e7..76cb8ad02 100644 --- a/entc/integration/idtype/ent/user_update.go +++ b/entc/integration/idtype/ent/user_update.go @@ -141,7 +141,7 @@ func (uu *UserUpdate) RemoveFollowing(u ...*User) *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. @@ -440,7 +440,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. diff --git a/entc/integration/json/ent/user_create.go b/entc/integration/json/ent/user_create.go index 3676128aa..ec2bcfddf 100644 --- a/entc/integration/json/ent/user_create.go +++ b/entc/integration/json/ent/user_create.go @@ -103,7 +103,7 @@ func (uc *UserCreate) Mutation() *UserMutation { // Save creates the User in the database. func (uc *UserCreate) Save(ctx context.Context) (*User, error) { uc.defaults() - 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. diff --git a/entc/integration/json/ent/user_delete.go b/entc/integration/json/ent/user_delete.go index 14481f959..bba57215c 100644 --- a/entc/integration/json/ent/user_delete.go +++ b/entc/integration/json/ent/user_delete.go @@ -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. diff --git a/entc/integration/json/ent/user_update.go b/entc/integration/json/ent/user_update.go index 9e6fda158..870fc20d5 100644 --- a/entc/integration/json/ent/user_update.go +++ b/entc/integration/json/ent/user_update.go @@ -202,7 +202,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. @@ -529,7 +529,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. diff --git a/entc/integration/migrate/entv1/car_create.go b/entc/integration/migrate/entv1/car_create.go index 3459cb196..62d57d9fb 100644 --- a/entc/integration/migrate/entv1/car_create.go +++ b/entc/integration/migrate/entv1/car_create.go @@ -49,7 +49,7 @@ func (cc *CarCreate) Mutation() *CarMutation { // Save creates the Car in the database. func (cc *CarCreate) Save(ctx context.Context) (*Car, error) { - return withHooks[*Car, CarMutation](ctx, cc.sqlSave, cc.mutation, cc.hooks) + return withHooks(ctx, cc.sqlSave, cc.mutation, cc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/migrate/entv1/car_delete.go b/entc/integration/migrate/entv1/car_delete.go index ebbc5f84c..0c58fff5e 100644 --- a/entc/integration/migrate/entv1/car_delete.go +++ b/entc/integration/migrate/entv1/car_delete.go @@ -31,7 +31,7 @@ func (cd *CarDelete) Where(ps ...predicate.Car) *CarDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (cd *CarDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, CarMutation](ctx, cd.sqlExec, cd.mutation, cd.hooks) + return withHooks(ctx, cd.sqlExec, cd.mutation, cd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/migrate/entv1/car_update.go b/entc/integration/migrate/entv1/car_update.go index be8d43997..62bba9e91 100644 --- a/entc/integration/migrate/entv1/car_update.go +++ b/entc/integration/migrate/entv1/car_update.go @@ -64,7 +64,7 @@ func (cu *CarUpdate) ClearOwner() *CarUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (cu *CarUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, CarMutation](ctx, cu.sqlSave, cu.mutation, cu.hooks) + return withHooks(ctx, cu.sqlSave, cu.mutation, cu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -192,7 +192,7 @@ func (cuo *CarUpdateOne) Select(field string, fields ...string) *CarUpdateOne { // Save executes the query and returns the updated Car entity. func (cuo *CarUpdateOne) Save(ctx context.Context) (*Car, error) { - return withHooks[*Car, CarMutation](ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) + return withHooks(ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/migrate/entv1/conversion_create.go b/entc/integration/migrate/entv1/conversion_create.go index f473a0f37..f809ba04b 100644 --- a/entc/integration/migrate/entv1/conversion_create.go +++ b/entc/integration/migrate/entv1/conversion_create.go @@ -155,7 +155,7 @@ func (cc *ConversionCreate) Mutation() *ConversionMutation { // Save creates the Conversion in the database. func (cc *ConversionCreate) Save(ctx context.Context) (*Conversion, error) { - return withHooks[*Conversion, ConversionMutation](ctx, cc.sqlSave, cc.mutation, cc.hooks) + return withHooks(ctx, cc.sqlSave, cc.mutation, cc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/migrate/entv1/conversion_delete.go b/entc/integration/migrate/entv1/conversion_delete.go index 92defdfb6..8b28f3e86 100644 --- a/entc/integration/migrate/entv1/conversion_delete.go +++ b/entc/integration/migrate/entv1/conversion_delete.go @@ -31,7 +31,7 @@ func (cd *ConversionDelete) Where(ps ...predicate.Conversion) *ConversionDelete // Exec executes the deletion query and returns how many vertices were deleted. func (cd *ConversionDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, ConversionMutation](ctx, cd.sqlExec, cd.mutation, cd.hooks) + return withHooks(ctx, cd.sqlExec, cd.mutation, cd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/migrate/entv1/conversion_update.go b/entc/integration/migrate/entv1/conversion_update.go index 1b0648a38..a585d34ca 100644 --- a/entc/integration/migrate/entv1/conversion_update.go +++ b/entc/integration/migrate/entv1/conversion_update.go @@ -274,7 +274,7 @@ func (cu *ConversionUpdate) Mutation() *ConversionMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (cu *ConversionUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, ConversionMutation](ctx, cu.sqlSave, cu.mutation, cu.hooks) + return withHooks(ctx, cu.sqlSave, cu.mutation, cu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -662,7 +662,7 @@ func (cuo *ConversionUpdateOne) Select(field string, fields ...string) *Conversi // Save executes the query and returns the updated Conversion entity. func (cuo *ConversionUpdateOne) Save(ctx context.Context) (*Conversion, error) { - return withHooks[*Conversion, ConversionMutation](ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) + return withHooks(ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/migrate/entv1/customtype_create.go b/entc/integration/migrate/entv1/customtype_create.go index 664e4c506..5ba248bea 100644 --- a/entc/integration/migrate/entv1/customtype_create.go +++ b/entc/integration/migrate/entv1/customtype_create.go @@ -43,7 +43,7 @@ func (ctc *CustomTypeCreate) Mutation() *CustomTypeMutation { // Save creates the CustomType in the database. func (ctc *CustomTypeCreate) Save(ctx context.Context) (*CustomType, error) { - return withHooks[*CustomType, CustomTypeMutation](ctx, ctc.sqlSave, ctc.mutation, ctc.hooks) + return withHooks(ctx, ctc.sqlSave, ctc.mutation, ctc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/migrate/entv1/customtype_delete.go b/entc/integration/migrate/entv1/customtype_delete.go index 1bac18330..5ac49a7a0 100644 --- a/entc/integration/migrate/entv1/customtype_delete.go +++ b/entc/integration/migrate/entv1/customtype_delete.go @@ -31,7 +31,7 @@ func (ctd *CustomTypeDelete) Where(ps ...predicate.CustomType) *CustomTypeDelete // Exec executes the deletion query and returns how many vertices were deleted. func (ctd *CustomTypeDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, CustomTypeMutation](ctx, ctd.sqlExec, ctd.mutation, ctd.hooks) + return withHooks(ctx, ctd.sqlExec, ctd.mutation, ctd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/migrate/entv1/customtype_update.go b/entc/integration/migrate/entv1/customtype_update.go index 624689d74..cb0715f0a 100644 --- a/entc/integration/migrate/entv1/customtype_update.go +++ b/entc/integration/migrate/entv1/customtype_update.go @@ -58,7 +58,7 @@ func (ctu *CustomTypeUpdate) Mutation() *CustomTypeMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (ctu *CustomTypeUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, CustomTypeMutation](ctx, ctu.sqlSave, ctu.mutation, ctu.hooks) + return withHooks(ctx, ctu.sqlSave, ctu.mutation, ctu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -158,7 +158,7 @@ func (ctuo *CustomTypeUpdateOne) Select(field string, fields ...string) *CustomT // Save executes the query and returns the updated CustomType entity. func (ctuo *CustomTypeUpdateOne) Save(ctx context.Context) (*CustomType, error) { - return withHooks[*CustomType, CustomTypeMutation](ctx, ctuo.sqlSave, ctuo.mutation, ctuo.hooks) + return withHooks(ctx, ctuo.sqlSave, ctuo.mutation, ctuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/migrate/entv1/user_create.go b/entc/integration/migrate/entv1/user_create.go index 5b5b3db2e..ca65cf25f 100644 --- a/entc/integration/migrate/entv1/user_create.go +++ b/entc/integration/migrate/entv1/user_create.go @@ -246,7 +246,7 @@ func (uc *UserCreate) Mutation() *UserMutation { // Save creates the User in the database. func (uc *UserCreate) Save(ctx context.Context) (*User, error) { uc.defaults() - 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. diff --git a/entc/integration/migrate/entv1/user_delete.go b/entc/integration/migrate/entv1/user_delete.go index cd25fa818..65c3dca6b 100644 --- a/entc/integration/migrate/entv1/user_delete.go +++ b/entc/integration/migrate/entv1/user_delete.go @@ -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. diff --git a/entc/integration/migrate/entv1/user_update.go b/entc/integration/migrate/entv1/user_update.go index 67205afc3..094f0905b 100644 --- a/entc/integration/migrate/entv1/user_update.go +++ b/entc/integration/migrate/entv1/user_update.go @@ -341,7 +341,7 @@ func (uu *UserUpdate) ClearCar() *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. @@ -940,7 +940,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. diff --git a/entc/integration/migrate/entv2/blog_create.go b/entc/integration/migrate/entv2/blog_create.go index 99732d126..71421376a 100644 --- a/entc/integration/migrate/entv2/blog_create.go +++ b/entc/integration/migrate/entv2/blog_create.go @@ -59,7 +59,7 @@ func (bc *BlogCreate) Mutation() *BlogMutation { // Save creates the Blog in the database. func (bc *BlogCreate) Save(ctx context.Context) (*Blog, error) { - return withHooks[*Blog, BlogMutation](ctx, bc.sqlSave, bc.mutation, bc.hooks) + return withHooks(ctx, bc.sqlSave, bc.mutation, bc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/migrate/entv2/blog_delete.go b/entc/integration/migrate/entv2/blog_delete.go index 35a8f327f..3544601eb 100644 --- a/entc/integration/migrate/entv2/blog_delete.go +++ b/entc/integration/migrate/entv2/blog_delete.go @@ -31,7 +31,7 @@ func (bd *BlogDelete) Where(ps ...predicate.Blog) *BlogDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (bd *BlogDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, BlogMutation](ctx, bd.sqlExec, bd.mutation, bd.hooks) + return withHooks(ctx, bd.sqlExec, bd.mutation, bd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/migrate/entv2/blog_update.go b/entc/integration/migrate/entv2/blog_update.go index d6dc5b098..888b7d348 100644 --- a/entc/integration/migrate/entv2/blog_update.go +++ b/entc/integration/migrate/entv2/blog_update.go @@ -88,7 +88,7 @@ func (bu *BlogUpdate) RemoveAdmins(u ...*User) *BlogUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (bu *BlogUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, BlogMutation](ctx, bu.sqlSave, bu.mutation, bu.hooks) + return withHooks(ctx, bu.sqlSave, bu.mutation, bu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -262,7 +262,7 @@ func (buo *BlogUpdateOne) Select(field string, fields ...string) *BlogUpdateOne // Save executes the query and returns the updated Blog entity. func (buo *BlogUpdateOne) Save(ctx context.Context) (*Blog, error) { - return withHooks[*Blog, BlogMutation](ctx, buo.sqlSave, buo.mutation, buo.hooks) + return withHooks(ctx, buo.sqlSave, buo.mutation, buo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/migrate/entv2/car_create.go b/entc/integration/migrate/entv2/car_create.go index b38043523..37647652d 100644 --- a/entc/integration/migrate/entv2/car_create.go +++ b/entc/integration/migrate/entv2/car_create.go @@ -56,7 +56,7 @@ func (cc *CarCreate) Mutation() *CarMutation { // Save creates the Car in the database. func (cc *CarCreate) Save(ctx context.Context) (*Car, error) { - return withHooks[*Car, CarMutation](ctx, cc.sqlSave, cc.mutation, cc.hooks) + return withHooks(ctx, cc.sqlSave, cc.mutation, cc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/migrate/entv2/car_delete.go b/entc/integration/migrate/entv2/car_delete.go index aacd1c9c8..76d0dc268 100644 --- a/entc/integration/migrate/entv2/car_delete.go +++ b/entc/integration/migrate/entv2/car_delete.go @@ -31,7 +31,7 @@ func (cd *CarDelete) Where(ps ...predicate.Car) *CarDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (cd *CarDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, CarMutation](ctx, cd.sqlExec, cd.mutation, cd.hooks) + return withHooks(ctx, cd.sqlExec, cd.mutation, cd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/migrate/entv2/car_update.go b/entc/integration/migrate/entv2/car_update.go index c7f0718c4..4b5cf72dd 100644 --- a/entc/integration/migrate/entv2/car_update.go +++ b/entc/integration/migrate/entv2/car_update.go @@ -76,7 +76,7 @@ func (cu *CarUpdate) ClearOwner() *CarUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (cu *CarUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, CarMutation](ctx, cu.sqlSave, cu.mutation, cu.hooks) + return withHooks(ctx, cu.sqlSave, cu.mutation, cu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -233,7 +233,7 @@ func (cuo *CarUpdateOne) Select(field string, fields ...string) *CarUpdateOne { // Save executes the query and returns the updated Car entity. func (cuo *CarUpdateOne) Save(ctx context.Context) (*Car, error) { - return withHooks[*Car, CarMutation](ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) + return withHooks(ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/migrate/entv2/conversion_create.go b/entc/integration/migrate/entv2/conversion_create.go index aaaf8cbfc..9423c8131 100644 --- a/entc/integration/migrate/entv2/conversion_create.go +++ b/entc/integration/migrate/entv2/conversion_create.go @@ -155,7 +155,7 @@ func (cc *ConversionCreate) Mutation() *ConversionMutation { // Save creates the Conversion in the database. func (cc *ConversionCreate) Save(ctx context.Context) (*Conversion, error) { - return withHooks[*Conversion, ConversionMutation](ctx, cc.sqlSave, cc.mutation, cc.hooks) + return withHooks(ctx, cc.sqlSave, cc.mutation, cc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/migrate/entv2/conversion_delete.go b/entc/integration/migrate/entv2/conversion_delete.go index ff0b047f9..9375046ee 100644 --- a/entc/integration/migrate/entv2/conversion_delete.go +++ b/entc/integration/migrate/entv2/conversion_delete.go @@ -31,7 +31,7 @@ func (cd *ConversionDelete) Where(ps ...predicate.Conversion) *ConversionDelete // Exec executes the deletion query and returns how many vertices were deleted. func (cd *ConversionDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, ConversionMutation](ctx, cd.sqlExec, cd.mutation, cd.hooks) + return withHooks(ctx, cd.sqlExec, cd.mutation, cd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/migrate/entv2/conversion_update.go b/entc/integration/migrate/entv2/conversion_update.go index 7db85578c..72ee1a948 100644 --- a/entc/integration/migrate/entv2/conversion_update.go +++ b/entc/integration/migrate/entv2/conversion_update.go @@ -218,7 +218,7 @@ func (cu *ConversionUpdate) Mutation() *ConversionMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (cu *ConversionUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, ConversionMutation](ctx, cu.sqlSave, cu.mutation, cu.hooks) + return withHooks(ctx, cu.sqlSave, cu.mutation, cu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -526,7 +526,7 @@ func (cuo *ConversionUpdateOne) Select(field string, fields ...string) *Conversi // Save executes the query and returns the updated Conversion entity. func (cuo *ConversionUpdateOne) Save(ctx context.Context) (*Conversion, error) { - return withHooks[*Conversion, ConversionMutation](ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) + return withHooks(ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/migrate/entv2/customtype_create.go b/entc/integration/migrate/entv2/customtype_create.go index c5d620ce7..52ab19cbd 100644 --- a/entc/integration/migrate/entv2/customtype_create.go +++ b/entc/integration/migrate/entv2/customtype_create.go @@ -72,7 +72,7 @@ func (ctc *CustomTypeCreate) Mutation() *CustomTypeMutation { // Save creates the CustomType in the database. func (ctc *CustomTypeCreate) Save(ctx context.Context) (*CustomType, error) { - return withHooks[*CustomType, CustomTypeMutation](ctx, ctc.sqlSave, ctc.mutation, ctc.hooks) + return withHooks(ctx, ctc.sqlSave, ctc.mutation, ctc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/migrate/entv2/customtype_delete.go b/entc/integration/migrate/entv2/customtype_delete.go index 5cbc815b7..3e8d491af 100644 --- a/entc/integration/migrate/entv2/customtype_delete.go +++ b/entc/integration/migrate/entv2/customtype_delete.go @@ -31,7 +31,7 @@ func (ctd *CustomTypeDelete) Where(ps ...predicate.CustomType) *CustomTypeDelete // Exec executes the deletion query and returns how many vertices were deleted. func (ctd *CustomTypeDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, CustomTypeMutation](ctx, ctd.sqlExec, ctd.mutation, ctd.hooks) + return withHooks(ctx, ctd.sqlExec, ctd.mutation, ctd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/migrate/entv2/customtype_update.go b/entc/integration/migrate/entv2/customtype_update.go index 5f7f42534..7566a99b1 100644 --- a/entc/integration/migrate/entv2/customtype_update.go +++ b/entc/integration/migrate/entv2/customtype_update.go @@ -99,7 +99,7 @@ func (ctu *CustomTypeUpdate) Mutation() *CustomTypeMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (ctu *CustomTypeUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, CustomTypeMutation](ctx, ctu.sqlSave, ctu.mutation, ctu.hooks) + return withHooks(ctx, ctu.sqlSave, ctu.mutation, ctu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -251,7 +251,7 @@ func (ctuo *CustomTypeUpdateOne) Select(field string, fields ...string) *CustomT // Save executes the query and returns the updated CustomType entity. func (ctuo *CustomTypeUpdateOne) Save(ctx context.Context) (*CustomType, error) { - return withHooks[*CustomType, CustomTypeMutation](ctx, ctuo.sqlSave, ctuo.mutation, ctuo.hooks) + return withHooks(ctx, ctuo.sqlSave, ctuo.mutation, ctuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/migrate/entv2/group_create.go b/entc/integration/migrate/entv2/group_create.go index 1c86d1f14..b89c7b9f2 100644 --- a/entc/integration/migrate/entv2/group_create.go +++ b/entc/integration/migrate/entv2/group_create.go @@ -29,7 +29,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. diff --git a/entc/integration/migrate/entv2/group_delete.go b/entc/integration/migrate/entv2/group_delete.go index e715517a6..e498f65cb 100644 --- a/entc/integration/migrate/entv2/group_delete.go +++ b/entc/integration/migrate/entv2/group_delete.go @@ -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. diff --git a/entc/integration/migrate/entv2/group_update.go b/entc/integration/migrate/entv2/group_update.go index 46b4412ed..9ef48a02e 100644 --- a/entc/integration/migrate/entv2/group_update.go +++ b/entc/integration/migrate/entv2/group_update.go @@ -38,7 +38,7 @@ func (gu *GroupUpdate) Mutation() *GroupMutation { // 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. @@ -112,7 +112,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. diff --git a/entc/integration/migrate/entv2/media_create.go b/entc/integration/migrate/entv2/media_create.go index 8faf2a3f7..f7ff2ceae 100644 --- a/entc/integration/migrate/entv2/media_create.go +++ b/entc/integration/migrate/entv2/media_create.go @@ -71,7 +71,7 @@ func (mc *MediaCreate) Mutation() *MediaMutation { // Save creates the Media in the database. func (mc *MediaCreate) Save(ctx context.Context) (*Media, error) { - return withHooks[*Media, MediaMutation](ctx, mc.sqlSave, mc.mutation, mc.hooks) + return withHooks(ctx, mc.sqlSave, mc.mutation, mc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/migrate/entv2/media_delete.go b/entc/integration/migrate/entv2/media_delete.go index e78412ab1..ec259a061 100644 --- a/entc/integration/migrate/entv2/media_delete.go +++ b/entc/integration/migrate/entv2/media_delete.go @@ -31,7 +31,7 @@ func (md *MediaDelete) Where(ps ...predicate.Media) *MediaDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (md *MediaDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, MediaMutation](ctx, md.sqlExec, md.mutation, md.hooks) + return withHooks(ctx, md.sqlExec, md.mutation, md.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/migrate/entv2/media_update.go b/entc/integration/migrate/entv2/media_update.go index 42c7ea8bb..168cde84a 100644 --- a/entc/integration/migrate/entv2/media_update.go +++ b/entc/integration/migrate/entv2/media_update.go @@ -98,7 +98,7 @@ func (mu *MediaUpdate) Mutation() *MediaMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (mu *MediaUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, MediaMutation](ctx, mu.sqlSave, mu.mutation, mu.hooks) + return withHooks(ctx, mu.sqlSave, mu.mutation, mu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -250,7 +250,7 @@ func (muo *MediaUpdateOne) Select(field string, fields ...string) *MediaUpdateOn // Save executes the query and returns the updated Media entity. func (muo *MediaUpdateOne) Save(ctx context.Context) (*Media, error) { - return withHooks[*Media, MediaMutation](ctx, muo.sqlSave, muo.mutation, muo.hooks) + return withHooks(ctx, muo.sqlSave, muo.mutation, muo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/migrate/entv2/pet_create.go b/entc/integration/migrate/entv2/pet_create.go index 2c9a1d169..3ada89f12 100644 --- a/entc/integration/migrate/entv2/pet_create.go +++ b/entc/integration/migrate/entv2/pet_create.go @@ -63,7 +63,7 @@ func (pc *PetCreate) Mutation() *PetMutation { // Save creates the Pet in the database. func (pc *PetCreate) Save(ctx context.Context) (*Pet, error) { - return withHooks[*Pet, PetMutation](ctx, pc.sqlSave, pc.mutation, pc.hooks) + return withHooks(ctx, pc.sqlSave, pc.mutation, pc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/migrate/entv2/pet_delete.go b/entc/integration/migrate/entv2/pet_delete.go index c50d25273..4ca50be6e 100644 --- a/entc/integration/migrate/entv2/pet_delete.go +++ b/entc/integration/migrate/entv2/pet_delete.go @@ -31,7 +31,7 @@ func (pd *PetDelete) Where(ps ...predicate.Pet) *PetDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (pd *PetDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pd.sqlExec, pd.mutation, pd.hooks) + return withHooks(ctx, pd.sqlExec, pd.mutation, pd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/migrate/entv2/pet_update.go b/entc/integration/migrate/entv2/pet_update.go index 5d8e67cbd..028981acc 100644 --- a/entc/integration/migrate/entv2/pet_update.go +++ b/entc/integration/migrate/entv2/pet_update.go @@ -84,7 +84,7 @@ func (pu *PetUpdate) ClearOwner() *PetUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (pu *PetUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pu.sqlSave, pu.mutation, pu.hooks) + return withHooks(ctx, pu.sqlSave, pu.mutation, pu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -238,7 +238,7 @@ func (puo *PetUpdateOne) Select(field string, fields ...string) *PetUpdateOne { // Save executes the query and returns the updated Pet entity. func (puo *PetUpdateOne) Save(ctx context.Context) (*Pet, error) { - return withHooks[*Pet, PetMutation](ctx, puo.sqlSave, puo.mutation, puo.hooks) + return withHooks(ctx, puo.sqlSave, puo.mutation, puo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/migrate/entv2/user_create.go b/entc/integration/migrate/entv2/user_create.go index f9dd5e648..12a43a0e7 100644 --- a/entc/integration/migrate/entv2/user_create.go +++ b/entc/integration/migrate/entv2/user_create.go @@ -335,7 +335,7 @@ func (uc *UserCreate) Mutation() *UserMutation { // Save creates the User in the database. func (uc *UserCreate) Save(ctx context.Context) (*User, error) { uc.defaults() - 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. diff --git a/entc/integration/migrate/entv2/user_delete.go b/entc/integration/migrate/entv2/user_delete.go index 75c00c5ff..66efa1eaa 100644 --- a/entc/integration/migrate/entv2/user_delete.go +++ b/entc/integration/migrate/entv2/user_delete.go @@ -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. diff --git a/entc/integration/migrate/entv2/user_update.go b/entc/integration/migrate/entv2/user_update.go index 572cb7cbf..08c539e23 100644 --- a/entc/integration/migrate/entv2/user_update.go +++ b/entc/integration/migrate/entv2/user_update.go @@ -458,7 +458,7 @@ func (uu *UserUpdate) RemoveFriends(u ...*User) *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. @@ -1201,7 +1201,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. diff --git a/entc/integration/migrate/entv2/zoo_create.go b/entc/integration/migrate/entv2/zoo_create.go index b0987cb89..eee3a0372 100644 --- a/entc/integration/migrate/entv2/zoo_create.go +++ b/entc/integration/migrate/entv2/zoo_create.go @@ -35,7 +35,7 @@ func (zc *ZooCreate) Mutation() *ZooMutation { // Save creates the Zoo in the database. func (zc *ZooCreate) Save(ctx context.Context) (*Zoo, error) { - return withHooks[*Zoo, ZooMutation](ctx, zc.sqlSave, zc.mutation, zc.hooks) + return withHooks(ctx, zc.sqlSave, zc.mutation, zc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/migrate/entv2/zoo_delete.go b/entc/integration/migrate/entv2/zoo_delete.go index 07b4261e2..236492c46 100644 --- a/entc/integration/migrate/entv2/zoo_delete.go +++ b/entc/integration/migrate/entv2/zoo_delete.go @@ -31,7 +31,7 @@ func (zd *ZooDelete) Where(ps ...predicate.Zoo) *ZooDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (zd *ZooDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, ZooMutation](ctx, zd.sqlExec, zd.mutation, zd.hooks) + return withHooks(ctx, zd.sqlExec, zd.mutation, zd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/migrate/entv2/zoo_update.go b/entc/integration/migrate/entv2/zoo_update.go index 22a8c087f..a66679c0f 100644 --- a/entc/integration/migrate/entv2/zoo_update.go +++ b/entc/integration/migrate/entv2/zoo_update.go @@ -38,7 +38,7 @@ func (zu *ZooUpdate) Mutation() *ZooMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (zu *ZooUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, ZooMutation](ctx, zu.sqlSave, zu.mutation, zu.hooks) + return withHooks(ctx, zu.sqlSave, zu.mutation, zu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -112,7 +112,7 @@ func (zuo *ZooUpdateOne) Select(field string, fields ...string) *ZooUpdateOne { // Save executes the query and returns the updated Zoo entity. func (zuo *ZooUpdateOne) Save(ctx context.Context) (*Zoo, error) { - return withHooks[*Zoo, ZooMutation](ctx, zuo.sqlSave, zuo.mutation, zuo.hooks) + return withHooks(ctx, zuo.sqlSave, zuo.mutation, zuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/migrate/versioned/group_create.go b/entc/integration/migrate/versioned/group_create.go index c37a9c3c3..a01cecbba 100644 --- a/entc/integration/migrate/versioned/group_create.go +++ b/entc/integration/migrate/versioned/group_create.go @@ -36,7 +36,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. diff --git a/entc/integration/migrate/versioned/group_delete.go b/entc/integration/migrate/versioned/group_delete.go index 51376aa60..b017135db 100644 --- a/entc/integration/migrate/versioned/group_delete.go +++ b/entc/integration/migrate/versioned/group_delete.go @@ -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. diff --git a/entc/integration/migrate/versioned/group_update.go b/entc/integration/migrate/versioned/group_update.go index 408be66cd..eafa41c36 100644 --- a/entc/integration/migrate/versioned/group_update.go +++ b/entc/integration/migrate/versioned/group_update.go @@ -44,7 +44,7 @@ func (gu *GroupUpdate) Mutation() *GroupMutation { // 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. @@ -127,7 +127,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. diff --git a/entc/integration/migrate/versioned/user_create.go b/entc/integration/migrate/versioned/user_create.go index d9aa5ad67..67128b56a 100644 --- a/entc/integration/migrate/versioned/user_create.go +++ b/entc/integration/migrate/versioned/user_create.go @@ -56,7 +56,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. diff --git a/entc/integration/migrate/versioned/user_delete.go b/entc/integration/migrate/versioned/user_delete.go index 4c8081930..7b6ac90e2 100644 --- a/entc/integration/migrate/versioned/user_delete.go +++ b/entc/integration/migrate/versioned/user_delete.go @@ -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. diff --git a/entc/integration/migrate/versioned/user_update.go b/entc/integration/migrate/versioned/user_update.go index 4c4eb33e5..43fa20590 100644 --- a/entc/integration/migrate/versioned/user_update.go +++ b/entc/integration/migrate/versioned/user_update.go @@ -77,7 +77,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. @@ -218,7 +218,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. diff --git a/entc/integration/multischema/ent/friendship_create.go b/entc/integration/multischema/ent/friendship_create.go index 74bdb7852..408bdb6a1 100644 --- a/entc/integration/multischema/ent/friendship_create.go +++ b/entc/integration/multischema/ent/friendship_create.go @@ -83,7 +83,7 @@ func (fc *FriendshipCreate) Mutation() *FriendshipMutation { // Save creates the Friendship in the database. func (fc *FriendshipCreate) Save(ctx context.Context) (*Friendship, error) { fc.defaults() - return withHooks[*Friendship, FriendshipMutation](ctx, fc.sqlSave, fc.mutation, fc.hooks) + return withHooks(ctx, fc.sqlSave, fc.mutation, fc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/multischema/ent/friendship_delete.go b/entc/integration/multischema/ent/friendship_delete.go index 6dd431613..cc463031e 100644 --- a/entc/integration/multischema/ent/friendship_delete.go +++ b/entc/integration/multischema/ent/friendship_delete.go @@ -32,7 +32,7 @@ func (fd *FriendshipDelete) Where(ps ...predicate.Friendship) *FriendshipDelete // Exec executes the deletion query and returns how many vertices were deleted. func (fd *FriendshipDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, FriendshipMutation](ctx, fd.sqlExec, fd.mutation, fd.hooks) + return withHooks(ctx, fd.sqlExec, fd.mutation, fd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/multischema/ent/friendship_update.go b/entc/integration/multischema/ent/friendship_update.go index d5c5a85ba..24a26fb52 100644 --- a/entc/integration/multischema/ent/friendship_update.go +++ b/entc/integration/multischema/ent/friendship_update.go @@ -76,7 +76,7 @@ func (fu *FriendshipUpdate) Mutation() *FriendshipMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (fu *FriendshipUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, FriendshipMutation](ctx, fu.sqlSave, fu.mutation, fu.hooks) + return withHooks(ctx, fu.sqlSave, fu.mutation, fu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -218,7 +218,7 @@ func (fuo *FriendshipUpdateOne) Select(field string, fields ...string) *Friendsh // Save executes the query and returns the updated Friendship entity. func (fuo *FriendshipUpdateOne) Save(ctx context.Context) (*Friendship, error) { - return withHooks[*Friendship, FriendshipMutation](ctx, fuo.sqlSave, fuo.mutation, fuo.hooks) + return withHooks(ctx, fuo.sqlSave, fuo.mutation, fuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/multischema/ent/group_create.go b/entc/integration/multischema/ent/group_create.go index 65b6984ba..6404b4db6 100644 --- a/entc/integration/multischema/ent/group_create.go +++ b/entc/integration/multischema/ent/group_create.go @@ -61,7 +61,7 @@ func (gc *GroupCreate) Mutation() *GroupMutation { // Save creates the Group in the database. func (gc *GroupCreate) Save(ctx context.Context) (*Group, error) { gc.defaults() - 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. diff --git a/entc/integration/multischema/ent/group_delete.go b/entc/integration/multischema/ent/group_delete.go index 282026977..42c9580e4 100644 --- a/entc/integration/multischema/ent/group_delete.go +++ b/entc/integration/multischema/ent/group_delete.go @@ -32,7 +32,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. diff --git a/entc/integration/multischema/ent/group_update.go b/entc/integration/multischema/ent/group_update.go index 996fe2473..2e36b066b 100644 --- a/entc/integration/multischema/ent/group_update.go +++ b/entc/integration/multischema/ent/group_update.go @@ -91,7 +91,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. @@ -276,7 +276,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. diff --git a/entc/integration/multischema/ent/pet_create.go b/entc/integration/multischema/ent/pet_create.go index d19098d50..dfa8ecefa 100644 --- a/entc/integration/multischema/ent/pet_create.go +++ b/entc/integration/multischema/ent/pet_create.go @@ -65,7 +65,7 @@ func (pc *PetCreate) Mutation() *PetMutation { // Save creates the Pet in the database. func (pc *PetCreate) Save(ctx context.Context) (*Pet, error) { pc.defaults() - return withHooks[*Pet, PetMutation](ctx, pc.sqlSave, pc.mutation, pc.hooks) + return withHooks(ctx, pc.sqlSave, pc.mutation, pc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/multischema/ent/pet_delete.go b/entc/integration/multischema/ent/pet_delete.go index 0b96ae5e1..6e522ce83 100644 --- a/entc/integration/multischema/ent/pet_delete.go +++ b/entc/integration/multischema/ent/pet_delete.go @@ -32,7 +32,7 @@ func (pd *PetDelete) Where(ps ...predicate.Pet) *PetDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (pd *PetDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pd.sqlExec, pd.mutation, pd.hooks) + return withHooks(ctx, pd.sqlExec, pd.mutation, pd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/multischema/ent/pet_update.go b/entc/integration/multischema/ent/pet_update.go index 01f306089..447aec19d 100644 --- a/entc/integration/multischema/ent/pet_update.go +++ b/entc/integration/multischema/ent/pet_update.go @@ -86,7 +86,7 @@ func (pu *PetUpdate) ClearOwner() *PetUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (pu *PetUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pu.sqlSave, pu.mutation, pu.hooks) + return withHooks(ctx, pu.sqlSave, pu.mutation, pu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -249,7 +249,7 @@ func (puo *PetUpdateOne) Select(field string, fields ...string) *PetUpdateOne { // Save executes the query and returns the updated Pet entity. func (puo *PetUpdateOne) Save(ctx context.Context) (*Pet, error) { - return withHooks[*Pet, PetMutation](ctx, puo.sqlSave, puo.mutation, puo.hooks) + return withHooks(ctx, puo.sqlSave, puo.mutation, puo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/multischema/ent/user_create.go b/entc/integration/multischema/ent/user_create.go index f888e8083..21871366a 100644 --- a/entc/integration/multischema/ent/user_create.go +++ b/entc/integration/multischema/ent/user_create.go @@ -108,7 +108,7 @@ func (uc *UserCreate) Mutation() *UserMutation { // Save creates the User in the database. func (uc *UserCreate) Save(ctx context.Context) (*User, error) { uc.defaults() - 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. diff --git a/entc/integration/multischema/ent/user_delete.go b/entc/integration/multischema/ent/user_delete.go index 5d370ea1b..71f8ba00c 100644 --- a/entc/integration/multischema/ent/user_delete.go +++ b/entc/integration/multischema/ent/user_delete.go @@ -32,7 +32,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. diff --git a/entc/integration/multischema/ent/user_update.go b/entc/integration/multischema/ent/user_update.go index 8a5f3c8bb..7d442dac6 100644 --- a/entc/integration/multischema/ent/user_update.go +++ b/entc/integration/multischema/ent/user_update.go @@ -201,7 +201,7 @@ func (uu *UserUpdate) RemoveFriendships(f ...*Friendship) *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. @@ -650,7 +650,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. diff --git a/entc/integration/privacy/ent/task_create.go b/entc/integration/privacy/ent/task_create.go index be2503775..978ba5072 100644 --- a/entc/integration/privacy/ent/task_create.go +++ b/entc/integration/privacy/ent/task_create.go @@ -118,7 +118,7 @@ func (tc *TaskCreate) Save(ctx context.Context) (*Task, error) { if err := tc.defaults(); err != nil { return nil, err } - return withHooks[*Task, TaskMutation](ctx, tc.sqlSave, tc.mutation, tc.hooks) + return withHooks(ctx, tc.sqlSave, tc.mutation, tc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/privacy/ent/task_delete.go b/entc/integration/privacy/ent/task_delete.go index 0f5d98c5a..3b98a81be 100644 --- a/entc/integration/privacy/ent/task_delete.go +++ b/entc/integration/privacy/ent/task_delete.go @@ -31,7 +31,7 @@ func (td *TaskDelete) Where(ps ...predicate.Task) *TaskDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (td *TaskDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, TaskMutation](ctx, td.sqlExec, td.mutation, td.hooks) + return withHooks(ctx, td.sqlExec, td.mutation, td.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/privacy/ent/task_update.go b/entc/integration/privacy/ent/task_update.go index a1593fac0..020254877 100644 --- a/entc/integration/privacy/ent/task_update.go +++ b/entc/integration/privacy/ent/task_update.go @@ -162,7 +162,7 @@ func (tu *TaskUpdate) ClearOwner() *TaskUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (tu *TaskUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, TaskMutation](ctx, tu.sqlSave, tu.mutation, tu.hooks) + return withHooks(ctx, tu.sqlSave, tu.mutation, tu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -467,7 +467,7 @@ func (tuo *TaskUpdateOne) Select(field string, fields ...string) *TaskUpdateOne // Save executes the query and returns the updated Task entity. func (tuo *TaskUpdateOne) Save(ctx context.Context) (*Task, error) { - return withHooks[*Task, TaskMutation](ctx, tuo.sqlSave, tuo.mutation, tuo.hooks) + return withHooks(ctx, tuo.sqlSave, tuo.mutation, tuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/privacy/ent/team_create.go b/entc/integration/privacy/ent/team_create.go index 82b79ddf2..7331edd4a 100644 --- a/entc/integration/privacy/ent/team_create.go +++ b/entc/integration/privacy/ent/team_create.go @@ -68,7 +68,7 @@ func (tc *TeamCreate) Mutation() *TeamMutation { // Save creates the Team in the database. func (tc *TeamCreate) Save(ctx context.Context) (*Team, error) { - return withHooks[*Team, TeamMutation](ctx, tc.sqlSave, tc.mutation, tc.hooks) + return withHooks(ctx, tc.sqlSave, tc.mutation, tc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/privacy/ent/team_delete.go b/entc/integration/privacy/ent/team_delete.go index 8b5494121..212bb4d00 100644 --- a/entc/integration/privacy/ent/team_delete.go +++ b/entc/integration/privacy/ent/team_delete.go @@ -31,7 +31,7 @@ func (td *TeamDelete) Where(ps ...predicate.Team) *TeamDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (td *TeamDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, TeamMutation](ctx, td.sqlExec, td.mutation, td.hooks) + return withHooks(ctx, td.sqlExec, td.mutation, td.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/privacy/ent/team_update.go b/entc/integration/privacy/ent/team_update.go index cf3574459..a954ff5dc 100644 --- a/entc/integration/privacy/ent/team_update.go +++ b/entc/integration/privacy/ent/team_update.go @@ -118,7 +118,7 @@ func (tu *TeamUpdate) RemoveUsers(u ...*User) *TeamUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (tu *TeamUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, TeamMutation](ctx, tu.sqlSave, tu.mutation, tu.hooks) + return withHooks(ctx, tu.sqlSave, tu.mutation, tu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -376,7 +376,7 @@ func (tuo *TeamUpdateOne) Select(field string, fields ...string) *TeamUpdateOne // Save executes the query and returns the updated Team entity. func (tuo *TeamUpdateOne) Save(ctx context.Context) (*Team, error) { - return withHooks[*Team, TeamMutation](ctx, tuo.sqlSave, tuo.mutation, tuo.hooks) + return withHooks(ctx, tuo.sqlSave, tuo.mutation, tuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/privacy/ent/user_create.go b/entc/integration/privacy/ent/user_create.go index 9c9c0ae2e..63a43f330 100644 --- a/entc/integration/privacy/ent/user_create.go +++ b/entc/integration/privacy/ent/user_create.go @@ -82,7 +82,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. diff --git a/entc/integration/privacy/ent/user_delete.go b/entc/integration/privacy/ent/user_delete.go index 721232391..dc391b9cc 100644 --- a/entc/integration/privacy/ent/user_delete.go +++ b/entc/integration/privacy/ent/user_delete.go @@ -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. diff --git a/entc/integration/privacy/ent/user_update.go b/entc/integration/privacy/ent/user_update.go index 8e32798a9..b89c971b6 100644 --- a/entc/integration/privacy/ent/user_update.go +++ b/entc/integration/privacy/ent/user_update.go @@ -139,7 +139,7 @@ func (uu *UserUpdate) RemoveTasks(t ...*Task) *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. @@ -411,7 +411,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. diff --git a/entc/integration/template/ent/group_create.go b/entc/integration/template/ent/group_create.go index 742ebb6fa..6051fa9bf 100644 --- a/entc/integration/template/ent/group_create.go +++ b/entc/integration/template/ent/group_create.go @@ -36,7 +36,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. diff --git a/entc/integration/template/ent/group_delete.go b/entc/integration/template/ent/group_delete.go index 74f9a5724..3291b394f 100644 --- a/entc/integration/template/ent/group_delete.go +++ b/entc/integration/template/ent/group_delete.go @@ -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. diff --git a/entc/integration/template/ent/group_update.go b/entc/integration/template/ent/group_update.go index 011a3c70b..76d5445a2 100644 --- a/entc/integration/template/ent/group_update.go +++ b/entc/integration/template/ent/group_update.go @@ -51,7 +51,7 @@ func (gu *GroupUpdate) Mutation() *GroupMutation { // 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. @@ -144,7 +144,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. diff --git a/entc/integration/template/ent/pet_create.go b/entc/integration/template/ent/pet_create.go index 332c13741..51510d38d 100644 --- a/entc/integration/template/ent/pet_create.go +++ b/entc/integration/template/ent/pet_create.go @@ -71,7 +71,7 @@ func (pc *PetCreate) Mutation() *PetMutation { // Save creates the Pet in the database. func (pc *PetCreate) Save(ctx context.Context) (*Pet, error) { - return withHooks[*Pet, PetMutation](ctx, pc.sqlSave, pc.mutation, pc.hooks) + return withHooks(ctx, pc.sqlSave, pc.mutation, pc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/entc/integration/template/ent/pet_delete.go b/entc/integration/template/ent/pet_delete.go index b517eb0ab..d13eb575f 100644 --- a/entc/integration/template/ent/pet_delete.go +++ b/entc/integration/template/ent/pet_delete.go @@ -31,7 +31,7 @@ func (pd *PetDelete) Where(ps ...predicate.Pet) *PetDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (pd *PetDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pd.sqlExec, pd.mutation, pd.hooks) + return withHooks(ctx, pd.sqlExec, pd.mutation, pd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/entc/integration/template/ent/pet_update.go b/entc/integration/template/ent/pet_update.go index d07807303..63e82c63c 100644 --- a/entc/integration/template/ent/pet_update.go +++ b/entc/integration/template/ent/pet_update.go @@ -98,7 +98,7 @@ func (pu *PetUpdate) ClearOwner() *PetUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (pu *PetUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pu.sqlSave, pu.mutation, pu.hooks) + return withHooks(ctx, pu.sqlSave, pu.mutation, pu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -271,7 +271,7 @@ func (puo *PetUpdateOne) Select(field string, fields ...string) *PetUpdateOne { // Save executes the query and returns the updated Pet entity. func (puo *PetUpdateOne) Save(ctx context.Context) (*Pet, error) { - return withHooks[*Pet, PetMutation](ctx, puo.sqlSave, puo.mutation, puo.hooks) + return withHooks(ctx, puo.sqlSave, puo.mutation, puo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/entc/integration/template/ent/user_create.go b/entc/integration/template/ent/user_create.go index 09a41adbb..de66cc507 100644 --- a/entc/integration/template/ent/user_create.go +++ b/entc/integration/template/ent/user_create.go @@ -67,7 +67,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. diff --git a/entc/integration/template/ent/user_delete.go b/entc/integration/template/ent/user_delete.go index b9f5390bb..0aba4f043 100644 --- a/entc/integration/template/ent/user_delete.go +++ b/entc/integration/template/ent/user_delete.go @@ -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. diff --git a/entc/integration/template/ent/user_update.go b/entc/integration/template/ent/user_update.go index 9cd1be6fc..6596839be 100644 --- a/entc/integration/template/ent/user_update.go +++ b/entc/integration/template/ent/user_update.go @@ -117,7 +117,7 @@ func (uu *UserUpdate) RemoveFriends(u ...*User) *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. @@ -362,7 +362,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. diff --git a/examples/edgeindex/ent/city_create.go b/examples/edgeindex/ent/city_create.go index 61fccac5c..f98528498 100644 --- a/examples/edgeindex/ent/city_create.go +++ b/examples/edgeindex/ent/city_create.go @@ -52,7 +52,7 @@ func (cc *CityCreate) Mutation() *CityMutation { // Save creates the City in the database. func (cc *CityCreate) Save(ctx context.Context) (*City, error) { - return withHooks[*City, CityMutation](ctx, cc.sqlSave, cc.mutation, cc.hooks) + return withHooks(ctx, cc.sqlSave, cc.mutation, cc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/examples/edgeindex/ent/city_delete.go b/examples/edgeindex/ent/city_delete.go index f15d47529..27547ec5e 100644 --- a/examples/edgeindex/ent/city_delete.go +++ b/examples/edgeindex/ent/city_delete.go @@ -31,7 +31,7 @@ func (cd *CityDelete) Where(ps ...predicate.City) *CityDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (cd *CityDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, CityMutation](ctx, cd.sqlExec, cd.mutation, cd.hooks) + return withHooks(ctx, cd.sqlExec, cd.mutation, cd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/examples/edgeindex/ent/city_update.go b/examples/edgeindex/ent/city_update.go index 15fc0e1c8..4de0e67d9 100644 --- a/examples/edgeindex/ent/city_update.go +++ b/examples/edgeindex/ent/city_update.go @@ -81,7 +81,7 @@ func (cu *CityUpdate) RemoveStreets(s ...*Street) *CityUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (cu *CityUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, CityMutation](ctx, cu.sqlSave, cu.mutation, cu.hooks) + return withHooks(ctx, cu.sqlSave, cu.mutation, cu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -245,7 +245,7 @@ func (cuo *CityUpdateOne) Select(field string, fields ...string) *CityUpdateOne // Save executes the query and returns the updated City entity. func (cuo *CityUpdateOne) Save(ctx context.Context) (*City, error) { - return withHooks[*City, CityMutation](ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) + return withHooks(ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/examples/edgeindex/ent/street_create.go b/examples/edgeindex/ent/street_create.go index 9ec449e3a..bafd59f18 100644 --- a/examples/edgeindex/ent/street_create.go +++ b/examples/edgeindex/ent/street_create.go @@ -56,7 +56,7 @@ func (sc *StreetCreate) Mutation() *StreetMutation { // Save creates the Street in the database. func (sc *StreetCreate) Save(ctx context.Context) (*Street, error) { - return withHooks[*Street, StreetMutation](ctx, sc.sqlSave, sc.mutation, sc.hooks) + return withHooks(ctx, sc.sqlSave, sc.mutation, sc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/examples/edgeindex/ent/street_delete.go b/examples/edgeindex/ent/street_delete.go index 64fa78217..961a898a5 100644 --- a/examples/edgeindex/ent/street_delete.go +++ b/examples/edgeindex/ent/street_delete.go @@ -31,7 +31,7 @@ func (sd *StreetDelete) Where(ps ...predicate.Street) *StreetDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (sd *StreetDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, StreetMutation](ctx, sd.sqlExec, sd.mutation, sd.hooks) + return withHooks(ctx, sd.sqlExec, sd.mutation, sd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/examples/edgeindex/ent/street_update.go b/examples/edgeindex/ent/street_update.go index fdb4a1e8a..b2ff61fcd 100644 --- a/examples/edgeindex/ent/street_update.go +++ b/examples/edgeindex/ent/street_update.go @@ -70,7 +70,7 @@ func (su *StreetUpdate) ClearCity() *StreetUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (su *StreetUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, StreetMutation](ctx, su.sqlSave, su.mutation, su.hooks) + return withHooks(ctx, su.sqlSave, su.mutation, su.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -207,7 +207,7 @@ func (suo *StreetUpdateOne) Select(field string, fields ...string) *StreetUpdate // Save executes the query and returns the updated Street entity. func (suo *StreetUpdateOne) Save(ctx context.Context) (*Street, error) { - return withHooks[*Street, StreetMutation](ctx, suo.sqlSave, suo.mutation, suo.hooks) + return withHooks(ctx, suo.sqlSave, suo.mutation, suo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/examples/encryptfield/ent/user_create.go b/examples/encryptfield/ent/user_create.go index 247b8e075..a5f4d173a 100644 --- a/examples/encryptfield/ent/user_create.go +++ b/examples/encryptfield/ent/user_create.go @@ -50,7 +50,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. diff --git a/examples/encryptfield/ent/user_delete.go b/examples/encryptfield/ent/user_delete.go index 34d5cd88f..756784950 100644 --- a/examples/encryptfield/ent/user_delete.go +++ b/examples/encryptfield/ent/user_delete.go @@ -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. diff --git a/examples/encryptfield/ent/user_update.go b/examples/encryptfield/ent/user_update.go index 5f4b9f2b0..53238bb9e 100644 --- a/examples/encryptfield/ent/user_update.go +++ b/examples/encryptfield/ent/user_update.go @@ -64,7 +64,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. @@ -173,7 +173,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. diff --git a/examples/entcpkg/ent/user_create.go b/examples/entcpkg/ent/user_create.go index db34f8d63..4c269bb55 100644 --- a/examples/entcpkg/ent/user_create.go +++ b/examples/entcpkg/ent/user_create.go @@ -57,7 +57,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. diff --git a/examples/entcpkg/ent/user_delete.go b/examples/entcpkg/ent/user_delete.go index 0a9bf5d14..bf9bf5a83 100644 --- a/examples/entcpkg/ent/user_delete.go +++ b/examples/entcpkg/ent/user_delete.go @@ -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. diff --git a/examples/entcpkg/ent/user_update.go b/examples/entcpkg/ent/user_update.go index 7ce7cda3a..628a0ae37 100644 --- a/examples/entcpkg/ent/user_update.go +++ b/examples/entcpkg/ent/user_update.go @@ -85,7 +85,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. @@ -221,7 +221,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. diff --git a/examples/fs/ent/file_create.go b/examples/fs/ent/file_create.go index ae45988d7..bd029a8c9 100644 --- a/examples/fs/ent/file_create.go +++ b/examples/fs/ent/file_create.go @@ -85,7 +85,7 @@ func (fc *FileCreate) Mutation() *FileMutation { // Save creates the File in the database. func (fc *FileCreate) Save(ctx context.Context) (*File, error) { fc.defaults() - return withHooks[*File, FileMutation](ctx, fc.sqlSave, fc.mutation, fc.hooks) + return withHooks(ctx, fc.sqlSave, fc.mutation, fc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/examples/fs/ent/file_delete.go b/examples/fs/ent/file_delete.go index 686467f0d..a9b162dd9 100644 --- a/examples/fs/ent/file_delete.go +++ b/examples/fs/ent/file_delete.go @@ -31,7 +31,7 @@ func (fd *FileDelete) Where(ps ...predicate.File) *FileDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (fd *FileDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, FileMutation](ctx, fd.sqlExec, fd.mutation, fd.hooks) + return withHooks(ctx, fd.sqlExec, fd.mutation, fd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/examples/fs/ent/file_update.go b/examples/fs/ent/file_update.go index ad15cece5..f164f1b93 100644 --- a/examples/fs/ent/file_update.go +++ b/examples/fs/ent/file_update.go @@ -125,7 +125,7 @@ func (fu *FileUpdate) RemoveChildren(f ...*File) *FileUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (fu *FileUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, FileMutation](ctx, fu.sqlSave, fu.mutation, fu.hooks) + return withHooks(ctx, fu.sqlSave, fu.mutation, fu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -366,7 +366,7 @@ func (fuo *FileUpdateOne) Select(field string, fields ...string) *FileUpdateOne // Save executes the query and returns the updated File entity. func (fuo *FileUpdateOne) Save(ctx context.Context) (*File, error) { - return withHooks[*File, FileMutation](ctx, fuo.sqlSave, fuo.mutation, fuo.hooks) + return withHooks(ctx, fuo.sqlSave, fuo.mutation, fuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/examples/jsonencode/ent/card_create.go b/examples/jsonencode/ent/card_create.go index 118d44b55..6dca1e2d0 100644 --- a/examples/jsonencode/ent/card_create.go +++ b/examples/jsonencode/ent/card_create.go @@ -36,7 +36,7 @@ func (cc *CardCreate) Mutation() *CardMutation { // Save creates the Card in the database. func (cc *CardCreate) Save(ctx context.Context) (*Card, error) { - return withHooks[*Card, CardMutation](ctx, cc.sqlSave, cc.mutation, cc.hooks) + return withHooks(ctx, cc.sqlSave, cc.mutation, cc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/examples/jsonencode/ent/card_delete.go b/examples/jsonencode/ent/card_delete.go index 890a9835d..b5062ac48 100644 --- a/examples/jsonencode/ent/card_delete.go +++ b/examples/jsonencode/ent/card_delete.go @@ -31,7 +31,7 @@ func (cd *CardDelete) Where(ps ...predicate.Card) *CardDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (cd *CardDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, CardMutation](ctx, cd.sqlExec, cd.mutation, cd.hooks) + return withHooks(ctx, cd.sqlExec, cd.mutation, cd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/examples/jsonencode/ent/card_update.go b/examples/jsonencode/ent/card_update.go index c59886154..aa5abd2e8 100644 --- a/examples/jsonencode/ent/card_update.go +++ b/examples/jsonencode/ent/card_update.go @@ -44,7 +44,7 @@ func (cu *CardUpdate) Mutation() *CardMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (cu *CardUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, CardMutation](ctx, cu.sqlSave, cu.mutation, cu.hooks) + return withHooks(ctx, cu.sqlSave, cu.mutation, cu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -127,7 +127,7 @@ func (cuo *CardUpdateOne) Select(field string, fields ...string) *CardUpdateOne // Save executes the query and returns the updated Card entity. func (cuo *CardUpdateOne) Save(ctx context.Context) (*Card, error) { - return withHooks[*Card, CardMutation](ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) + return withHooks(ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/examples/jsonencode/ent/pet_create.go b/examples/jsonencode/ent/pet_create.go index 512b60616..0bd8f4325 100644 --- a/examples/jsonencode/ent/pet_create.go +++ b/examples/jsonencode/ent/pet_create.go @@ -54,7 +54,7 @@ func (pc *PetCreate) Mutation() *PetMutation { // Save creates the Pet in the database. func (pc *PetCreate) Save(ctx context.Context) (*Pet, error) { - return withHooks[*Pet, PetMutation](ctx, pc.sqlSave, pc.mutation, pc.hooks) + return withHooks(ctx, pc.sqlSave, pc.mutation, pc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/examples/jsonencode/ent/pet_delete.go b/examples/jsonencode/ent/pet_delete.go index f3dd04246..05954f09e 100644 --- a/examples/jsonencode/ent/pet_delete.go +++ b/examples/jsonencode/ent/pet_delete.go @@ -31,7 +31,7 @@ func (pd *PetDelete) Where(ps ...predicate.Pet) *PetDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (pd *PetDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pd.sqlExec, pd.mutation, pd.hooks) + return withHooks(ctx, pd.sqlExec, pd.mutation, pd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/examples/jsonencode/ent/pet_update.go b/examples/jsonencode/ent/pet_update.go index ba1f41ef6..4e965075d 100644 --- a/examples/jsonencode/ent/pet_update.go +++ b/examples/jsonencode/ent/pet_update.go @@ -75,7 +75,7 @@ func (pu *PetUpdate) ClearOwner() *PetUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (pu *PetUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pu.sqlSave, pu.mutation, pu.hooks) + return withHooks(ctx, pu.sqlSave, pu.mutation, pu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -234,7 +234,7 @@ func (puo *PetUpdateOne) Select(field string, fields ...string) *PetUpdateOne { // Save executes the query and returns the updated Pet entity. func (puo *PetUpdateOne) Save(ctx context.Context) (*Pet, error) { - return withHooks[*Pet, PetMutation](ctx, puo.sqlSave, puo.mutation, puo.hooks) + return withHooks(ctx, puo.sqlSave, puo.mutation, puo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/examples/jsonencode/ent/user_create.go b/examples/jsonencode/ent/user_create.go index b1cab1660..9d45e390c 100644 --- a/examples/jsonencode/ent/user_create.go +++ b/examples/jsonencode/ent/user_create.go @@ -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. diff --git a/examples/jsonencode/ent/user_delete.go b/examples/jsonencode/ent/user_delete.go index aa2147e0f..b3a845dfd 100644 --- a/examples/jsonencode/ent/user_delete.go +++ b/examples/jsonencode/ent/user_delete.go @@ -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. diff --git a/examples/jsonencode/ent/user_update.go b/examples/jsonencode/ent/user_update.go index e2d506a31..e665fc6a4 100644 --- a/examples/jsonencode/ent/user_update.go +++ b/examples/jsonencode/ent/user_update.go @@ -94,7 +94,7 @@ func (uu *UserUpdate) RemovePets(p ...*Pet) *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. diff --git a/examples/m2m2types/ent/group_create.go b/examples/m2m2types/ent/group_create.go index 2e49fd977..2b2c1454a 100644 --- a/examples/m2m2types/ent/group_create.go +++ b/examples/m2m2types/ent/group_create.go @@ -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. diff --git a/examples/m2m2types/ent/group_delete.go b/examples/m2m2types/ent/group_delete.go index 887407974..d6d1ee755 100644 --- a/examples/m2m2types/ent/group_delete.go +++ b/examples/m2m2types/ent/group_delete.go @@ -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. diff --git a/examples/m2m2types/ent/group_update.go b/examples/m2m2types/ent/group_update.go index 22a847b0a..1ffb73447 100644 --- a/examples/m2m2types/ent/group_update.go +++ b/examples/m2m2types/ent/group_update.go @@ -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. diff --git a/examples/m2m2types/ent/user_create.go b/examples/m2m2types/ent/user_create.go index a2596611d..382e35241 100644 --- a/examples/m2m2types/ent/user_create.go +++ b/examples/m2m2types/ent/user_create.go @@ -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. diff --git a/examples/m2m2types/ent/user_delete.go b/examples/m2m2types/ent/user_delete.go index 65a5d56a7..706da4bae 100644 --- a/examples/m2m2types/ent/user_delete.go +++ b/examples/m2m2types/ent/user_delete.go @@ -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. diff --git a/examples/m2m2types/ent/user_update.go b/examples/m2m2types/ent/user_update.go index c582590e7..812bfc2d7 100644 --- a/examples/m2m2types/ent/user_update.go +++ b/examples/m2m2types/ent/user_update.go @@ -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. diff --git a/examples/m2mbidi/ent/user_create.go b/examples/m2mbidi/ent/user_create.go index 290a5dee5..1f4bf0fbd 100644 --- a/examples/m2mbidi/ent/user_create.go +++ b/examples/m2mbidi/ent/user_create.go @@ -57,7 +57,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. diff --git a/examples/m2mbidi/ent/user_delete.go b/examples/m2mbidi/ent/user_delete.go index dd9e0e722..7591d5eb6 100644 --- a/examples/m2mbidi/ent/user_delete.go +++ b/examples/m2mbidi/ent/user_delete.go @@ -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. diff --git a/examples/m2mbidi/ent/user_update.go b/examples/m2mbidi/ent/user_update.go index 236f371ea..7189db6fc 100644 --- a/examples/m2mbidi/ent/user_update.go +++ b/examples/m2mbidi/ent/user_update.go @@ -93,7 +93,7 @@ func (uu *UserUpdate) RemoveFriends(u ...*User) *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. @@ -276,7 +276,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. diff --git a/examples/m2mrecur/ent/user_create.go b/examples/m2mrecur/ent/user_create.go index 8c7ae5d3a..9fdcd9131 100644 --- a/examples/m2mrecur/ent/user_create.go +++ b/examples/m2mrecur/ent/user_create.go @@ -72,7 +72,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. diff --git a/examples/m2mrecur/ent/user_delete.go b/examples/m2mrecur/ent/user_delete.go index f330ebf5e..004c0c8db 100644 --- a/examples/m2mrecur/ent/user_delete.go +++ b/examples/m2mrecur/ent/user_delete.go @@ -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. diff --git a/examples/m2mrecur/ent/user_update.go b/examples/m2mrecur/ent/user_update.go index b743079b0..79b1c167a 100644 --- a/examples/m2mrecur/ent/user_update.go +++ b/examples/m2mrecur/ent/user_update.go @@ -129,7 +129,7 @@ func (uu *UserUpdate) RemoveFollowing(u ...*User) *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. @@ -393,7 +393,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. diff --git a/examples/migration/ent/card_create.go b/examples/migration/ent/card_create.go index 94c7f895e..6c0919698 100644 --- a/examples/migration/ent/card_create.go +++ b/examples/migration/ent/card_create.go @@ -51,7 +51,7 @@ func (cc *CardCreate) Mutation() *CardMutation { // Save creates the Card in the database. func (cc *CardCreate) Save(ctx context.Context) (*Card, error) { cc.defaults() - return withHooks[*Card, CardMutation](ctx, cc.sqlSave, cc.mutation, cc.hooks) + return withHooks(ctx, cc.sqlSave, cc.mutation, cc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/examples/migration/ent/card_delete.go b/examples/migration/ent/card_delete.go index fc8890c8a..b83ce6ac1 100644 --- a/examples/migration/ent/card_delete.go +++ b/examples/migration/ent/card_delete.go @@ -31,7 +31,7 @@ func (cd *CardDelete) Where(ps ...predicate.Card) *CardDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (cd *CardDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, CardMutation](ctx, cd.sqlExec, cd.mutation, cd.hooks) + return withHooks(ctx, cd.sqlExec, cd.mutation, cd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/examples/migration/ent/card_update.go b/examples/migration/ent/card_update.go index fae6b41ae..6e06fa671 100644 --- a/examples/migration/ent/card_update.go +++ b/examples/migration/ent/card_update.go @@ -64,7 +64,7 @@ func (cu *CardUpdate) ClearOwner() *CardUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (cu *CardUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, CardMutation](ctx, cu.sqlSave, cu.mutation, cu.hooks) + return withHooks(ctx, cu.sqlSave, cu.mutation, cu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -203,7 +203,7 @@ func (cuo *CardUpdateOne) Select(field string, fields ...string) *CardUpdateOne // Save executes the query and returns the updated Card entity. func (cuo *CardUpdateOne) Save(ctx context.Context) (*Card, error) { - return withHooks[*Card, CardMutation](ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) + return withHooks(ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/examples/migration/ent/pet_create.go b/examples/migration/ent/pet_create.go index e4edb64cf..85fc2713c 100644 --- a/examples/migration/ent/pet_create.go +++ b/examples/migration/ent/pet_create.go @@ -77,7 +77,7 @@ func (pc *PetCreate) Mutation() *PetMutation { // Save creates the Pet in the database. func (pc *PetCreate) Save(ctx context.Context) (*Pet, error) { pc.defaults() - return withHooks[*Pet, PetMutation](ctx, pc.sqlSave, pc.mutation, pc.hooks) + return withHooks(ctx, pc.sqlSave, pc.mutation, pc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/examples/migration/ent/pet_delete.go b/examples/migration/ent/pet_delete.go index 8043da8b8..81e9d76e1 100644 --- a/examples/migration/ent/pet_delete.go +++ b/examples/migration/ent/pet_delete.go @@ -31,7 +31,7 @@ func (pd *PetDelete) Where(ps ...predicate.Pet) *PetDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (pd *PetDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pd.sqlExec, pd.mutation, pd.hooks) + return withHooks(ctx, pd.sqlExec, pd.mutation, pd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/examples/migration/ent/pet_update.go b/examples/migration/ent/pet_update.go index 909da5fd3..20b639326 100644 --- a/examples/migration/ent/pet_update.go +++ b/examples/migration/ent/pet_update.go @@ -82,7 +82,7 @@ func (pu *PetUpdate) ClearOwner() *PetUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (pu *PetUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pu.sqlSave, pu.mutation, pu.hooks) + return withHooks(ctx, pu.sqlSave, pu.mutation, pu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -270,7 +270,7 @@ func (puo *PetUpdateOne) Select(field string, fields ...string) *PetUpdateOne { // Save executes the query and returns the updated Pet entity. func (puo *PetUpdateOne) Save(ctx context.Context) (*Pet, error) { - return withHooks[*Pet, PetMutation](ctx, puo.sqlSave, puo.mutation, puo.hooks) + return withHooks(ctx, puo.sqlSave, puo.mutation, puo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/examples/migration/ent/user_create.go b/examples/migration/ent/user_create.go index 7a390ad17..c0f4eb048 100644 --- a/examples/migration/ent/user_create.go +++ b/examples/migration/ent/user_create.go @@ -64,7 +64,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. diff --git a/examples/migration/ent/user_delete.go b/examples/migration/ent/user_delete.go index b089b6bf3..31e234ddf 100644 --- a/examples/migration/ent/user_delete.go +++ b/examples/migration/ent/user_delete.go @@ -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. diff --git a/examples/migration/ent/user_update.go b/examples/migration/ent/user_update.go index 77f640c1c..00c2a4210 100644 --- a/examples/migration/ent/user_update.go +++ b/examples/migration/ent/user_update.go @@ -113,7 +113,7 @@ func (uu *UserUpdate) RemoveCards(c ...*Card) *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. @@ -325,7 +325,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. diff --git a/examples/o2m2types/ent/pet_create.go b/examples/o2m2types/ent/pet_create.go index 6ad421b21..db77aa2b3 100644 --- a/examples/o2m2types/ent/pet_create.go +++ b/examples/o2m2types/ent/pet_create.go @@ -56,7 +56,7 @@ func (pc *PetCreate) Mutation() *PetMutation { // Save creates the Pet in the database. func (pc *PetCreate) Save(ctx context.Context) (*Pet, error) { - return withHooks[*Pet, PetMutation](ctx, pc.sqlSave, pc.mutation, pc.hooks) + return withHooks(ctx, pc.sqlSave, pc.mutation, pc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/examples/o2m2types/ent/pet_delete.go b/examples/o2m2types/ent/pet_delete.go index 594cdfe48..149ab3fe3 100644 --- a/examples/o2m2types/ent/pet_delete.go +++ b/examples/o2m2types/ent/pet_delete.go @@ -31,7 +31,7 @@ func (pd *PetDelete) Where(ps ...predicate.Pet) *PetDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (pd *PetDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pd.sqlExec, pd.mutation, pd.hooks) + return withHooks(ctx, pd.sqlExec, pd.mutation, pd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/examples/o2m2types/ent/pet_update.go b/examples/o2m2types/ent/pet_update.go index aa6a302fc..10ee3573b 100644 --- a/examples/o2m2types/ent/pet_update.go +++ b/examples/o2m2types/ent/pet_update.go @@ -70,7 +70,7 @@ func (pu *PetUpdate) ClearOwner() *PetUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (pu *PetUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pu.sqlSave, pu.mutation, pu.hooks) + return withHooks(ctx, pu.sqlSave, pu.mutation, pu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -207,7 +207,7 @@ func (puo *PetUpdateOne) Select(field string, fields ...string) *PetUpdateOne { // Save executes the query and returns the updated Pet entity. func (puo *PetUpdateOne) Save(ctx context.Context) (*Pet, error) { - return withHooks[*Pet, PetMutation](ctx, puo.sqlSave, puo.mutation, puo.hooks) + return withHooks(ctx, puo.sqlSave, puo.mutation, puo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/examples/o2m2types/ent/user_create.go b/examples/o2m2types/ent/user_create.go index 5c0524c97..62f217299 100644 --- a/examples/o2m2types/ent/user_create.go +++ b/examples/o2m2types/ent/user_create.go @@ -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. diff --git a/examples/o2m2types/ent/user_delete.go b/examples/o2m2types/ent/user_delete.go index 5e9f521d8..45581ca10 100644 --- a/examples/o2m2types/ent/user_delete.go +++ b/examples/o2m2types/ent/user_delete.go @@ -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. diff --git a/examples/o2m2types/ent/user_update.go b/examples/o2m2types/ent/user_update.go index 3bf311e9c..818452dab 100644 --- a/examples/o2m2types/ent/user_update.go +++ b/examples/o2m2types/ent/user_update.go @@ -94,7 +94,7 @@ func (uu *UserUpdate) RemovePets(p ...*Pet) *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. diff --git a/examples/o2mrecur/ent/node_create.go b/examples/o2mrecur/ent/node_create.go index 0f8c160b1..40da02320 100644 --- a/examples/o2mrecur/ent/node_create.go +++ b/examples/o2mrecur/ent/node_create.go @@ -70,7 +70,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. diff --git a/examples/o2mrecur/ent/node_delete.go b/examples/o2mrecur/ent/node_delete.go index 409f3ef6e..0f9b91a1b 100644 --- a/examples/o2mrecur/ent/node_delete.go +++ b/examples/o2mrecur/ent/node_delete.go @@ -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. diff --git a/examples/o2mrecur/ent/node_update.go b/examples/o2mrecur/ent/node_update.go index dc004e68f..f493b17c1 100644 --- a/examples/o2mrecur/ent/node_update.go +++ b/examples/o2mrecur/ent/node_update.go @@ -118,7 +118,7 @@ func (nu *NodeUpdate) RemoveChildren(n ...*Node) *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. @@ -352,7 +352,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. diff --git a/examples/o2o2types/ent/card_create.go b/examples/o2o2types/ent/card_create.go index 087a0caf4..01ac3a6f2 100644 --- a/examples/o2o2types/ent/card_create.go +++ b/examples/o2o2types/ent/card_create.go @@ -55,7 +55,7 @@ func (cc *CardCreate) Mutation() *CardMutation { // Save creates the Card in the database. func (cc *CardCreate) Save(ctx context.Context) (*Card, error) { - return withHooks[*Card, CardMutation](ctx, cc.sqlSave, cc.mutation, cc.hooks) + return withHooks(ctx, cc.sqlSave, cc.mutation, cc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/examples/o2o2types/ent/card_delete.go b/examples/o2o2types/ent/card_delete.go index e3b584f3a..69e04b68c 100644 --- a/examples/o2o2types/ent/card_delete.go +++ b/examples/o2o2types/ent/card_delete.go @@ -31,7 +31,7 @@ func (cd *CardDelete) Where(ps ...predicate.Card) *CardDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (cd *CardDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, CardMutation](ctx, cd.sqlExec, cd.mutation, cd.hooks) + return withHooks(ctx, cd.sqlExec, cd.mutation, cd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/examples/o2o2types/ent/card_update.go b/examples/o2o2types/ent/card_update.go index 20d037df2..124efeb77 100644 --- a/examples/o2o2types/ent/card_update.go +++ b/examples/o2o2types/ent/card_update.go @@ -69,7 +69,7 @@ func (cu *CardUpdate) ClearOwner() *CardUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (cu *CardUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, CardMutation](ctx, cu.sqlSave, cu.mutation, cu.hooks) + return withHooks(ctx, cu.sqlSave, cu.mutation, cu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -218,7 +218,7 @@ func (cuo *CardUpdateOne) Select(field string, fields ...string) *CardUpdateOne // Save executes the query and returns the updated Card entity. func (cuo *CardUpdateOne) Save(ctx context.Context) (*Card, error) { - return withHooks[*Card, CardMutation](ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) + return withHooks(ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/examples/o2o2types/ent/user_create.go b/examples/o2o2types/ent/user_create.go index f24f16d0c..4a0a65b18 100644 --- a/examples/o2o2types/ent/user_create.go +++ b/examples/o2o2types/ent/user_create.go @@ -62,7 +62,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. diff --git a/examples/o2o2types/ent/user_delete.go b/examples/o2o2types/ent/user_delete.go index 76fe22acd..c0fe8cf73 100644 --- a/examples/o2o2types/ent/user_delete.go +++ b/examples/o2o2types/ent/user_delete.go @@ -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. diff --git a/examples/o2o2types/ent/user_update.go b/examples/o2o2types/ent/user_update.go index 70c3d4bf6..37586f5d5 100644 --- a/examples/o2o2types/ent/user_update.go +++ b/examples/o2o2types/ent/user_update.go @@ -83,7 +83,7 @@ func (uu *UserUpdate) ClearCard() *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. @@ -239,7 +239,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. diff --git a/examples/o2obidi/ent/user_create.go b/examples/o2obidi/ent/user_create.go index 1b4af3623..5dd0febce 100644 --- a/examples/o2obidi/ent/user_create.go +++ b/examples/o2obidi/ent/user_create.go @@ -61,7 +61,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. diff --git a/examples/o2obidi/ent/user_delete.go b/examples/o2obidi/ent/user_delete.go index d5ae3b98a..5cd7dbc94 100644 --- a/examples/o2obidi/ent/user_delete.go +++ b/examples/o2obidi/ent/user_delete.go @@ -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. diff --git a/examples/o2obidi/ent/user_update.go b/examples/o2obidi/ent/user_update.go index b4543cf16..c00037465 100644 --- a/examples/o2obidi/ent/user_update.go +++ b/examples/o2obidi/ent/user_update.go @@ -82,7 +82,7 @@ func (uu *UserUpdate) ClearSpouse() *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. @@ -238,7 +238,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. diff --git a/examples/o2orecur/ent/node_create.go b/examples/o2orecur/ent/node_create.go index 8a1ea085b..97a39bcff 100644 --- a/examples/o2orecur/ent/node_create.go +++ b/examples/o2orecur/ent/node_create.go @@ -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. diff --git a/examples/o2orecur/ent/node_delete.go b/examples/o2orecur/ent/node_delete.go index 707e46264..373ba4b59 100644 --- a/examples/o2orecur/ent/node_delete.go +++ b/examples/o2orecur/ent/node_delete.go @@ -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. diff --git a/examples/o2orecur/ent/node_update.go b/examples/o2orecur/ent/node_update.go index 8b2e2b14e..87476a546 100644 --- a/examples/o2orecur/ent/node_update.go +++ b/examples/o2orecur/ent/node_update.go @@ -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. diff --git a/examples/privacyadmin/ent/user_create.go b/examples/privacyadmin/ent/user_create.go index a2c02d5aa..e917a6e07 100644 --- a/examples/privacyadmin/ent/user_create.go +++ b/examples/privacyadmin/ent/user_create.go @@ -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. diff --git a/examples/privacyadmin/ent/user_delete.go b/examples/privacyadmin/ent/user_delete.go index 51846d8ca..468d03424 100644 --- a/examples/privacyadmin/ent/user_delete.go +++ b/examples/privacyadmin/ent/user_delete.go @@ -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. diff --git a/examples/privacyadmin/ent/user_update.go b/examples/privacyadmin/ent/user_update.go index 5ca972a73..775b6f0d6 100644 --- a/examples/privacyadmin/ent/user_update.go +++ b/examples/privacyadmin/ent/user_update.go @@ -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. diff --git a/examples/privacytenant/ent/group_create.go b/examples/privacytenant/ent/group_create.go index 5b2f5de54..7dcfb936a 100644 --- a/examples/privacytenant/ent/group_create.go +++ b/examples/privacytenant/ent/group_create.go @@ -75,7 +75,7 @@ func (gc *GroupCreate) Save(ctx context.Context) (*Group, error) { if err := gc.defaults(); err != nil { return nil, err } - 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. diff --git a/examples/privacytenant/ent/group_delete.go b/examples/privacytenant/ent/group_delete.go index ea1e52c97..461c7f4b8 100644 --- a/examples/privacytenant/ent/group_delete.go +++ b/examples/privacytenant/ent/group_delete.go @@ -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. diff --git a/examples/privacytenant/ent/group_update.go b/examples/privacytenant/ent/group_update.go index 85c5f3fc2..ff407fc6d 100644 --- a/examples/privacytenant/ent/group_update.go +++ b/examples/privacytenant/ent/group_update.go @@ -89,7 +89,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. @@ -272,7 +272,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. diff --git a/examples/privacytenant/ent/tenant_create.go b/examples/privacytenant/ent/tenant_create.go index 706e82883..8a57ce2d6 100644 --- a/examples/privacytenant/ent/tenant_create.go +++ b/examples/privacytenant/ent/tenant_create.go @@ -36,7 +36,7 @@ func (tc *TenantCreate) Mutation() *TenantMutation { // Save creates the Tenant in the database. func (tc *TenantCreate) Save(ctx context.Context) (*Tenant, error) { - return withHooks[*Tenant, TenantMutation](ctx, tc.sqlSave, tc.mutation, tc.hooks) + return withHooks(ctx, tc.sqlSave, tc.mutation, tc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/examples/privacytenant/ent/tenant_delete.go b/examples/privacytenant/ent/tenant_delete.go index a1637d130..e2f5a2b73 100644 --- a/examples/privacytenant/ent/tenant_delete.go +++ b/examples/privacytenant/ent/tenant_delete.go @@ -31,7 +31,7 @@ func (td *TenantDelete) Where(ps ...predicate.Tenant) *TenantDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (td *TenantDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, TenantMutation](ctx, td.sqlExec, td.mutation, td.hooks) + return withHooks(ctx, td.sqlExec, td.mutation, td.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/examples/privacytenant/ent/tenant_update.go b/examples/privacytenant/ent/tenant_update.go index 0250b1d9b..31b7a2f6e 100644 --- a/examples/privacytenant/ent/tenant_update.go +++ b/examples/privacytenant/ent/tenant_update.go @@ -44,7 +44,7 @@ func (tu *TenantUpdate) Mutation() *TenantMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (tu *TenantUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, TenantMutation](ctx, tu.sqlSave, tu.mutation, tu.hooks) + return withHooks(ctx, tu.sqlSave, tu.mutation, tu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -140,7 +140,7 @@ func (tuo *TenantUpdateOne) Select(field string, fields ...string) *TenantUpdate // Save executes the query and returns the updated Tenant entity. func (tuo *TenantUpdateOne) Save(ctx context.Context) (*Tenant, error) { - return withHooks[*Tenant, TenantMutation](ctx, tuo.sqlSave, tuo.mutation, tuo.hooks) + return withHooks(ctx, tuo.sqlSave, tuo.mutation, tuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/examples/privacytenant/ent/user_create.go b/examples/privacytenant/ent/user_create.go index ee38f54e2..0a13b3567 100644 --- a/examples/privacytenant/ent/user_create.go +++ b/examples/privacytenant/ent/user_create.go @@ -81,7 +81,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. diff --git a/examples/privacytenant/ent/user_delete.go b/examples/privacytenant/ent/user_delete.go index b4ae09630..3d770940d 100644 --- a/examples/privacytenant/ent/user_delete.go +++ b/examples/privacytenant/ent/user_delete.go @@ -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. diff --git a/examples/privacytenant/ent/user_update.go b/examples/privacytenant/ent/user_update.go index b6756e96d..33fc293b4 100644 --- a/examples/privacytenant/ent/user_update.go +++ b/examples/privacytenant/ent/user_update.go @@ -108,7 +108,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. @@ -320,7 +320,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. diff --git a/examples/start/ent/car_create.go b/examples/start/ent/car_create.go index 9125e88bb..1d723f0cc 100644 --- a/examples/start/ent/car_create.go +++ b/examples/start/ent/car_create.go @@ -63,7 +63,7 @@ func (cc *CarCreate) Mutation() *CarMutation { // Save creates the Car in the database. func (cc *CarCreate) Save(ctx context.Context) (*Car, error) { - return withHooks[*Car, CarMutation](ctx, cc.sqlSave, cc.mutation, cc.hooks) + return withHooks(ctx, cc.sqlSave, cc.mutation, cc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/examples/start/ent/car_delete.go b/examples/start/ent/car_delete.go index 4acbd1ea0..aac240f37 100644 --- a/examples/start/ent/car_delete.go +++ b/examples/start/ent/car_delete.go @@ -31,7 +31,7 @@ func (cd *CarDelete) Where(ps ...predicate.Car) *CarDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (cd *CarDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, CarMutation](ctx, cd.sqlExec, cd.mutation, cd.hooks) + return withHooks(ctx, cd.sqlExec, cd.mutation, cd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/examples/start/ent/car_update.go b/examples/start/ent/car_update.go index 41c7713db..d13b97e5a 100644 --- a/examples/start/ent/car_update.go +++ b/examples/start/ent/car_update.go @@ -77,7 +77,7 @@ func (cu *CarUpdate) ClearOwner() *CarUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (cu *CarUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, CarMutation](ctx, cu.sqlSave, cu.mutation, cu.hooks) + return withHooks(ctx, cu.sqlSave, cu.mutation, cu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -223,7 +223,7 @@ func (cuo *CarUpdateOne) Select(field string, fields ...string) *CarUpdateOne { // Save executes the query and returns the updated Car entity. func (cuo *CarUpdateOne) Save(ctx context.Context) (*Car, error) { - return withHooks[*Car, CarMutation](ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) + return withHooks(ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/examples/start/ent/group_create.go b/examples/start/ent/group_create.go index 709a94750..b4fc1b05c 100644 --- a/examples/start/ent/group_create.go +++ b/examples/start/ent/group_create.go @@ -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. diff --git a/examples/start/ent/group_delete.go b/examples/start/ent/group_delete.go index d1852a2d1..366133711 100644 --- a/examples/start/ent/group_delete.go +++ b/examples/start/ent/group_delete.go @@ -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. diff --git a/examples/start/ent/group_update.go b/examples/start/ent/group_update.go index 0a6a09449..3ccede2fa 100644 --- a/examples/start/ent/group_update.go +++ b/examples/start/ent/group_update.go @@ -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. @@ -258,7 +258,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. diff --git a/examples/start/ent/user_create.go b/examples/start/ent/user_create.go index 385e470cb..f1110d609 100644 --- a/examples/start/ent/user_create.go +++ b/examples/start/ent/user_create.go @@ -83,7 +83,7 @@ func (uc *UserCreate) Mutation() *UserMutation { // Save creates the User in the database. func (uc *UserCreate) Save(ctx context.Context) (*User, error) { uc.defaults() - 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. diff --git a/examples/start/ent/user_delete.go b/examples/start/ent/user_delete.go index abed42d88..42ce3070b 100644 --- a/examples/start/ent/user_delete.go +++ b/examples/start/ent/user_delete.go @@ -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. diff --git a/examples/start/ent/user_update.go b/examples/start/ent/user_update.go index 9106920ab..285fe45f5 100644 --- a/examples/start/ent/user_update.go +++ b/examples/start/ent/user_update.go @@ -139,7 +139,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. @@ -424,7 +424,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. diff --git a/examples/traversal/ent/group_create.go b/examples/traversal/ent/group_create.go index eca0b0842..c4bc86eff 100644 --- a/examples/traversal/ent/group_create.go +++ b/examples/traversal/ent/group_create.go @@ -71,7 +71,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. diff --git a/examples/traversal/ent/group_delete.go b/examples/traversal/ent/group_delete.go index f86f6ef58..6ba7649af 100644 --- a/examples/traversal/ent/group_delete.go +++ b/examples/traversal/ent/group_delete.go @@ -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. diff --git a/examples/traversal/ent/group_update.go b/examples/traversal/ent/group_update.go index b7b8498f5..6c4de1204 100644 --- a/examples/traversal/ent/group_update.go +++ b/examples/traversal/ent/group_update.go @@ -106,7 +106,7 @@ func (gu *GroupUpdate) ClearAdmin() *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. @@ -324,7 +324,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. diff --git a/examples/traversal/ent/pet_create.go b/examples/traversal/ent/pet_create.go index d6c3d0d1d..9f7789b79 100644 --- a/examples/traversal/ent/pet_create.go +++ b/examples/traversal/ent/pet_create.go @@ -71,7 +71,7 @@ func (pc *PetCreate) Mutation() *PetMutation { // Save creates the Pet in the database. func (pc *PetCreate) Save(ctx context.Context) (*Pet, error) { - return withHooks[*Pet, PetMutation](ctx, pc.sqlSave, pc.mutation, pc.hooks) + return withHooks(ctx, pc.sqlSave, pc.mutation, pc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/examples/traversal/ent/pet_delete.go b/examples/traversal/ent/pet_delete.go index 8962894da..e055e5070 100644 --- a/examples/traversal/ent/pet_delete.go +++ b/examples/traversal/ent/pet_delete.go @@ -31,7 +31,7 @@ func (pd *PetDelete) Where(ps ...predicate.Pet) *PetDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (pd *PetDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pd.sqlExec, pd.mutation, pd.hooks) + return withHooks(ctx, pd.sqlExec, pd.mutation, pd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/examples/traversal/ent/pet_update.go b/examples/traversal/ent/pet_update.go index 9b4d2d9ab..959ff91cf 100644 --- a/examples/traversal/ent/pet_update.go +++ b/examples/traversal/ent/pet_update.go @@ -106,7 +106,7 @@ func (pu *PetUpdate) ClearOwner() *PetUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (pu *PetUpdate) Save(ctx context.Context) (int, error) { - return withHooks[int, PetMutation](ctx, pu.sqlSave, pu.mutation, pu.hooks) + return withHooks(ctx, pu.sqlSave, pu.mutation, pu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -324,7 +324,7 @@ func (puo *PetUpdateOne) Select(field string, fields ...string) *PetUpdateOne { // Save executes the query and returns the updated Pet entity. func (puo *PetUpdateOne) Save(ctx context.Context) (*Pet, error) { - return withHooks[*Pet, PetMutation](ctx, puo.sqlSave, puo.mutation, puo.hooks) + return withHooks(ctx, puo.sqlSave, puo.mutation, puo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/examples/traversal/ent/user_create.go b/examples/traversal/ent/user_create.go index 4a05464c6..2bc9f9100 100644 --- a/examples/traversal/ent/user_create.go +++ b/examples/traversal/ent/user_create.go @@ -104,7 +104,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. diff --git a/examples/traversal/ent/user_delete.go b/examples/traversal/ent/user_delete.go index 0b75b9b6b..f2bb52f27 100644 --- a/examples/traversal/ent/user_delete.go +++ b/examples/traversal/ent/user_delete.go @@ -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. diff --git a/examples/traversal/ent/user_update.go b/examples/traversal/ent/user_update.go index fb1f0d93e..99ca27bf9 100644 --- a/examples/traversal/ent/user_update.go +++ b/examples/traversal/ent/user_update.go @@ -203,7 +203,7 @@ func (uu *UserUpdate) RemoveManage(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. @@ -629,7 +629,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. diff --git a/examples/version/ent/user_create.go b/examples/version/ent/user_create.go index f29e98da0..8664f1a55 100644 --- a/examples/version/ent/user_create.go +++ b/examples/version/ent/user_create.go @@ -51,7 +51,7 @@ func (uc *UserCreate) Mutation() *UserMutation { // Save creates the User in the database. func (uc *UserCreate) Save(ctx context.Context) (*User, error) { uc.defaults() - 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. diff --git a/examples/version/ent/user_delete.go b/examples/version/ent/user_delete.go index 02f6fcb09..ff5e42952 100644 --- a/examples/version/ent/user_delete.go +++ b/examples/version/ent/user_delete.go @@ -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. diff --git a/examples/version/ent/user_update.go b/examples/version/ent/user_update.go index a605b4c98..587c6af17 100644 --- a/examples/version/ent/user_update.go +++ b/examples/version/ent/user_update.go @@ -65,7 +65,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. @@ -188,7 +188,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.