feat(database): add a table for post comments

This commit is contained in:
Harsh Shandilya 2023-01-11 03:04:23 +05:30
parent 3e2d32e4c9
commit 1ae0cbb95d
No known key found for this signature in database
7 changed files with 77 additions and 27 deletions

View file

@ -0,0 +1,17 @@
import kotlin.String;
import kotlin.collections.List;
CREATE TABLE IF NOT EXISTS PostComments(
postId TEXT NOT NULL PRIMARY KEY,
commentIds TEXT AS List<String> NOT NULL
);
rememberComments:
INSERT OR REPLACE
INTO PostComments
VALUES ?;
getCommentIds:
SELECT *
FROM PostComments
WHERE postId = ?;