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

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
silverwindandwxiaoguang authored and GitHub committed 2026-08-23 08:18:18 +00:00
1 parent 0bed1232ee
commit 1c16f04bf5
29 files changed
+161 -65

No files matched your search

+4
View File
@@ -66,6 +66,10 @@ type FindBlockingOptions struct {
BlockeeID int64
}
func (opts *FindBlockingOptions) ToOrders() string {
return "id"
}
func (opts *FindBlockingOptions) ToConds() builder.Cond {
cond := builder.NewCond()
if opts.BlockerID != 0 {