本篇主要用于汇总MongoDB专栏,提供快速访问链接:
一、安装与基本介绍
二、CRUD操作
MongoDB 查询文档中使用$expr、$where选择器
三、聚合操作
MongoDB 聚合管道的文档筛选($match)及分组统计($group)
MongoDB 聚合管道的字段投影($addFields,$set,$unset,$project)
MongoDB 聚合管道的文档操作($sort,$skip,$limit,$sample,$unwind)
MongoDB 聚合管道的文档关联查询($lookup)及管道合并($unionWith)
MongoDB 聚合管道的输出结果到集合($out)及合并结果到集合($merge)
四、聚合表达式运算符
MongoDB 聚合管道中使用数组表达式运算符获取数组中指定位置的元素($arrayElemAt,$first,$last)
MongoDB 聚合管道中使用数组表达式运算符截取数组($slice)
MongoDB 聚合管道中使用数组表达式运算符合并数组($concatArrays)
MongoDB 聚合管道中使用数组表达式运算符断言数组($isArray)
MongoDB 聚合管道中使用数组表达式运算符判断数组中是否包含元素($in)并获取元素索引($indexOfArray)
MongoDB 聚合管道中使用数组表达式运算符获取数组长度($size)和反转数组($reverseArray)
MongoDB 聚合管道中使用数组表达式运算符过滤数组($filter)
MongoDB 聚合管道中使用数组表达式运算符实现数组与对象之间的转换($arrayToObject,$objectToArray)
MongoDB 聚合管道中使用数组表达式运算符实现数组元素映射($map)与统计(reduce)
MongoDB 聚合管道中使用自定义聚合表达式运算符($accumulator)
MongoDB 聚合管道中使用自定义聚合表达式运算符($function)
------ 未完待续