Mercurial > p > roundup > code
diff roundup/backends/indexer_rdbms.py @ 3076:2817a4db901d
Change indexer_common.search() to take a list of nodeids...
...instead of a dictionary (with random keys) from getHits(). This
removes another Python 2.1 incompatility (using dict() and
enumerate()) and removes the need for some code in
indexer_rdbms.find().
| author | Johannes Gijsbers <jlgijsbers@users.sourceforge.net> |
|---|---|
| date | Wed, 05 Jan 2005 22:14:21 +0000 |
| parents | d9b4224f955c |
| children | 6da931530497 |
line wrap: on
line diff
--- a/roundup/backends/indexer_rdbms.py Wed Jan 05 22:10:28 2005 +0000 +++ b/roundup/backends/indexer_rdbms.py Wed Jan 05 22:14:21 2005 +0000 @@ -126,15 +126,7 @@ self.db.cursor.execute(sql, tuple(map(int, r))) - # self.search_index has the results as {some id: identifier} ... - # sigh - r = {} - k = 0 - for c,n,p in self.db.cursor.fetchall(): - key = (str(c), str(n), str(p)) - r[k] = key - k += 1 - return r + return self.db.cursor.fetchall() def save_index(self): # the normal RDBMS backend transaction mechanisms will handle this
