You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
database: Use SQL ordering in calculate_default_version() (#12273)
Replace Rust-side sorting with database-level ORDER BY clause to improve
performance. Instead of loading all versions and using `max()` on the
Rust side, the query now:
1. Orders by `yanked` (non-yanked first)
2. Orders by prerelease status using `jsonb_typeof(semver_ord[3])`
3. Orders by `semver_ord` descending
4. Orders by `id` descending as tiebreaker
This matches the existing `Version::ord_tuple()` logic while being more
efficient by retrieving only the default version from the database.
0 commit comments