Version ordering [MOD-551] (#740)

* Version ordering

* cargo sqlx prepare

* Use version ordering for maven

* Use version ordering when sorting versions in Rust (not just SQL)

* Thanks clippy
This commit is contained in:
Jackson Kruger
2023-11-01 11:36:39 -05:00
committed by GitHub
parent d5594b03e3
commit 911d442340
16 changed files with 392 additions and 27 deletions

View File

@@ -100,7 +100,7 @@ pub async fn maven_metadata(
SELECT id, version_number, version_type
FROM versions
WHERE mod_id = $1 AND status = ANY($2)
ORDER BY date_published ASC
ORDER BY ordering ASC NULLS LAST, date_published ASC
",
project.inner.id as database::models::ids::ProjectId,
&*crate::models::projects::VersionStatus::iterator()