From 09d31aabac9faff6e1aedeed11c4b476c56b5447 Mon Sep 17 00:00:00 2001 From: Gisle Aune Date: Fri, 4 Mar 2022 00:27:28 +0100 Subject: [PATCH] maybe fix comment order? --- database/postgres/queries/comments.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/database/postgres/queries/comments.sql b/database/postgres/queries/comments.sql index 2b2c865..ee7880e 100644 --- a/database/postgres/queries/comments.sql +++ b/database/postgres/queries/comments.sql @@ -22,6 +22,7 @@ WHERE id = @id; -- name: SelectComments :many SELECT * FROM story_comment WHERE (@chapter_id = '' OR chapter_id = @chapter_id) +ORDER BY fictional_date, created_date LIMIT NULLIF(@limit_size::INT, 0); -- name: DeleteComment :exec