From cc89a4f1d88a8a3bcf2c4ec2dd078d074499ac4e Mon Sep 17 00:00:00 2001 From: syt0r Date: Sun, 28 Jan 2024 19:35:23 +0200 Subject: [PATCH] Replace sqlite queries that were using iif functions with backward compatible CASE statement --- .../ua/syt0r/kanji/core/user_data/db/Practice.sq | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/commonMain/sqldelight_user_data/ua/syt0r/kanji/core/user_data/db/Practice.sq b/core/src/commonMain/sqldelight_user_data/ua/syt0r/kanji/core/user_data/db/Practice.sq index dbf54a38..7b65830f 100644 --- a/core/src/commonMain/sqldelight_user_data/ua/syt0r/kanji/core/user_data/db/Practice.sq +++ b/core/src/commonMain/sqldelight_user_data/ua/syt0r/kanji/core/user_data/db/Practice.sq @@ -169,7 +169,7 @@ SELECT COUNT(*) FROM writing_review; getTotalWritingReviewsDuration: -SELECT SUM(IIF(duration > :reviewDurationLimit, :reviewDurationLimit, duration)) +SELECT SUM(CASE WHEN duration > :reviewDurationLimit THEN :reviewDurationLimit ELSE duration END) FROM writing_review; getTotalReadingReviewsCount: @@ -177,7 +177,7 @@ SELECT COUNT(*) FROM reading_review; getTotalReadingReviewsDuration: -SELECT SUM(IIF(duration > :reviewDurationLimit, :reviewDurationLimit, duration)) +SELECT SUM(CASE WHEN duration > :reviewDurationLimit THEN :reviewDurationLimit ELSE duration END) FROM reading_review; getTotalUniqueReviewedCharactersCount: