CouchDatabase.execute_view should take an optional extra parameters dictionary
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
desktopcouch |
Fix Released
|
Low
|
Stuart Langridge |
Bug Description
I understand that I can choose a particular key, or range of keys, for a view using index and slice notation. E.g.:
results = db.execute_
all_keys = list(results)
just_one_key = list(results["a key"])
keys_1_to_9 = list(results[
Am I correct in thinking that the above code runs 3 crouch queries with different settings for the key, startkey and endkey parameters?
What about other parameters? How do I ask for things like descending, group and group_level? Or am I using the wrong module if I want to do these things?
-------
The way this should be done is to allow execute_view to take an extra parameters dict which is passed to self.db.view; this params dict can contain, for example, { "descending": True }
Related branches
- Eric Casteleijn (community): Approve
- Nicola Larosa (community): Approve
-
Diff: 53 lines (+28/-2)2 files modifieddesktopcouch/records/server_base.py (+7/-2)
desktopcouch/records/tests/test_server.py (+21/-0)
- Rodrigo Moya (community): Approve
- Eric Casteleijn (community): Approve
-
Diff: 36 lines (+3/-7)2 files modifieddesktopcouch/records/server_base.py (+2/-6)
desktopcouch/records/tests/test_server.py (+1/-1)
Changed in desktopcouch: | |
status: | New → In Progress |
assignee: | nobody → Stuart Langridge (sil) |
Changed in desktopcouch: | |
importance: | Undecided → Low |
Changed in desktopcouch: | |
status: | In Progress → Fix Released |
Not to be unreasonable, but how is this a low priority issue? Being able to pass query options to a view seems relatively essential to me.