Chinaunix首页 | 论坛 | 博客
  • 博客访问: 621744
  • 博文数量: 69
  • 博客积分: 1891
  • 博客等级: 上尉
  • 技术积分: 1359
  • 用 户 组: 普通用户
  • 注册时间: 2010-11-20 23:38
文章分类

全部博文(69)

文章存档

2012年(46)

2011年(23)

分类: Python/Ruby

2011-11-20 14:43:02

1、_all_docs
 curl -X GET
  result
{“total_rows”:2,”offset”:0,”rows”:[
{"id":"joelennon","key":"joelennon","value":{"rev":"1-45597617"}},
{"id":"johnsmith","key":"johnsmith","value":{"rev":"2-843046980"}}
]}
 total_rows:number of documents stored in database
 the results are ordered by document ID
  •  order
           curl -X GET 84/contacts/_all_docs?descending=true
  •   limit
           curl -X GET ?descending=true\&limit=1
  •    include docs
          curl -X GET ?include_docs=true

2、 _all_docs_by_seq
 curl -X GET _by_seq
result:
{"total_rows":2,"offset":0,"rows":[
{"id":"johndoe","key":2,"value":{"rev":"2-2789254104","deleted":true}},
{"id":"joelennon","key":5,"value":{"rev":"1-45597617"}},
{"id":"johnsmith","key":7,"value":{"rev":"2-843046980"}}
]}
 This view returns all
documents in the database, including deleted ones, ordered by the last time they were modified
阅读(1385) | 评论(0) | 转发(0) |
0

上一篇:CouchDb basic operation

下一篇:并行编程

给主人留下些什么吧!~~