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