当前位置: 移动技术网 > IT编程>数据库>DB2 > mongodb去重,聚合,查询讲解

mongodb去重,聚合,查询讲解

2018年09月13日  | 移动技术网IT编程  | 我要评论

近期学习mongodb,一些个人理解:

1.去重

mongotemplate.getcollection(collectionname).distinct() 返回list集合,是去重后的结果

2.聚合

aggregation aggregation=aggregation.newaggregation(criteria.where("").is()),aggregation.group().first().addtoset());

3.查询

mongotemplate.find()

主:其实去重,聚合,查询都是查询的一部分

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网