Mercurial > p > roundup > code
changeset 3618:b31a2e35be80
pysqlite 1.1.6 does not allow to pass a list of tuples to cursor.execute().
according to PEP249, this kind of usage is deprecated:
executemany() should be used instead.
| author | Alexander Smishlajev <a1s@users.sourceforge.net> |
|---|---|
| date | Sat, 06 May 2006 16:19:27 +0000 |
| parents | f12722c7b9ee |
| children | df7bff6f8a2f |
| files | roundup/backends/indexer_rdbms.py |
| diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/roundup/backends/indexer_rdbms.py Thu Apr 27 06:33:18 2006 +0000 +++ b/roundup/backends/indexer_rdbms.py Sat May 06 16:19:27 2006 +0000 @@ -1,4 +1,4 @@ -#$Id: indexer_rdbms.py,v 1.13 2006-04-27 06:33:18 richard Exp $ +#$Id: indexer_rdbms.py,v 1.14 2006-05-06 16:19:27 a1s Exp $ ''' This implements the full-text indexer over two RDBMS tables. The first is a mapping of words to occurance IDs. The second maps the IDs to (Class, propname, itemid) instances. @@ -69,7 +69,7 @@ # for each word, add an entry in the db sql = 'insert into __words (_word, _textid) values (%s, %s)'%(a, a) words = [(word, id) for word in words] - self.db.cursor.execute(sql, words) + self.db.cursor.executemany(sql, words) def find(self, wordlist): '''look up all the words in the wordlist.
