We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9042015 commit a40a3b6Copy full SHA for a40a3b6
package/src/store/apis/queries/selectMessagesForChannels.ts
@@ -30,17 +30,19 @@ export const selectMessagesForChannels = async (
30
*,
31
ROW_NUMBER() OVER (
32
PARTITION BY cid
33
- ORDER BY cast(strftime('%s', createdAt) AS INTEGER) ASC
+ ORDER BY cast(strftime('%s', createdAt) AS INTEGER) DESC
34
) RowNum
35
FROM messages
36
WHERE cid in (${questionMarks})
37
) a
38
LEFT JOIN
39
users b
40
ON b.id = a.userId
41
- WHERE RowNum < 200`,
+ WHERE RowNum < 200
42
+ ORDER BY cast(strftime('%s', a.createdAt) AS INTEGER) ASC`,
43
cids,
44
);
45
+ console.log(result);
46
47
return result.map((r) => JSON.parse(r.value));
48
};
0 commit comments