Skip to content

Commit

Permalink
[Feature] Order queries by date descending instead of ID ascending
Browse files Browse the repository at this point in the history
  • Loading branch information
levinmr committed Dec 20, 2024
1 parent b1e9e9a commit fabdaa4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);
Expand Down Expand Up @@ -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)
);
Expand Down

0 comments on commit fabdaa4

Please sign in to comment.