首页 > 数据库技术 > 详细

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

时间:2014-09-23 00:48:44      阅读:453      评论:0      收藏:0      [点我收藏+]

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(三)

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!