Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I query views from a couchdb update or validate_doc_update function?

Tags:

couchdb

For validating the update of a document I need the result of a view. That view generates a sum.

Can I query that view from within my validate_doc_update function, so that I can use the view result for validating the document?

like image 921
nebenmir Avatar asked Dec 15 '25 14:12

nebenmir


1 Answers

The short answer is, no you cannot. (at least not yet)

For validation functions, you only have access to the current document, the incoming document and the current user's information. (if available)

Update handlers have access to information about the incoming request as well as the current document.

like image 76
Dominic Barnes Avatar answered Dec 19 '25 06:12

Dominic Barnes



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!