CouchDB Mango Query仅获得USD(字段)记录

时间:2019-04-16 09:03:33

标签: couchdb couchdb-mango

我需要查询bedDB以获取美元货币代码的数据。选择器查询应提供货币代码USD和帐户余额。

在下面的json数据currencyData字段描述中。

"currencyData":  { "1400104183USD": 300,  "1500282526INR": 400, "2340282526GBP": 0  }

这里1400104183是帐号,USD是货币代码,值300是帐户余额。

{ "_id": "ID_000000000", "_rev": "45-0ffa69047a93df6fe71656f5a7aa8681", "recordID": "32123", "currencyData": { "1200104183USD": 100, "1300282526INR": 200, "2340282526GBP": 0 }, "status": "ACTIVE", "~version": "3213" }
{ "_id": "ID_000000001", "_rev": "45-0ffa69047a93df6fe71656f5a7aa8681", "recordID": "32123", "currencyData": { "1400104183USD": 300, "1500282526INR": 400, "2340282526GBP": 0 }, "status": "ACTIVE", "~version": "3214" }
{ "_id": "ID_000000002", "_rev": "45-0ffa69047a93df6fe71656f5a7aa8681", "recordID": "32123", "currencyData": { "1600104183USD": 500, "1700282526INR": 600, "2340282526GBP": 0 }, "status": "ACTIVE", "~version": "3215" }

我需要一个选择器查询来过滤数据。不支持CouchDB视图。

0 个答案:

没有答案