Export to GitHub

couchdb-python - issue #234

Add view server support for ddoc functions


Posted on Apr 14, 2014 by Happy Panda

This patch adds a rough handler for the "ddoc" call to the view server. I only needed the validate_doc_update functionality but went through the relevant Couchdb documentation piece and added all the function handlers that seemed easy to do, i.e. everything that is in the documentation except "views" and "lists". Nevertheless only validate_doc_update has been tested.

IIRC I needed to look up some details in the javascript view server code because the doc was not 100% clear.

This issue is related to issue #84 but also includes other function handlers. It seems to also relate to issue #78, not sure exactly how.

Attachments

Comment #1

Posted on Apr 14, 2014 by Happy Monkey

See issue #146

As for patch it will makes debugging hard due to lack of handling error cases: invalid return values. validate_doc_update function should be able to throw special forbidden and unauthorized exceptions, etc.

Comment #2

Posted on Apr 14, 2014 by Happy Panda

Ah fair enough, in my code I just return the error as a return value instead of as an exception. I hope issue #146 gets resolved soon.

Status: Duplicate

Labels:
Type-Defect Priority-Medium