refactor(db): Replace some more StorIO queries with SQLDelight

This commit is contained in:
Ahmad Ansori Palembani 2024-11-24 19:08:42 +07:00
parent e9d22f4dba
commit 4f9e5bfe62
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
8 changed files with 68 additions and 44 deletions

View file

@ -22,6 +22,16 @@ WHERE history_chapter_id = history_chapter_id;
selectLastInsertedRowId:
SELECT last_insert_rowid();
deleteAll:
DELETE FROM history;
getByMangaId:
SELECT history.*
FROM history
JOIN chapters
ON history.history_chapter_id = chapters._id
WHERE chapters.manga_id = :mangaId AND history.history_chapter_id = chapters._id;
getByChapterUrl:
SELECT history.*
FROM history