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

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

时间:2014-09-22 03:37:02      阅读:255      评论:0      收藏:0      [点我收藏+]

标签:mongodb

In the last blog, there are three query condition to be described. In the blog, we will continue to what we have leant in the last blog. 

1 $mod 

‘$mod‘ operation is able to make us to do simple mod operation, but is no need to use where sentence. 

bubuko.com,布布扣\

2. $ne, $in, $nin

‘$ne’ means not equal. ‘$in‘ is same as key word ‘in‘ in relationship. $nin is opsitive to ‘in‘

bubuko.com,布布扣

3.$or and $nor 

durning the mutiple conditions, then result will be return that it only matches one condition among condition. 

as for $noe, which is in contrast with $no, let‘s learn it from the following the picture. 

bubuko.com,布布扣

4. $size

$size operation will query result whose size is equailvant to size of input.

bubuko.com,布布扣

5. $where 

bubuko.com,布布扣


6. $type

$type will find the data according the type of bson field. For example:
bubuko.com,布布扣

The following picture is the type of bson type. 

bubuko.com,布布扣


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

标签:mongodb

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

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