forgejo/services/repository
delvh 778ad795fd
Refactor deletion (#28610)
Introduce the new generic deletion methods
- `func DeleteByID[T any](ctx context.Context, id int64) (int64, error)`
- `func DeleteByIDs[T any](ctx context.Context, ids ...int64) error`
- `func Delete[T any](ctx context.Context, opts FindOptions) (int64,
error)`

So, we no longer need any specific deletion method and can just use
the generic ones instead.

Replacement of #28450

Closes #28450

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-12-25 21:25:29 +01:00
..
archiver Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
files Adjust object format interface (#28469) 2023-12-17 11:56:08 +00:00
adopt.go
adopt_test.go
avatar.go
avatar_test.go
branch.go Adjust object format interface (#28469) 2023-12-17 11:56:08 +00:00
cache.go Always enable caches (#28527) 2023-12-19 09:29:05 +00:00
check.go Adjust object format interface (#28469) 2023-12-17 11:56:08 +00:00
collaboration.go
collaboration_test.go
commit.go
create.go Adjust object format interface (#28469) 2023-12-17 11:56:08 +00:00
create_test.go
delete.go
delete_test.go
fork.go
fork_test.go
hooks.go
lfs.go Abstract hash function usage (#28138) 2023-12-13 21:02:00 +00:00
lfs_test.go Remove GetByBean method because sometimes it's danger when query condition parameter is zero and also introduce new generic methods (#28220) 2023-12-07 15:27:36 +08:00
main_test.go
push.go Adjust object format interface (#28469) 2023-12-17 11:56:08 +00:00
repository.go
repository_test.go
review.go
review_test.go
template.go
transfer.go
transfer_test.go