couchdb 的_all_docs 有没有分页?

2016-05-05 12:38:05 +08:00
 tsuibin

我们可以通过访问_all_docs 或者当前数据库的所有记录条目,如果记录条目太多,_all_docs 是否提供了分页查询的 api ? 比如

 _all_docs?page=1&limit=20 

之类的

http://127.0.0.1:5984/detabase/_all_docs
4497 次点击
所在节点    CouchDB
1 条回复
iugo
2018-10-07 10:22:29 +08:00
可以的.

http://docs.couchdb.org/en/2.2.0/api/database/bulk-api.html 中有这样一句: Refer to the view endpoint documentation for a complete description of the available query parameters and the format of the returned data.

因为 _all_docs 是内置视图的快捷方式, 所以所有视图中的参数与 _all_docs 应该也是管用的.

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/276484

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX