//查询collection的所有数据 -> mysql select all
//db.user_integral_info.find({})
//查询gainValue = 25的数据
//db.user_integral_info.find({gainValue:30})
// 大于 小于 不等于
//lt gt
//db.user_integral_info.find({gainValue:{KaTeX parse error: Expected 'EOF', got '}' at position 6: lt:50}̲}) //db.user_in…gt:20}})
// >= <= 怎么表示? gte lte
//db.user_integral_info.find({gainValue:{$gte:25}})
//in not in
//db.user_integral_info.find( { gainValue: { $in: [ 25, “D” ] } } )
//db.user_integral_info.find( { gainValue: { $nin: [ “D” ] } } )
//count
//db.user_integral_info.count()
// skip 跳过 limit 几条
//db.user_integral_info.find().limit(10)
//db.user_integral_info.find({}).skip(2).limit(2)
//排序 order column asc/desc ??
//排序 order column,column2 asc/desc
//排序 order column asc,column desc 1升序 -1降序
// db.users.find({}, {“userName”:1,"_id":0}) ;
//db.user_integral_info.find({},{“gainValue”:1,"_id":0}).sort({gainValue:-1}).limit(10)
//嵌套文档语法
//增删改查
//db.user_integral_info.find({}).limit(1)
//db.user_integral_info.find({“gainValue”: 25})
//给gainValue=25的userIntegrals加一个数据
// add
//db.user_integral_info.update({“gainValue”:25},{$addToSet:{userIntegrals:{“addToSet_first”:“ttt”}}})
//update
//db.user_integral_info.update({“gainValue”:25,“userIntegrals.addToSet_first”:“ttt”},{KaTeX parse error: Expected '}', got 'EOF' at end of input: …"userIntegrals..addToSet_first":“ttt2”}})
//delete
//db.user_integral_info.update({“gainValue”:25},{$pull:{“userIntegrals”:{“addToSet_first”:“ttt2”}}})