1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Use db.ListOptions directly instead of Paginator interface to make it easier to use and fix performance of /pulls and /issues (#29990)

This PR uses `db.ListOptions` instead of `Paginor` to make the code
simpler.
And it also fixed the performance problem when viewing /pulls or
/issues. Before the counting in fact will also do the search.

---------

Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
Lunny Xiao
2024-03-25 02:51:08 +08:00
committed by GitHub
parent ec3d467f15
commit 3f26fe2fa2
8 changed files with 49 additions and 34 deletions

View File

@@ -106,7 +106,7 @@ type SearchOptions struct {
UpdatedAfterUnix optional.Option[int64]
UpdatedBeforeUnix optional.Option[int64]
db.Paginator
Paginator *db.ListOptions
SortBy SortBy // sort by field
}