摘要:
mongodb 常用查询API: db.book.find(0.count() db.book.find({},{bookid,name,status}) //select bookid,name,status from book db.book.find({age:{$gt:30}}) db.bo 阅读全文
摘要:
db.users.createIndex({username : 'hashed'}) 1 # 创建唯一索引 db.values.createIndex({title:1},{unique:true}) 2 # 复合索引支持唯一性约束 db.values.createIndex({title:1,t 阅读全文