db.classes.update({"count":{$gt:20}},{$set:{"name":"c4"}},false,false) 存在更新一条记录,不存在不插入upsert,multi
db.classes.update({"count":{$gt:20}},{$set:{"name":"c4"}},false,true) 存在更新多条记录,不存在不插入
db.classes.update({"count":{$gt:20}},{$set:{"name":"c4"}},true,false) 存在更新一条记录,不存在插入
db.usercollection.find({name: {$exists: true}, $where: "this.name.length > 40"}).limit(2);
db.apps.find({$where:"(this.id.length gt 6) && (this.id.length lt 15) " } ).count();

db.table1.find({$where:'this.a == this.b'})
$regex: 'Value_2', $options: 'g' }

 posted on 2016-01-26 22:21  jayruan  阅读(294)  评论(0编辑  收藏  举报