From 013f879d4e6a5cc503e3650edc97baaf7d818a0b Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 23 Oct 2013 18:57:22 +0900 Subject: [PATCH] support cid: search --- anki/find.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/anki/find.py b/anki/find.py index a07dd304e..dd0d07c0d 100644 --- a/anki/find.py +++ b/anki/find.py @@ -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