mirror of
https://github.com/null2264/yokai.git
synced 2025-06-20 18:24:42 +00:00
refactor(recents): Migrate getRecentChapters to SQLDelight
This commit is contained in:
parent
eb8727afcf
commit
a6ef46a90f
10 changed files with 139 additions and 31 deletions
|
@ -34,7 +34,6 @@ AND (
|
|||
|
||||
getRecents:
|
||||
SELECT
|
||||
M.url AS mangaUrl,
|
||||
M.*,
|
||||
C.*
|
||||
FROM mangas AS M
|
||||
|
@ -54,7 +53,6 @@ LIMIT :limit OFFSET :offset;
|
|||
|
||||
getRecentsUngrouped:
|
||||
SELECT
|
||||
M.url AS mangaUrl,
|
||||
M.*,
|
||||
C.*,
|
||||
H.*
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
import kotlin.Long;
|
||||
|
||||
CREATE TABLE history(
|
||||
history_id INTEGER NOT NULL PRIMARY KEY,
|
||||
history_chapter_id INTEGER NOT NULL UNIQUE,
|
||||
history_last_read INTEGER AS Long,
|
||||
history_time_read INTEGER AS Long,
|
||||
history_last_read INTEGER,
|
||||
history_time_read INTEGER,
|
||||
FOREIGN KEY(history_chapter_id) REFERENCES chapters (_id)
|
||||
ON DELETE CASCADE
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue