1
0
Fork 0
forgejo/models/repo
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.go Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
attachment.go
attachment_test.go
avatar.go Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00
collaboration.go
collaboration_test.go
fork.go
fork_test.go
git.go
issue.go
language_stats.go Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00
main_test.go
mirror.go
pushmirror.go Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
pushmirror_test.go Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
redirect.go Final round of db.DefaultContext refactor (#27587) 2023-10-14 08:37:24 +00:00
redirect_test.go Final round of db.DefaultContext refactor (#27587) 2023-10-14 08:37:24 +00:00
release.go Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
release_test.go
repo.go Adjust object format interface (#28469) 2023-12-17 11:56:08 +00:00
repo_indexer.go Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00
repo_list.go Restricted users only see repos in orgs which their team was assigned to (#28025) 2023-11-14 15:23:04 +01:00
repo_list_test.go
repo_test.go Refactor SSH clone URL generation code (#28421) 2023-12-15 06:18:12 +00:00
repo_unit.go Even more db.DefaultContext refactor (#27352) 2023-10-03 10:30:41 +00:00
repo_unit_test.go
search.go
star.go
star_test.go
topic.go Add orphaned topic consistency check (#28507) 2023-12-18 15:32:08 +00:00
topic_test.go
update.go
upload.go Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
user_repo.go
user_repo_test.go
watch.go Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
watch_test.go Replace more db.DefaultContext (#27628) 2023-10-15 17:46:06 +02:00
wiki.go
wiki_test.go