From 4c570785bbfaf920e6675f4d702b5d78b42a7349 Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Thu, 7 Jan 2021 20:10:25 +0100 Subject: [PATCH] Add comment about integer division --- rslib/src/search/sqlwriter.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/rslib/src/search/sqlwriter.rs b/rslib/src/search/sqlwriter.rs index 3a46489b4..a29502d63 100644 --- a/rslib/src/search/sqlwriter.rs +++ b/rslib/src/search/sqlwriter.rs @@ -241,6 +241,7 @@ impl SqlWriter<'_> { let day = days + (timing.days_elapsed as i32); write!( self.sql, + // SQL does integer division if both parameters are integers "(\ (c.queue in ({rev},{daylrn}) and c.due {op} {day}) or \ (c.queue in ({lrn},{previewrepeat}) and ((c.due - {cutoff}) / 86400) {op} {days})\