fixed issue 1134, gae dal delete, thanks Howesc

This commit is contained in:
mdipierro
2012-11-01 21:01:46 -05:00
parent a61e388498
commit 8affdbdc86
2 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.2.1 (2012-10-31 11:43:03) stable
Version 2.2.1 (2012-11-01 21:01:40) stable
+6 -3
View File
@@ -4608,11 +4608,14 @@ class GoogleDatastoreAdapter(NoSQLAdapter):
(items, tablename, fields) = self.select_raw(query)
# items can be one item or a query
if not isinstance(items,list):
counter = items.count(limit=None)
leftitems = items.fetch(1000)
#use a keys_only query to ensure that this runs as a datastore
# small operations
leftitems = items.fetch(1000, keys_only=True)
counter = 0
while len(leftitems):
counter += len(leftitems)
gae.delete(leftitems)
leftitems = items.fetch(1000)
leftitems = items.fetch(1000, keys_only=True)
else:
counter = len(items)
gae.delete(items)