Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

feat: issue order by updated_ts desc by default (#2180)

p0nyfea0dcc6bc16
diff --git a/store/issue.go b/store/issue.go
index 0134a0e29a..0ab2f6fdf0 100644
--- a/store/issue.go
+++ b/store/issue.go
@@ -567,8 +567,9 @@ func (*Store) findIssueImpl(ctx context.Context, tx *sql.Tx, find *api.IssueFind
payload
FROM issue
WHERE ` + strings.Join(where, " AND ")
+ query += " ORDER BY updated_ts DESC"
if v := find.Limit; v != nil {
- query += fmt.Sprintf(" ORDER BY updated_ts DESC LIMIT %d", *v)
+ query += fmt.Sprintf(" LIMIT %d", *v)
}
rows, err := tx.QueryContext(ctx, query, args...)