remove obsolote newSpacedCount()

This commit is contained in:
Damien Elmes 2009-06-11 22:49:15 +09:00
parent d2ac7fc13e
commit d67b4b2ed9

View file

@ -733,7 +733,7 @@ and priority in (1,2,3,4) and type in (0, 1)""", time=time)
def deckFinishedMsg(self):
self.resetAfterReviewEarly()
spaceSusp = ""
c= self.newSpacedCount()
c= self.spacedCardCount()
if c:
spaceSusp += ngettext('There is <b>%d delayed</b> new card.',
'There are <b>%d delayed</b> new cards.',
@ -861,6 +861,7 @@ select count(id) from cards where type in (0,1,2) and priority = 0""")
self._dailyStats.newEase4)
def spacedCardCount(self):
"Number of spaced new cards."
return self.s.scalar("""
select count(cards.id) from cards %s where
type = 2 and isDue = 0 and priority in (1,2,3,4) and combinedDue > :now
@ -884,13 +885,6 @@ and due < :now""" % self.forceIndex("ix_cards_priorityDue"), now=time.time())
return self.s.scalar(
"select count(id) from cards where type = 2")
def newSpacedCount(self):
"Cards that are both spaced and new."
return self.s.scalar("""
select count(cards.id) from cards where
type = 2 and isDue = 0 and priority in (1,2,3,4) and combinedDue > :now
and due < :now""", now=time.time())
# Card predicates
##########################################################################