Library/Mongo/Lite.php
@@ -374,6 +374,21 @@ } /** * 聚合 * @param [type] $colName [description] * @param [type] $params [description] * @return [type] [description] */ public function aggregate($colName, $params){ $col = $this->_getCol($colName); // 自动处理 '_id' 字段 //$query = $this->_parseId($query); $result = $col->aggregate($params); return $result['result']; } /** * 统计文档记录数 * * @param string $colName 集合名