support multiple facts in fid: query

This commit is contained in:
Damien Elmes 2010-11-26 03:25:32 +09:00
parent 367143f4f3
commit d539018137

View file

@ -2327,6 +2327,11 @@ where id = :id""", pending)
try:
int(dec)
token['value'] = token['value'][4:]
except:
try:
for d in dec.split(","):
int(d)
token['value'] = token['value'][4:]
except:
token['value'] = "0"
type = SEARCH_FID
@ -2643,7 +2648,8 @@ select cardId from cardTags where cardTags.tagId in %s""" % ids2str(ids)
fidquery += " intersect "
elif isNeg:
fidquery += "select id from cards except "
fidquery += "select id from cards where factId = %s" % token
fidquery += "select id from cards where factId in (%s)" % token
print fidquery
elif type == SEARCH_CARD:
token = token.replace("*", "%")
ids = self.s.column0("""