mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
refactor(chapter): Migrate more queries to SQLDelight
This commit is contained in:
parent
fac21dbab7
commit
1e68e55cf7
14 changed files with 160 additions and 95 deletions
|
@ -32,6 +32,10 @@ AND (
|
|||
:apply_filter = 0 OR S.name IS NULL
|
||||
);
|
||||
|
||||
getChaptersById:
|
||||
SELECT * FROM chapters
|
||||
WHERE _id = :id;
|
||||
|
||||
getChaptersByUrl:
|
||||
SELECT C.*
|
||||
FROM chapters AS C
|
||||
|
@ -43,6 +47,17 @@ AND (
|
|||
:apply_filter = 0 OR S.name IS NULL
|
||||
);
|
||||
|
||||
getChaptersByUrlAndMangaId:
|
||||
SELECT C.*
|
||||
FROM chapters AS C
|
||||
LEFT JOIN scanlators_view AS S
|
||||
ON C.manga_id = S.manga_id
|
||||
AND ifnull(C.scanlator, 'N/A') = ifnull(S.name, '/<INVALID>/') -- I assume if it's N/A it shouldn't be filtered
|
||||
WHERE C.url = :url AND C.manga_id = :manga_id
|
||||
AND (
|
||||
:apply_filter = 0 OR S.name IS NULL
|
||||
);
|
||||
|
||||
getRecents:
|
||||
SELECT
|
||||
M.*,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue