diff --git a/.travis.yml b/.travis.yml index aa05f1ca..8cf53e1b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ env: - DB=mysql://root:@localhost/test_w2p - DB=postgres://postgres:@localhost/test_w2p - DB=google:datastore - - DB=google:datastore+ndb +# - DB=google:datastore+ndb - DB=mongodb://mongodb:mongodb@localhost/test_w2p - DB=imap://imap:imap@localhost:993 before_script: @@ -44,8 +44,8 @@ matrix: env: DB=google:datastore - python: '2.6' env: DB=google:datastore - - python: '2.6' - env: DB=google:datastore+ndb +# - python: '2.6' +# env: DB=google:datastore+ndb script: export COVERAGE_PROCESS_START=gluon/tests/coverage.ini; ./web2py.py --run_system_tests --with_coverage diff --git a/VERSION b/VERSION index 6af1ca81..107e99ee 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.9.5-trunk+timestamp.2014.03.31.00.06.17 +Version 2.9.5-trunk+timestamp.2014.03.31.00.18.01 diff --git a/gluon/dal.py b/gluon/dal.py index 6e3072b9..796e7831 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -5223,20 +5223,21 @@ class GoogleDatastoreAdapter(NoSQLAdapter): if args_get('limitby', None): (lmin, lmax) = attributes['limitby'] limit, fetch_args = lmax-lmin, {'offset':lmin,'keys_only':True} - else: - limit, fetch_args = self.MAX_FETCH_LIMIT, {'offset':0,'keys_only':True} - if self.use_ndb: - keys, cursor, more = query.fetch_page(limit,**fetch_args) - items = ndb.get_multi(keys) + if self.use_ndb: + keys, cursor, more = query.fetch_page(limit,**fetch_args) + items = ndb.get_multi(keys) + else: + keys = query.fetch(limit, **fetch_args) + items = gae.get(keys) + cursor = query.cursor() + #cursor is only useful if there was a limit and we didn't return + # all results + if args_get('reusecursor'): + db['_lastcursor'] = cursor else: - keys = query.fetch(limit, **fetch_args) - items = gae.get(keys) - cursor = query.cursor() - #cursor is only useful if there was a limit and we didn't return - # all results - if args_get('reusecursor'): - db['_lastcursor'] = cursor + # if a limit is not specified, always return an iterator + rows = query return (items, tablename, projection or db[tablename].fields)