From 4e3da03062e203aecc0366286e79af5ce9a0457a Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Sun, 4 Sep 2022 11:33:13 +0100 Subject: [PATCH] inverting log query to see most recent first --- .../src/main/sqldelight/app/dapk/db/model/EventLogger.sq | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/domains/store/src/main/sqldelight/app/dapk/db/model/EventLogger.sq b/domains/store/src/main/sqldelight/app/dapk/db/model/EventLogger.sq index f900c14..a52ec63 100644 --- a/domains/store/src/main/sqldelight/app/dapk/db/model/EventLogger.sq +++ b/domains/store/src/main/sqldelight/app/dapk/db/model/EventLogger.sq @@ -13,12 +13,14 @@ FROM dbEventLog; selectLatestByLog: SELECT id, tag, content, time(utcEpochSeconds,'unixepoch') FROM dbEventLog -WHERE logParent = ?; +WHERE logParent = ? +ORDER BY utcEpochSeconds DESC; selectLatestByLogFiltered: SELECT id, tag, content, time(utcEpochSeconds,'unixepoch') FROM dbEventLog -WHERE logParent = ? AND tag = ?; +WHERE logParent = ? AND tag = ? +ORDER BY utcEpochSeconds DESC; insert: INSERT INTO dbEventLog(tag, content, utcEpochSeconds, logParent)