Anki/rslib/src/storage/card/due_cards.sql
Damien Elmes 62b23d1bb9 experimental queue building
Still a work in progress, and hidden behind a feature flag.
2021-03-01 12:18:21 +10:00

18 lines
No EOL
229 B
SQL

SELECT queue,
id,
nid,
due,
cast(ivl AS integer),
cast(mod AS integer)
FROM cards
WHERE did = ?1
AND (
(
queue IN (2, 3)
AND due <= ?2
)
OR (
queue IN (1, 4)
AND due <= ?3
)
)