Build manga and chapter updates with a lambda and track assigned fields
MangaUpdate and ChapterUpdate are built with a lambda that records which fields were assigned, so an update writes only those fields.
This commit is contained in:
@@ -79,8 +79,7 @@ RETURNING _id;
|
||||
|
||||
update:
|
||||
UPDATE chapters
|
||||
SET manga_id = coalesce(:mangaId, manga_id),
|
||||
read = coalesce(:read, read),
|
||||
SET read = coalesce(:read, read),
|
||||
bookmark = coalesce(:bookmark, bookmark),
|
||||
last_page_read = coalesce(:lastPageRead, last_page_read),
|
||||
date_fetch = coalesce(:dateFetch, date_fetch)
|
||||
|
||||
Reference in New Issue
Block a user