mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
refactor(db): Migrate last history queries (that can be migrated) to SQLDelight
This commit is contained in:
parent
8cef33d9c6
commit
17b07cd836
5 changed files with 36 additions and 72 deletions
|
@ -45,6 +45,17 @@ WHERE chapters.url = :chapterUrl AND history.history_chapter_id = chapters._id;
|
|||
getTotalReadDuration:
|
||||
SELECT sum(history_time_read) FROM history;
|
||||
|
||||
getPerPeriod:
|
||||
SELECT mangas.*, chapters.*, history.*
|
||||
FROM mangas
|
||||
JOIN chapters
|
||||
ON mangas._id = chapters.manga_id
|
||||
JOIN history
|
||||
ON chapters._id = history.history_chapter_id
|
||||
AND history.history_last_read >= :startDate
|
||||
AND history.history_last_read <= :endDate
|
||||
ORDER BY history.history_last_read DESC;
|
||||
|
||||
getRecentsUngrouped:
|
||||
SELECT
|
||||
M.*,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue