Entropy/DistributionUGCInterface:

- insert_keywords(): improve query


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2586 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
lxnay
2008-10-28 21:47:54 +00:00
parent 393d9d11b5
commit 5dcac6f53d
+5 -4
View File
@@ -18046,10 +18046,11 @@ class DistributionUGCInterface(RemoteDbSkelInterface):
if not clean_keys:
return
def myiter():
for key in clean_keys:
yield (iddoc, key,)
self.execute_many('INSERT INTO entropy_docs_keywords VALUES (%s,%s)', myiter)
mydata = []
for key in clean_keys:
mydata.append((iddoc, key,))
self.execute_many('INSERT INTO entropy_docs_keywords VALUES (%s,%s)', mydata)
def remove_keywords(self, iddoc):
self.execute_query('DELETE FROM entropy_docs_keywords WHERE `iddoc` = %s',(iddoc,))