Changes between Version 6 and Version 7 of NoSqlSupport
- 02/03/2011 03:25:46 AM (6 years ago)
v6 v7 154 154 On some DBs it's inefficient to request entities using a large offset (`queryset[5000:...]`). E.g., App Engine's datastore doesn't actually support offsets. When you use an offset the datastore always starts from offset 0 and throws away all results you didn't request (which means you can't ever query e.g. for the 10000th result). Instead of integer offsets App Engine and SimpleDB provide some kind of "bookmark" which marks the query's current position in the result set. You can pass a bookmark to a query to move the cursor to a certain position in the result set and then query efficiently from there. 155 155 156 Django-nonrel doesn't yet support bookmarks. 156 This also affects the pagination in the admin interface. Efficient "pagination" would only provide forward/backward navigation without any page numbering. This would also be a candidate for paginating via AJAX (e.g. like in Twitter). 157 158 Django-nonrel doesn't yet support bookmarks, but the App Engine backend provides a private API for them. 157 159 158 160 = count() = … … 160 162 `Query.count()` is problematic since a scalable `count()` method doesn't exist at least on App Engine. It would be nice to be able to pass an upper limit like `count(100)`, so if there are more than 100 results it will still return just 100. 161 163 164 165 162 166 Django-nonrel's App Engine backend currently just limits the maximum count to 1000. Other backends don't have a `count()` limit.