order platform versions by semver

Signed-off-by: MiniDigger <admin@minidigger.me>
This commit is contained in:
MiniDigger 2021-03-13 12:01:19 +01:00
parent f4d63a4889
commit 71641fe3f6

View File

@ -35,8 +35,7 @@ public interface PlatformVersionDAO {
@SqlQuery("SELECT platform, (array_agg(version ORDER BY string_to_array(version, '.')::INT[])) versions FROM platform_versions GROUP BY platform")
TreeMap<Platform, List<String>> getVersions();
// TODO lexicographic sorting?
@SqlQuery("SELECT version FROM platform_versions WHERE platform = :platform ORDER BY created_at DESC")
@SqlQuery("SELECT version FROM platform_versions WHERE platform = :platform ORDER BY string_to_array(version, '.')::INT[]")
List<String> getVersionsForPlatform(@EnumByOrdinal Platform platform);
@SqlQuery("SELECT pv.*" +