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:
AntsyLich
2026-09-27 22:36:13 +06:00
parent 306befb214
commit f8fff318ba
21 changed files with 155 additions and 172 deletions
@@ -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)