
mongodb
mayner
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
mongodb 分组查询
mongodb 分组查询碰到的问题:数据库中有字段:age 對age進行分組查詢,并統計。 Document sub_group = new Document(); sub_group.put("age", "$age"); sub_group.put("count", new Document("$sum", 1)); Document grou...原创 2018-07-30 16:42:30 · 755 阅读 · 0 评论 -
mongodb update操作
版本mongodb3.2先使用mongodb的updateone出现错误。是因为自己的参数写错了。updateone方法参数是两个bson对象。updateone(oldBson,newBson);我出错的原因是:Bson oldBson= new BsonDocument();oldBson = and(oldBson, eq("account", oldUser.get...原创 2018-07-27 11:26:24 · 3065 阅读 · 0 评论