简体   繁体   English

如何使用算术运算创建 Cloudant 查询

[英]How to create a Cloudant Query with arithmetic operations

I need to collect documents inside this Cloudant database I have where the sum of two properties equals something else.我需要在我拥有的这个 Cloudant 数据库中收集文档,其中两个属性的总和等于其他值。

In SQL, I would perform some like this在 SQL 中,我会执行一些这样的操作

select * from table where property1 + property2 > 20;

And it would sucessfully bring all results that match this operation.并且它将成功地带来与此操作匹配的所有结果。

How do I perform a similar search comparing the value of two properties in a Cloudant query?如何在 Cloudant 查询中比较两个属性的值来执行类似的搜索?

I don't think mango-style queries provide the functionality to do such arithmetic expressions.我不认为芒果风格的查询提供了执行这种算术表达式的功能。 I suggest taking a look at regular views .我建议看一下常规视图 You might even want to use show functions for updating the constant interactively.您甚至可能希望使用show 函数以交互方式更新常量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM