码迷,mamicode.com
首页 > 数据库 > 详细

【MongoDB】The high query operation of MongoDB(三)

时间:2014-09-23 02:47:33      阅读:267      评论:0      收藏:0      [点我收藏+]

标签:mongodb

1, Sort 

Needless to say, mongodb also support to sort data. THe positive one means sorting by asc order and negetive means by desc.

bubuko.com,布布扣

2. Group

The grammar of group:

bubuko.com,布布扣

Description Of Argument:

key: The field need to group 

cond: query condition 

Initial: initialize the counter of group

Redue: generally statistic operation

Finalize: further operation after group, for exampe calcuate the average. 

3.bubuko.com,布布扣

3. Distinct

it‘s the same as the distinct in the relational database.

bubuko.com,布布扣


4. page

The mongodb supports to use skip and limit to query by page.

bubuko.com,布布扣


5. Cursors and Cursor Methods

bubuko.com,布布扣


6. $query/$orderby/$explain

bubuko.com,布布扣


【MongoDB】The high query operation of MongoDB(三)

标签:mongodb

原文地址:http://blog.csdn.net/sxb0841901116/article/details/39484093

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!