Anki/rslib/src/storage/card/due_cards.sql
Damien Elmes 2142cdbd24 fix burying in test scheduler
The bury new/review flags are now pulled from each card's home deck,
instead of using a global setting that had not been hooked up. This
unfortunately means we need to fetch the map of all decks up front, as
we need to be able to look up a deck configuration for cards that are
in filtered decks.

Fixes a "card was modified" error caused by cards being buried during
review, when they weren't removed up-front.
2021-05-12 12:00:15 +10:00

19 lines
No EOL
237 B
SQL

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