mongodb支持sql的where查询格式
例子:
db.getCollection('test_user').find({'$where':"function(){ return this.addresss.length>2}"});
上述等价:db.getCollection('test_user').find({'$where':"this.addresss.length>2"});
mongodb支持sql的where查询格式
例子:
db.getCollection('test_user').find({'$where':"function(){ return this.addresss.length>2}"});
上述等价:db.getCollection('test_user').find({'$where':"this.addresss.length>2"});