Improve metadata queries
This commit is contained in:
parent
978a8de32c
commit
cf79a406bf
@ -20,13 +20,21 @@ SELECT * FROM search_metadata WHERE manga_id = ?;
|
||||
selectByIndexedExtra:
|
||||
SELECT * FROM search_metadata WHERE indexed_extra = ?;
|
||||
|
||||
upsert:
|
||||
INSERT INTO search_metadata(manga_id, uploader, extra, indexed_extra, extra_version)
|
||||
VALUES (:mangaId, :uploader, :extra, :indexedExtra, :extraVersion)
|
||||
ON CONFLICT(manga_id)
|
||||
DO UPDATE
|
||||
SET
|
||||
uploader = :uploader,
|
||||
extra = :extra,
|
||||
indexed_extra = :indexedExtra,
|
||||
extra_version = :extraVersion
|
||||
WHERE manga_id = :mangaId;
|
||||
|
||||
insert:
|
||||
INSERT INTO search_metadata (manga_id, uploader, extra, indexed_extra, extra_version)
|
||||
VALUES (?, ?, ?, ?, ?);
|
||||
|
||||
insertNew:
|
||||
INSERT INTO search_metadata (manga_id, uploader, extra, indexed_extra, extra_version)
|
||||
VALUES ?;
|
||||
|
||||
deleteAll:
|
||||
DELETE FROM search_metadata;
|
@ -20,10 +20,6 @@ deleteByManga:
|
||||
DELETE FROM search_tags WHERE manga_id = ?;
|
||||
|
||||
insert:
|
||||
INSERT INTO search_tags (_id, manga_id, namespace, name, type)
|
||||
VALUES (?, ?, ?, ?, ?);
|
||||
|
||||
insertNew:
|
||||
INSERT INTO search_tags (manga_id, namespace, name, type)
|
||||
VALUES (?, ?, ?, ?);
|
||||
|
||||
|
@ -18,9 +18,6 @@ deleteByManga:
|
||||
DELETE FROM search_titles WHERE manga_id = ?;
|
||||
|
||||
insert:
|
||||
INSERT INTO search_titles (_id, manga_id, title, type) VALUES (?, ?, ?, ?);
|
||||
|
||||
insertNew:
|
||||
INSERT INTO search_titles (manga_id, title, type) VALUES (?, ?, ?);
|
||||
|
||||
insertItem:
|
||||
|
Loading…
x
Reference in New Issue
Block a user