Author: tack
Date: Fri Mar 31 18:54:49 2006
New Revision: 1374

Modified:
   trunk/base/src/db.py

Log:
remove "ON CONFLICT REPLACE" clause from index as it was removed from
sqlite as of 3.3.3


Modified: trunk/base/src/db.py
==============================================================================
--- trunk/base/src/db.py        (original)
+++ trunk/base/src/db.py        Fri Mar 31 18:54:49 2006
@@ -27,7 +27,7 @@
         word            TEXT,
         count           INTEGER
     );
-    CREATE UNIQUE INDEX words_idx on WORDS (word) ON CONFLICT REPLACE;
+    CREATE UNIQUE INDEX words_idx on WORDS (word);
 
     CREATE TABLE words_map (
         rank            INTEGER,
@@ -1059,7 +1059,7 @@
         for word, score in words.items():
             if word not in db_words_count:
                 # New word, so insert it now.
-                self._db_query("INSERT INTO words VALUES(NULL, ?, 1)", (word,))
+                self._db_query("INSERT OR REPLACE INTO words VALUES(NULL, ?, 
1)", (word,))
                 db_id, db_count = self._cursor.lastrowid, 1
                 db_words_count[word] = db_id, db_count
             else:


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to