我可以通过Couchdb更新或validate_doc_update函数查询视图吗? [英] Can I query views from a couchdb update or validate_doc_update function?

查看:76
本文介绍了我可以通过Couchdb更新或validate_doc_update函数查询视图吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了验证文档的更新,我需要查看结果。该视图产生总和。

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

我可以从validate_doc_update函数中查询该视图,以便可以使用视图结果来验证文档吗?

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

推荐答案

简短的答案是,不,你不能。 (至少还没有)

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.

这篇关于我可以通过Couchdb更新或validate_doc_update函数查询视图吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆