From f4296321542128163fa38be56c272c008f3d602f Mon Sep 17 00:00:00 2001 From: Keuin Date: Mon, 23 Oct 2023 02:52:42 +0800 Subject: bugfix: query result not ordered --- gradle.properties | 2 +- src/main/java/com/keuin/blame/lookup/QueryExecutor.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 165fd17..1420cce 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ minecraft_version=1.16.5 yarn_mappings=1.16.5+build.10 loader_version=0.14.23 # Mod Properties -mod_version=2.0.2 +mod_version=2.0.3 maven_group=com.keuin.blame archives_base_name=blame-fabric # Dependencies diff --git a/src/main/java/com/keuin/blame/lookup/QueryExecutor.java b/src/main/java/com/keuin/blame/lookup/QueryExecutor.java index e11cdda..6e6bd5c 100644 --- a/src/main/java/com/keuin/blame/lookup/QueryExecutor.java +++ b/src/main/java/com/keuin/blame/lookup/QueryExecutor.java @@ -37,6 +37,7 @@ public class QueryExecutor { if (timeRange > 0) { sql += " and ts>=" + timeRange; } + sql += " order by ts desc"; if (maxCount > 0) { sql += " limit " + maxCount; } -- cgit v1.2.3