gae search not fecthed by key to ensure consistency, thanks Luca

This commit is contained in:
mdipierro
2014-03-28 23:51:27 -05:00
parent 13f2aa536e
commit 267cd08af6
3 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ update:
echo "remember that pymysql was tweaked"
src:
### Use semantic versioning
echo 'Version 2.9.5-stable+timestamp.'`date +%Y.%m.%d.%H.%M.%S` > VERSION
echo 'Version 2.9.5-trunk+timestamp.'`date +%Y.%m.%d.%H.%M.%S` > VERSION
### rm -f all junk files
make clean
### clean up baisc apps
+1 -1
View File
@@ -1 +1 @@
Version 2.9.5-stable+timestamp.2014.03.22.02.22.24
Version 2.9.5-trunk+timestamp.2014.03.28.21.24.22
+6 -2
View File
@@ -5212,13 +5212,17 @@ class GoogleDatastoreAdapter(NoSQLAdapter):
else:
order={'-id':'-__key__','id':'__key__'}.get(order,order)
items = items.order(order)
if args_get('limitby', None):
(lmin, lmax) = attributes['limitby']
(limit, offset) = (lmax - lmin, lmin)
if self.use_ndb:
rows, cursor, more = items.fetch_page(limit,offset=offset)
rows, cursor, more = items.fetch_page(limit,offset=offset,keys_only=True)
else:
rows = items.fetch(limit,offset=offset)
rows = items.fetch(limit,offset=offset,keys_only=True)
rows = ndb.get_multi(rows) if self.use_ndb else gae.get(rows)
#cursor is only useful if there was a limit and we didn't return
# all results
if args_get('reusecursor'):