fix(db): make paginated database reads always require "order" option (#39017)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
silverwind
2026-08-23 10:18:18 +02:00
committed by GitHub
parent 0bed1232ee
commit 1c16f04bf5
29 changed files with 161 additions and 65 deletions
+4
View File
@@ -74,6 +74,10 @@ type AssignedIssuesOptions struct {
RepoOwnerID int64
}
func (opts *AssignedIssuesOptions) ToOrders() string {
return "id"
}
func (opts *AssignedIssuesOptions) ToConds() builder.Cond {
cond := builder.NewCond()
if opts.AssigneeID != 0 {
+4
View File
@@ -1075,6 +1075,10 @@ type FindCommentsOptions struct {
IsPull optional.Option[bool]
}
func (opts FindCommentsOptions) ToOrders() string {
return "id"
}
// ToConds implements FindOptions interface
func (opts FindCommentsOptions) ToConds() builder.Cond {
cond := builder.NewCond()