support cid:<card id> search
This commit is contained in:
parent
1fe04a29b2
commit
013f879d4e
@ -23,6 +23,7 @@ class Finder(object):
|
||||
deck=self._findDeck,
|
||||
mid=self._findMid,
|
||||
nid=self._findNids,
|
||||
cid=self._findCids,
|
||||
note=self._findModel,
|
||||
prop=self._findProp,
|
||||
rated=self._findRated,
|
||||
@ -335,6 +336,11 @@ select distinct(n.id) from cards c, notes n where c.nid=n.id and """+preds
|
||||
return
|
||||
return "n.id in (%s)" % val
|
||||
|
||||
def _findCids(self, (val, args)):
|
||||
if re.search("[^0-9,]", val):
|
||||
return
|
||||
return "c.id in (%s)" % val
|
||||
|
||||
def _findMid(self, (val, args)):
|
||||
if re.search("[^0-9]", val):
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user