charveasna / couchdb-python

Automatically exported from code.google.com/p/couchdb-python
Other
0 stars 0 forks source link

Add view server support for ddoc functions #234

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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.

Original issue reported on code.google.com by balr...@gmail.com on 14 Apr 2014 at 7:21

Attachments:

GoogleCodeExporter commented 8 years ago
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.

Original comment by kxepal on 14 Apr 2014 at 7:33

GoogleCodeExporter commented 8 years ago
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.

Original comment by balr...@gmail.com on 14 Apr 2014 at 7:47