Merge lp:~jderose/microfiber/views into lp:microfiber
Status: | Merged |
---|---|
Merged at revision: | 117 |
Proposed branch: | lp:~jderose/microfiber/views |
Merge into: | lp:microfiber |
Diff against target: |
281 lines (+95/-20) 2 files modified
microfiber.py (+12/-3) test_microfiber.py (+83/-17) |
To merge this branch: | bzr merge lp:~jderose/microfiber/views |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jason Gerard DeRose | Approve | ||
Review via email: mp+113822@code.launchpad.net |
Description of the change
Some misc API changes I grouped up here:
* Database.view() now includes reduce=False by default, which is really how the CouchDB API should work in the first place. For code that only uses a non-reduced view, it sucks for this code to have to know whether there is a reduce function. James and I discussed this a while back, so I'm trying it first in Microfiber, and then will add it to couch.js if we like it.
* Renamed new "non-atomic" Database.bulksave() to Database.
* Renamed original "all-or-nothing" Database.
* Adds experimental id_slice_iter() function to give you all the ids from the rows is a view result, but chunked into groups of 25 (override with size=10 or whatever). This is for certain operations in Dmedia where we need to update a large number of docs, like the new Core.purge_store() method. So the idea is as you go through the view results, you use Database.get_many() to get 25 docs, update them all, and then save them back with Database.
I'm gonna self-approve this as it's blocking other work.