refactor(db): Handle the addition from SQL directly instead from code

This commit is contained in:
Ahmad Ansori Palembani 2024-11-29 08:06:36 +07:00
parent 39428f8c79
commit 97eacbbaea
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
6 changed files with 5 additions and 9 deletions

View file

@ -16,7 +16,7 @@ ON CONFLICT(history_chapter_id)
DO UPDATE
SET
history_last_read = :historyLastRead,
history_time_read = :historyTimeRead
history_time_read = ifnull(history_time_read, 0) + :historyTimeRead
WHERE history_chapter_id = history_chapter_id;
selectLastInsertedRowId: