nebenmir
nebenmir

Reputation: 891

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

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?

Upvotes: 3

Views: 747

Answers (1)

Dominic Barnes
Dominic Barnes

Reputation: 28429

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.

Upvotes: 1

Related Questions