API Tweaks: Database.view(), Database.save_many()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Microfiber |
Fix Released
|
High
|
Jason Gerard DeRose |
Bug Description
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.
Related branches
- Jason Gerard DeRose: Approve
-
Diff: 281 lines (+95/-20)2 files modifiedmicrofiber.py (+12/-3)
test_microfiber.py (+83/-17)
Changed in microfiber: | |
status: | In Progress → Fix Committed |
Changed in microfiber: | |
status: | Fix Committed → Fix Released |