From fabdaa48677dac75c41d3b9b78a99a6f533bdb78 Mon Sep 17 00:00:00 2001 From: Michael Levin Date: Fri, 20 Dec 2024 15:31:33 -0500 Subject: [PATCH] [Feature] Order queries by date descending instead of ID ascending --- src/db.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/db.js b/src/db.js index fc8b1df..5f919e7 100644 --- a/src/db.js +++ b/src/db.js @@ -84,7 +84,7 @@ const queryDomain = ( // pulls from Google Analytics) happens to be in order by visits or total_events, so ordering by // IDs may in practice keep the same ordering as before - but it would be best not to rely on this. // A longer term fix would be to move the total_events and visits fields to their own columns. - .orderBy("id", "asc") + //.orderBy("id", "asc") .limit(limitParam) .offset((pageParam - 1) * limitParam) ); @@ -152,7 +152,7 @@ const query = ({ // pulls from Google Analytics) happens to be in order by visits or total_events, so ordering by // IDs may in practice keep the same ordering as before - but it would be best not to rely on this. // A longer term fix would be to move the total_events and visits fields to their own columns. - .orderBy("id", "asc") + //.orderBy("id", "asc") .limit(limitParam) .offset((pageParam - 1) * limitParam) );