【mongo】mongoVUE使用
1.查询存在字段“test”的项
{"test":{$exists:true}}
2.在表中插入字段
{$set:{"test":"123"}}
3.正则匹配
{"test":new RegExp('.*123.*')}
4.注意,mongoVUE不支持distinct语法
原因:http://stackoverflow.com/questions/12373842/how-to-use-distinct-in-mongovue
I don't think you can do that using MongoVUE. You can do it through MongoDB shell running a command like this:
db.[Collection Name].distinct({Property Name})
ex: db.students.distinct('age')
db.students.distinct('age').length; // gives you the record count
I usually find SQL to Mongo Mapping Chart page useful in these case (http://www.mongodb.org/display/DOCS/SQL+to+Mongo+Mapping+Chart )