feat(database): add support for marking posts as read

This commit is contained in:
Harsh Shandilya 2023-08-15 23:43:14 +05:30
parent 1394bc74c4
commit 9c32d6721b
No known key found for this signature in database
4 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,17 @@
CREATE TABLE ReadPosts(
id TEXT NOT NULL PRIMARY KEY
);
markRead:
INSERT OR REPLACE
INTO ReadPosts(id)
VALUES (?);
markUnread:
DELETE FROM ReadPosts
WHERE id = ?;
isRead:
SELECT *
FROM ReadPosts
WHERE id = ?;

View file

@ -0,0 +1,3 @@
CREATE TABLE ReadPosts(
id TEXT NOT NULL PRIMARY KEY
);